T09 · Insecure Skill Coding Practices
- Location
scripts/script.sh:6- Finding
Sensitive financial records are created without restrictive filesystem permissions
- Content
View full analysis
> "$DATA_DIR/history.log"; } ``` Representative financial-record write: ```bash echo "$ts|$input" >> "$DATA_DIR/record.log" ``` Equivalent writes are used for categorization, balances, forecasts, reports, budget checks, summaries, alerts, history, comparisons, and tax notes. ### Technical Analysis The script stores personal financial information in plaintext but does not establish a restrictive `umask` or explicitly set permissions on the data directory, log files, or export files. Consequently, their permissions depend on the environment from which the script is invoked. For example, under a permissive `umask`, newly created files could be readable by other local users. The affected information can include account balances, expenses, income, transaction history, forecasts, and tax notes. Export files created by the same program inherit the same weakness. The documented use of plaintext storage is not inherently malicious, but failing to enforce least-privilege permissions for sensitive financial records creates a local confidentiality vulnerability. ### Attack Path 1. A user invokes the bookkeeping tool in an environment with a permissive `umask`. 2. The script creates `~/.local/share/personal-bookkeeper` and its log or export files without explicit restrictive modes. 3. The resulting permissions allow another local account or process operating under a different identity to traverse the directory or read its files. 4. The local attacker reads the stored financial records or generated exports. This attack requires local access and filesyste ...[truncated 559 chars]- Remediation
View remediation
