Back to skill

Security audit

Amazon Research

Security checks for vulnerabilities and agentic risk

Overview

This skill is a local Amazon price tracker, but it installs persistent daily execution and can generate misleading fake price data as if it were real.

Review before installing. Use only if you are comfortable with a local SQLite shopping database and manual tracking. Do not run the cron setup as root, and avoid the printed crontab -r removal command unless you intend to delete every scheduled job for that account. Treat automatic price checks and alerts as simulated, not verified Amazon prices.

Vulnerability Patterns
  • System PersistenceInstalls backdoors, hooks, services, or scheduled tasks that survive the run
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
Findings (3)

T06 · System Persistence

Error
Location
scripts/setup_cron.sh:7
Finding

Persistent and Non-Idempotent Cron Job Installation

Content
View full analysis
/dev/null; echo "0 9 * * * cd /home/openclaw/workspace/skills/amazon-research/scripts && python3 price_checker.py >> /root/workspace/Projects/Amazon-Research/cron.log 2>&1") | crontab - ``` ### Technical Analysis The setup script modifies the invoking account's crontab and registers `price_checker.py` for automatic daily execution. This scheduled operation survives the current Skill invocation and therefore constitutes system persistence. Daily scheduling is related to the documented price-monitoring workflow and is disclosed in `SKILL.md`. However, the implementation lacks several controls: - It does not request explicit confirmation immediately before modifying the crontab. - It is not idempotent. Every execution appends another identical entry. - It uses hardcoded `/home/openclaw` and `/root` paths. - It runs with all permissions of the account whose crontab is modified. - It executes code directly from a mutable Skill directory. - It does not validate ownership or permissions of the scheduled script and its parent directories. - It provides no narrowly scoped uninstallation mechanism. The hardcoded `/root` log path does not itself grant root privileges. If the setup script is run as root, however, it installs the task in root's crontab and the Python script will subsequently execute with root privileges. ### Attack Path 1. A user runs `scripts/setup_cron.sh`. 2. The script installs a persistent daily task in that user's crontab. 3. The Skill directory or `scripts/price_checker.py` is subsequently modified or replaced by an actor who has write access to that location. 4. At 09:00, cron executes the modified Python script with the privileges of the crontab owner. 5. If setup was performed as root, the replaceme ...[truncated 877 chars]
Remediation
View remediation
> \"$HOME/.local/state/amazon-research/cron.log\" 2>&1 $MARKER" if ! crontab -l 2>/dev/null | grep -Fq "$MARKER"; then { crontab -l 2>/dev/null || true printf '%s\n' "$JOB" } | crontab - fi ``` ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/setup_cron.sh:17
Finding

Removal Guidance Deletes the User's Entire Crontab

Content
View full analysis
Remediation
View remediation
/dev/null | grep -Fv "$MARKER" > "$TMP_FILE" crontab "$TMP_FILE" ``` Additional hardening should include: - Backing up the existing crontab before modification. - Showing the exact entry that will be removed. - Requiring confirmation before removal. - Preserving comments and every unrelated task. - Treating the absence of the marked entry as a successful no-op. - Avoiding `crontab -r` in documentation and uninstall scripts. ]]>

other

Warning
Location
scripts/price_checker.py:26
Finding

Simulated Price Changes Are Persisted and Evaluated as Real Market Data

Content
View full analysis
1%) price_change_pct = ((new_price - current_price) / current_price) * 100 if abs(price_change_pct) > 1: cursor.execute(''' INSERT INTO price_history (asin, price) VALUES (?, ?) ''', (asin, new_price)) ``` ### Technical Analysis The daily checker does not retrieve current Amazon prices. Instead, it generates random changes between approximately -5% and +2%, persists those generated values in the production `price_history` table, and then evaluates alerts against the resulting records. Because each simulated value becomes the baseline for the next run, the database can drift progressively away from the actual product price. The scheduled workflow presents these values as price changes and can report triggered deals without verifying any external market data. This is primarily an integrity and trust issue rather than a code-execution flaw. The simulation is noted in source comments, but runtime output, stored records, and alert processing do not distinguish simulated data from genuine observations. ### Attack Path 1. A product is added with an initial manually entered price. 2. The persistent cron task runs `price_checker.py`. 3. `simulate_price_check()` generates a random rep ...[truncated 946 chars]
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Rogue AgentSelf-Modification, Session Persistence
  • YARA SignaturesMalware Match, Webshell Match, Cryptominer Match
Findings (16)

Tp4

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding

This is a second distinct description-behavior mismatch at the same location: the skill claims wishlist, comparison, and alerting functionality that is not substantiated, while undeclared local storage is implied. Misrepresentation of capabilities is dangerous because it can lead to improper trust, automation errors, and silent retention of user-managed data.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
90% confidence
Finding

This is a second distinct description-behavior mismatch at the same location: the skill claims wishlist, comparison, and alerting functionality that is not substantiated, while undeclared local storage is implied. Misrepresentation of capabilities is dangerous because it can lead to improper trust, automation errors, and silent retention of user-managed data.

Content

No source excerpt is available for this finding.

YARA rule 'backdoor_persistence': Backdoor persistence with malicious payloads (shell commands, SSH key injection, hidden root users) [malware]

High
Category
YARA Match
Confidence
75% confidence
Finding

YARA rule matched a known malware signature (reverse shell, backdoor, ransomware, C2 framework, or info stealer).

Content

Scanner excerpt · scripts/setup_cron.sh (reported line 7)May include surrounding context.

sh
#!/bin/bash
# Setup Daily Amazon Price Check Cron Job

echo "Setting up daily Amazon price check..."

# Add cron job for 9:00 AM daily
(crontab -l 2>/dev/null; echo "0 9 * * * cd /home/openclaw/workspace/skills/amazon-research/scripts && python3 price_checker.py >> /root/workspace/Projects/Amazon-Research/cron.log 2>&1") | crontab -

echo "✅ Cron job installed!"
echo ""
echo "Schedule: Daily at 9:00 AM"
echo "Log file: ~/workspace/Projects/Amazon-Research/cron.log"
echo ""
echo "To check current cron jobs:"
echo "  crontab -l"
echo ""
echo "To remove:"
echo "  crontab -r"

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
88% confidence
Finding

The skill describes commands that write persistent data to a local SQLite database and manage tracked products, but it declares no permissions or allowed tools. That creates an undeclared capability boundary: a user or orchestrator may assume the skill is informational only, while it can modify local state and accumulate data on disk.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The documentation says ama <product-name-or-asin>, implying the tool can handle product-name searches meaningfully. In code, non-ASIN input simply generates a fake ASIN from the current timestamp and adds it to the tracker, which contradicts the implied Amazon research behavior rather than merely omitting implementation details.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The manifest describes searching Amazon products, tracking prices, comparing deals, and reviewing specifications, but this wrapper script never queries Amazon or retrieves product data. Its documented behavior is limited to adding placeholder entries and requiring manual price updates, which is materially narrower than the claimed research functionality.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The manifest describes Amazon research functionality, but this setup script changes local system scheduler state by writing to crontab. That mismatch matters because users may not expect persistent background execution from a research skill, reducing informed consent and increasing the chance of unnoticed recurring activity.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
80% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · scripts/setup_cron.sh (reported line 6)May include surrounding context.

sh
echo "Setting up daily Amazon price check..."

# Add cron job for 9:00 AM daily
(crontab -l 2>/dev/null; echo "0 9 * * * cd /home/openclaw/workspace/skills/amazon-research/scripts && python3 price_checker.py >> /root/workspace/Projects/Amazon-Research/cron.log 2>&1") | crontab -

echo "✅ Cron job installed!"

Session Persistence

Medium
Category
Rogue Agent
Confidence
93% confidence
Finding

This line establishes session persistence via cron, causing code to run daily without further user action. Persistent execution is dangerous because it creates a durable foothold on the system and can be abused if the target script or its directory contents are later modified.

Content

Scanner excerpt · scripts/setup_cron.sh (reported line 7)May include surrounding context.

sh
echo "Setting up daily Amazon price check..."

# Add cron job for 9:00 AM daily
(crontab -l 2>/dev/null; echo "0 9 * * * cd /home/openclaw/workspace/skills/amazon-research/scripts && python3 price_checker.py >> /root/workspace/Projects/Amazon-Research/cron.log 2>&1") | crontab -

echo "✅ Cron job installed!"
echo ""

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The script installs a persistent cron job that modifies the host's scheduler state, which is a security-relevant side effect beyond one-time product research. Even if intended for legitimate price tracking, persistence increases risk because the task will continue running automatically and can later execute changed code from the referenced script path.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
85% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · scripts/setup_cron.sh (reported line 15)May include surrounding context.

sh
echo "Log file: ~/workspace/Projects/Amazon-Research/cron.log"
echo ""
echo "To check current cron jobs:"
echo "  crontab -l"
echo ""
echo "To remove:"
echo "  crontab -r"

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
86% confidence
Finding

The skill instructs users to add and track products in a local database without warning that this creates persistent records on disk. Even if the stored data is not highly sensitive by default, silent persistence can expose shopping interests, budgets, or product history to other local users, backups, or later workflows.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
94% confidence
Finding

This shell script includes user-facing natural-language text in German, and later help messages continue in German for key instructions. The file does not offer a language/locale choice or indicate that the skill is intentionally region-specific, which can violate a language-choice policy.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
97% confidence
Finding

The help text at these lines is presented only in German and controls how the user performs updates. Because the script does not ask for or document a required locale, this is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
92% confidence
Finding

The post-action guidance shown to users is only in German, with no user choice of language and no justification for a German-only interface. This can conflict with organizational language/locale requirements.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

The script presents another user-facing instruction exclusively in German. Since there is no opt-in or documented locale restriction, this is a policy-relevant language constraint.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.