T09 · Insecure Skill Coding Practices
- Location
scripts/script.sh:164- Finding
Misleading ETF Functionality and Plaintext Retention of User Input
- Content
View full analysis
/dev/null || echo " No entries yet. Use: etf analyze " else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/analyze.log" local total=$(wc -l < "$DATA_DIR/analyze.log") echo " [Etf] analyze: $input" echo " Saved. Total analyze entries: $total" _log "analyze" "$input" fi ;; ``` Equivalent storage behavior appears in the handlers for `run`, `check`, `convert`, `generate`, `preview`, `batch`, `compare`, `export`, `config`, `status`, and `report`. No ETF parsing, holdings analysis, metric comparison, or sector-allocation processing is implemented. If these handlers execute in a context where their `local` declarations are valid, arbitrary arguments—including portfolio details or other sensitive information—are retained in plaintext under `~/.local/share/etf/`. In ordinary direct script execution, the top-level `local` declarations produce a Bash error and, because `set -e` is enabled, generally prevent the writes from completing. This defect limits exploitation in the current direct-execution path, but it does not make the intended ...[truncated 1636 chars]- Remediation
View remediation
