T09 · Insecure Skill Coding Practices
Error
- Location
- references/onboarding.md:49
- Finding
- Shell Command Injection Through Unsafely Interpolated User Data<![CDATA[ ## Vulnerability Details **File Locations**: - `references/onboarding.md:49-56` - `references/time-audit.md:91-94` - `references/time-audit.md:172-174` - `references/nightly-analysis.md:32-36` **Vulnerability Type**: Shell command injection **Risk Level**: High ### Vulnerable Code `references/onboarding.md:49-56`: ```bash wayve knowledge save --category "personal_context" --key "business_type" --value "Design agency, solopreneur" --json wayve knowledge save --category "personal_context" --key "business_clients" --value "6 active clients, mostly SaaS startups" --json wayve knowledge save --category "personal_context" --key "business_tools" --value "Figma, Slack, Notion, Gmail" --json wayve knowledge save --category "personal_context" --key "business_pain_points" --value "Client communication takes ~50% of work time" --json wayve knowledge save --category "personal_context" --key "business_goals" --value "Get to 10 clients by June, launch online course" --json wayve knowledge save --category "personal_context" --key "business_capacity" --value "Can handle max 6 clients simultaneously" --json wayve knowledge save --category "personal_context" --key "revenue_monthly" --value "~€5000/month" --json // only if shared ``` `references/time-audit.md:91-94`: ```bash wayve knowledge save --category "personal_context" --key "timezone" --value "USER_TIMEZONE" --json wayve knowledge save --category "personal_context" --key "active_hours" --value "Mon-Thu HH:MM-HH:MM, Fri-Sun HH:MM-HH:MM" --json wayve knowledge save --category "preferences" --key "time_audit_config" --value "audit_id: AUDIT_ID, interval: 30min, channel: telegram, duration: 7 days, start: YYYY-MM-DD, end: YYYY-MM-DD" --json ``` `references/time-audit.md:172-174`: ```bash wayve audit log --audit "AUDIT_ID" --what "gym" --energy 4 --pillar "matched-pillar-uuid" --value 1 --note "optional note" --json ``` `references/nightly-analysis.md:32-36`: ```bash wayve automations create agent_routine --na ...[truncated 2504 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Do not construct shell command strings from user-controlled values. 2. Invoke the CLI through an execution API that accepts an argument array without a shell, for example: - Executable: `wayve` - Arguments: `["knowledge", "save", "--category", category, "--key", key, "--value", value, "--json"]` 3. Serialize `--config` and `--delivery-config` values with a trusted JSON encoder rather than manual string interpolation. 4. Validate constrained fields with allowlists: - Delivery channels against supported channel names. - UUIDs against a strict UUID format. - Dates and times against fixed formats. - Timezones against an IANA timezone database. - Numeric ratings and intervals against documented ranges. 5. If a shell cannot be avoided, apply a proven shell-escaping routine to every dynamic argument. Manual quoting is not sufficient. 6. Add adversarial tests covering apostrophes, backticks, command substitutions, semicolons, newlines, and malformed JSON. 7. Run the CLI in a restricted environment with minimal filesystem, network, and environment-variable access to reduce impact if injection occurs. ]]>
