T09 · Insecure Skill Coding Practices
Warning
- Location
SKILL.md:62- Finding
Unsafe Campaign Identifier Interpolation Enables Command Injection and Path Traversal
- Content
View full analysis
--source paid --data '{"spend": ..., "revenue": ..., "conversions": ...}'`, then `ledger.py diff --source paid` for the period delta and `ledger.py trend --source paid --field roas` for the trend line. ``` ```text Ask "Save these results?" If yes, write to `memory/ad/paid-measurement-loop/` using `YYYY-MM-DD--readback.md` — see [Skill Contract](../../../references/skill-contract.md) §Save Results Template. ``` ### Technical Analysis The skill instructs an agent to substitute a campaign identifier into command-line templates without requiring argument-array execution, validation, or shell-safe quoting. Campaign identifiers originate from user requests or imported advertising data and must therefore be considered attacker-controlled. If an implementation constructs a command string from this template and invokes it through a shell, metacharacters in the campaign identifier can terminate or alter the intended command. Although line 56 generally states that exported data is untrusted, it does not prescribe the concrete quoting or structured process-execution controls required at this command sink. The same identifier is incorporated into a result filename without a character allowlist, basename conversion, or canonical destination check. A crafted identifier containing path separators or parent-directory components could cause an implementation to address a location outside `memory/ad/paid-measurement-loop/`, depending on how directories and paths are created and resolved. The package does not include the referenced ledger implementation ...[truncated 1861 chars]- Remediation
View remediation
