T09 · Insecure Skill Coding Practices
- Location
scripts/script.sh:4- Finding
Local data files are created without enforced private permissions
- Content
View full analysis
> "$DATA_DIR/history.log"; } ``` ### Technical Analysis The script creates its data directory and log files using the caller's current `umask`. It does not explicitly require owner-only permissions for either the directory or the files. On a system with a common `022` umask, `mkdir` normally creates the directory with mode `0755`, while shell redirection normally creates log and export files with mode `0644`. Other local users may consequently be able to list or read stored data. A more permissive umask would expose the data further. The path is also not checked to ensure that it is owned by the current user and is a real directory rather than a symbolic link. This matters most in unusual environments where an attacker can modify the user's home-directory hierarchy. ### Attack Path 1. A user executes the Skill with a permissive or ordinary default umask. 2. The script creates `~/.local/share/twitch/` and later creates logs and exports beneath it. 3. User-supplied score, rank, history, tracking, or other activity data is written to those files. 4. Another local account with traversal access to the user's home directory reads the files if their resulting permissions permit it. ### Impact Assessment The issue can disclose locally stored Skill inputs, history, and exports to other users on the same system. It does not grant additional privileges, remote access, or code execution. The scope is limited to data readable with the victim process's resulting filesystem permissions. ]]>- Remediation
View remediation
