T09 · Insecure Skill Coding Practices
- Location
scripts/shutoff_registry.py:74- Finding
Registry File May Expose Household and Contact Information Through Permissive File Permissions
- Content
View full analysis
{path}") ``` ### Technical Analysis The application stores the registry as plaintext JSON. Its contents may include exact valve locations, household tool locations, plumber contact details, insurance contact details, notes, and photo paths. The `save()` function uses the process's default file-creation behavior and does not explicitly apply restrictive permissions. Consequently, the permissions assigned to a newly created registry depend on the user's current umask. Under a permissive umask, other local users may be able to read the file. If the registry already exists with unsafe permissions, rewriting it does not correct those permissions. The default location under the user's home directory reduces exposure when the home directory itself is inaccessible to other users, but that protection is environment-dependent. The `--file` option can also place the registry in a shared or broadly accessible directory. No network transmission or automatic exfiltration was identified. Exploitation requires local filesystem access and sufficient directory traversal permissions. ### Attack Path 1. A user invokes `add`, `update`, `remove`, or `meta`, causing `save()` to write a registry. 2. The registry is created under a permissive umask, already has broad permissions, or is placed in a shared directory through `--file`. 3. Another local account identifies the default file or the custom registry path. 4. The local account reads the JSON file using its inherited filesystem permissions. 5. The account obtains household inf ...[truncated 788 chars]- Remediation
View remediation
{path}") ``` Tests should verify that a newly created registry has mode `0600` and that saving an existing broadly readable registry changes it to `0600`. ]]>
