T09 · Insecure Skill Coding Practices
- Location
scripts/8k4.sh:173- Finding
Unescaped User Input Allows JSON Request-Body Injection
- Content
View full analysis
--task '...' [--chain C] [--dry-run]"; exit 1; } ID="$1"; shift parse_flags "$@" [[ -z "$TASK" ]] && { echo "Error: --task is required"; exit 1; } SEND=$( [[ "$DRY_RUN" == "true" ]] && echo "false" || echo "true" ) BODY=$(cat <- Remediation
View remediation
&2 exit 1 } ``` Additional hardening should include: 1. Allowlist `CHAIN` to `eth`, `base`, or `bsc`. 2. Enforce documented bounds for numeric values such as `max`. 3. Reject missing values for flags instead of reading an absent `$2`. 4. Make dry-run the default for contact and dispatch, requiring an explicit live-send option. 5. Present the serialized request for confirmation before a live external action when task text originates from an untrusted source. ]]>
