T09 · Insecure Skill Coding Practices
- Location
scripts/script.sh:6- Finding
Potentially Sensitive Compliance Records Stored Without Explicit Access Controls
- Content
View full analysis
> "$DATA_DIR/history.log"; } ``` Representative record-writing implementation: ```bash generate) shift if [ $# -eq 0 ]; then echo "Recent generate entries:" tail -20 "$DATA_DIR/generate.log" 2>/dev/null || echo " No entries yet. Use: compliance generate " else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/generate.log" ``` The same storage pattern is repeated for the other record commands. ### Technical Analysis The Skill is intended to record security and compliance information, including credential rotations, revocations, password-strength assessments, audit findings, and data-storage operations. User-supplied record contents are written directly to plaintext files under `~/.local/share/compliance`. The script does not establish a restrictive umask, explicitly create the data directory with mode `0700`, or ensure that log files use mode `0600`. Consequently, effective permissions depend on the environment from which the script is launched. With a permissive umask, other local users may be able to read the records. Each record is also duplicated in `history.log` through `_log`, increasing the number of locations containing potentially sensitive information. No redaction, encryption, retention control, or warning against recording credentials and secrets is implemented. ### Attack Path 1. A user invokes a command such as `compliance rotate`, `compliance audit`, or `compliance check-strength` with sensitive operational information. 2. The script wri ...[truncated 1028 chars]- Remediation
View remediation
