T09 · Insecure Skill Coding Practices
- Location
scripts/jiuge_flow.sh:17- Finding
Unvalidated Input Filename Enables Path Traversal Outside Approved Directories
- Content
View full analysis
/dev/null || true log_success "Cleanup completed" } ``` ### Technical Analysis `INPUT_FILE` is supplied directly by the caller and is not restricted to a simple filename. Although its shell expansions are generally quoted, quoting only prevents shell word splitting and ordinary shell metacharacter injection. It does not prevent filesystem traversal using absolute paths or components such as `../`. The input is appended to `INPUT_DIR` for the existence check and is also used to derive `PROJECT_NAME`. As a result, traversal components can affect both the source file and the destination project path: ```bash "${INPUT_DIR}/${INPUT_FILE}" "${OUTPUT ...[truncated 2368 chars]- Remediation
View remediation
