Back to skill

Security audit

Secure Shopper

Security checks for vulnerabilities and agentic risk

Overview

This shopping skill is mostly coherent, but it handles checkout, credentials, location data, and persistent task files, and one helper can rewrite caller-chosen JSON files outside its intended artifact area.

Review before installing. Use it only if you are comfortable with an agent browsing authenticated shopping sites, storing your location and shopping requests on disk, and potentially placing orders after confirmation. Prefer using a zip code instead of a full address, review generated artifact files, and fix or avoid the raw --file status helper until it is restricted to the intended artifact directory.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/task_io.mjs:36
Finding

Unrestricted File Modification Through User-Controlled Task Path

Content
View full analysis
c.url === url); if (!cand) throw new Error(`Candidate not found for url: ${url}`); cand.status = status; await fs.writeFile(file, JSON.stringify(raw, null, 2) + '\n', 'utf8'); return raw; } ``` The vulnerable function is directly exposed through the command-line interface: ```js } else if (cmd === 'status') { const file = arg('file'); const url = arg('url'); const status = arg('status'); if (!file || !url || !status) throw new Error('Need --file --url --status'); await updateCandidateStatus(file, url, status); console.log('OK'); } ``` ### Technical Analysis The `updateCandidateStatus` and `finalizeTask` functions accept a caller-controlled `file` path and pass it directly to `fs.readFile` and `fs.writeFile`. The path is not resolved against the intended artifact directory, canonicalized, or checked to ensure that it remains under: ```text /home/miles/.openclaw/workspace/artifacts/secure_shopping ``` Consequently, absolute paths, directory-traversal paths, and paths involving symbolic links are not rejected. The command-line `status` operation exposes this behavior through its `--file` option. Successful modification requires the target to be valid JSON with the expected structure, including a `task.candidates` array con ...[truncated 2057 chars]
Remediation
View remediation
Vulnerability Patterns
  • Output HandlingUnvalidated Output Injection, Cross-Context Output, Unbounded Output
  • Rogue AgentSelf-Modification, Session Persistence
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (6)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 184)May include surrounding context.

md
Helper module (optional): `scripts/task_io.mjs`.

Session Persistence

Medium
Category
Rogue Agent
Confidence
90% confidence
Finding

The skill directs the agent to collect and persist machine-specific shopping preferences and location data into a long-lived config.json. Persisting zip code or address across sessions increases privacy risk and can expose sensitive contextual data beyond the immediate task, especially if the file is readable by other local users, tools, or future agent runs.

Content

Scanner excerpt · SKILL.md (reported line 67)May include surrounding context.

md
### Preferred (chat-first)

Ask Boss and then write `config.json`:

1) Go-to shopping website(s)
   - Examples: Amazon, Walmart, Target

Unbounded Output

Medium
Category
Output Handling
Confidence
80% confidence
Finding

Output size or generation rate is not bounded. Unbounded output enables denial-of-service through resource exhaustion, log flooding, or context-window stuffing.

Content

Scanner excerpt · SKILL.md (reported line 113)May include surrounding context.

md
- Use the configured go-to sites, unless the runtime prompt specifies a site.
- If the site session appears already authenticated: skip login.
- Otherwise, use secure-autofill login flow:
  - `browser.snapshot` to get refs
  - `vault_suggest`/`vault_fill` to fill credentials

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill explicitly records shopping task details, candidate URLs, and user prompt content to a workspace artifact, but it does not require clear user notice or consent for that persistence. Because the stored data can include shopping interests, location context, and potentially sensitive purchase decisions, this creates avoidable privacy and data-retention risk if artifacts are later accessed by other agents, users, or processes.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The code persists user-provided prompt content, preferences, sites, and candidate data into JSON files under a workspace artifacts directory. Although the write is visible in code, there is no confirmation prompt, user-facing notice, or explanatory comment/docstring disclosing that potentially sensitive shopping/task data will be stored on disk.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The CLI status command accepts an arbitrary --file path and passes it directly into updateCandidateStatus, which reads and overwrites that file without validating that it resides under the expected artifacts directory. In the context of a shopping/checkout skill that may run with access to a user workspace, this can be abused to modify unintended JSON files in the workspace or any writable path accessible to the process, causing integrity loss or destructive overwrites.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.