T09 · Insecure Skill Coding Practices
- Location
scripts/script.sh:6- Finding
Operational Logs and Exports Are Created Without Restrictive Permissions
- Content
View full analysis
> "$DATA_DIR/history.log"; } ``` Representative record creation: ```bash echo "$ts|$input" >> "$DATA_DIR/scan.log" ``` ### Technical Analysis The application creates its data directory, log files, history file, and export files without setting a restrictive `umask` or explicitly assigning secure filesystem modes. The actual permissions therefore depend on the invoking process's environment. With a common `022` umask, `mkdir` normally creates the directory with mode `0755`, while shell redirection creates files with mode `0644`. The records are intended to contain operationally sensitive information such as: - Network scan results and address ranges - Hostnames and service health details - Incident and security alerts - Backup and restoration information - Configuration changes and remediation notes The path is predictable and documented. If the user's home-directory permissions and parent-directory traversal settings allow access, another local account may enumerate or read these records. This does not grant elevated execution privileges by itself. It is a confidentiality weakness affecting data owned by the user running the skill. ### Attack Path 1. An administrator runs the skill under a permissive umask such as `022`. 2. The skill creates `~/.local/share/sysadmin-handbook` and its files without explicit permission restrictions. 3. The administrator records sensitive infrastructure or incident-response information. 4. A second local user checks the predictable data directory. 5. If parent-directory traversal is available, that user reads world-r ...[truncated 678 chars]- Remediation
View remediation
