T09 · Insecure Skill Coding Practices
- Location
scripts/cli.py:68- Finding
Unrestricted Preferences Path Permits Arbitrary File Read and Replacement
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is a coherent Stockholm transit helper, but its preferences override can read from or overwrite arbitrary local paths instead of staying within the documented workspace preferences file.
Review before installing. The skill's normal transit lookups and saved favorites are understandable, but only use the documented `.sl/preferences.json` storage path and avoid invoking any command with `--preferences` pointing elsewhere. Treat saved favorites as location/routine data and remove them when no longer needed.
scripts/cli.py:68Unrestricted Preferences Path Permits Arbitrary File Read and Replacement
The skill explicitly documents capabilities that read and write workspace files and make network requests, but it does not declare any tool scope or permission boundaries. This creates a least-privilege and transparency gap: an agent may invoke filesystem and network-capable code without an explicit policy surface for users or reviewers to assess and constrain those actions.
The skill states that favorite stops and routes are stored persistently in .sl/preferences.json, but it does not clearly warn the user at the point of use that data will be saved in the workspace. Persistent storage of travel preferences can expose sensitive routine or location information to other tools, future sessions, or anyone with workspace access.
This markdown file explains that .sl/preferences.json is loaded and modified and later documents save/remove commands, but it does not explicitly warn users that these commands persistently change local stored favorites. For markdown files, SQP-2 applies when behavior affecting user data is described without a clear warning or disclosure.
Line L32 states that the language parameter accepts only sv or en, which is a natural-language locale restriction. Because the document does not mention user opt-in, fallback behavior, or a region-specific justification, this may conflict with language/locale policy expectations.
The dependency is specified as pytest>=8.0.0, which allows any future major or minor release to be installed. This creates a supply-chain and reproducibility risk because builds may pull in unreviewed versions, including ones with breaking changes or newly introduced vulnerabilities.
pytest>=8.0.0
Because pytest is not pinned, it is not possible to verify whether the installed version includes fixes for the referenced advisory affecting tmpdir handling. Even though this is a development/test dependency, an affected version could expose CI or local test environments to filesystem-related issues if vulnerable functionality is exercised.
No suspicious patterns detected.