T09 · Insecure Skill Coding Practices
- Location
scripts/audit.sh:7- Finding
Unsafe Execution of Prompt-Controlled Shell Command Strings
- Content
View full analysis
'* ]]" "P7: Good/bad examples" check "[[ '$LOWER' == *'不需要'* || '$LOWER' == *'not your'* ]]" "P8: Scope limits" check "[[ '$LOWER' == *'reminder'* || '$LOWER' == *'提醒'* ]]" "P9: Drift protection" check "[[ '$LOWER' == *'信任'* || '$LOWER' == *'trust'* ]]" "P10: Trust boundary" check "[[ '$LOWER' == *'确认'* || '$LOWER' == *'verify'* || '$LOWER' == *'check'* ]]" "P11: Echo-check" check "[[ $(echo "$CONTENT" | wc -l) -gt 30 ]]" "P12: Constraint > task ratio" check "[[ '$LOWER' == *'hook'* || '$LOWER' == *'plugin'* || '$LOWER' == *'guard'* ]]" "P13: Code-level backup" check "[[ '$LOWER' == *'前置条件'* || '$LOWER' == *'precondition'* || '$LOWER' == *'gate'* ]]" "P14: State machine gate" check "[[ '$LOWER' == *'我刚才'* || '$LOWER' == *'self-correct'* ]]" "P15: Self-correction template" check "grep -q 'MUST\|NEVER\|CRITICAL' <<< '$(head -5 "$FILE")$(tail -5 "$FILE")'" "P16: First/last repetition" ``` ### Technical Analysis The `check` function accepts a shell expression as a string and attempts to execute it through an unquoted expa ...[truncated 2847 chars]- Remediation
View remediation
