T09 · Insecure Skill Coding Practices
- Location
SKILL.md:103- Finding
Unvalidated Domain Input Used in Shell Commands and File Paths
- Content
View full analysis
` 1. Run `/geo quick ` to get GEO snapshot score 2. Save score to prospect record: `geo_score`, `audit_date` 3. Save audit output to `~/.geo-prospects/audits/-.md` 4. Update `audit_file` path in prospect record 5. Add auto-note: "Quick audit run. GEO Score: XX/100." 6. If score < 55: suggest "Score indicates strong sales opportunity. Run `/geo proposal ` to generate proposal." ``` The Skill also enables Bash and presents direct CLI invocation patterns: ```markdown allowed-tools: Read, Write, Bash, Glob ``` ```bash seogeo crm add example.com --name "Example Corp" --email hi@example.com \ --stage lead --value 4800 --json seogeo crm show example.com --json seogeo crm audit example.com --score 62 --report ./example-audit/GEO-AUDIT-REPORT.md ``` ### Technical Analysis The Skill accepts an `id-or-domain` or `domain` value from the user and directs a Bash-capable Agent to use that value in both commands and generated filenames. It does not require hostname validation, shell-safe argument handling, path normalization, or containment checks. Two security problems can result: 1. **Command injection:** If an implementation constructs a shell command by interpolating the supplied domain, shell metacharacters may be interpreted as additional commands, substitutions, redirections, or pipelines. 2. **Path traversal:** The audit filename is constructed directly from the supplied domain. Values containing directory separators or traversal components could resolve outside `~/.geo-prospects/audits/`. The project contains only instructional Markdown, so command injection depends on the Agent or downstream implementation performing dire ...[truncated 1402 chars]- Remediation
View remediation
