T09 · Insecure Skill Coding Practices
- Location
scripts/script.sh:6- Finding
Sensitive Financial Records Are Created Without Restrictive Permissions
- Content
View full analysis
/dev/null || echo " No entries yet. Use: budgetly balance " else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/balance.log" local total=$(wc -l < "$DATA_DIR/balance.log") echo " [Budgetly] balance: $input" echo " Saved. Total balance entries: $total" _log "balance" "$input" fi ;; ``` ```bash tax-note) shift if [ $# -eq 0 ]; then echo "Recent tax-note entries:" tail -20 "$DATA_DIR/tax-note.log" 2>/dev/null || echo " No entries yet. Use: budgetly tax-note " else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/tax-note.log" local total=$(wc -l < "$DATA_DIR/tax-note.log") echo " [Budgetly] tax-note: $input" echo " Saved. Total tax-note entries: $total" _log "tax-note" "$input" fi ;; ``` ### Technical Analysis BudgetLy records balances, expenses, tax information, forecasts, and other potentially sensitive financial information in plaintext files under `~/.local/share/budgetly`. The script creates the directory and files without setting a restrictive `umask` or explicitly enforcing directory and file permissions. Consequently, the resulting modes depend on the environment from which the script is invoked. Under a permissive umask, the data directory, log files, and generated exports m ...[truncated 1537 chars]- Remediation
View remediation
/dev/null || true ``` 4. Create export files atomically with restrictive permissions rather than relying only on inherited defaults. 5. Document that the application stores sensitive financial information in plaintext and recommend full-disk or home-directory encryption where appropriate. 6. Consider avoiding unnecessary duplication of sensitive content in `history.log`, or provide an option to redact sensitive values from unified history. ]]>
