T09 · Insecure Skill Coding Practices
- Location
scripts/lib/storage.py:22- Finding
Predictable Temporary File Enables Symlink-Based File Overwrite
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill locally creates and stores charts as disclosed, with minor local file-safety and wording issues but no hidden network, credential, or destructive behavior.
Install only if you are comfortable with local chart files and chart metadata being stored under ~/.openclaw/workspace/memory/chart. The publisher should tighten the description around CSV/JSON support and harden local storage to avoid temporary-file and chart-ID collision issues.
scripts/lib/storage.py:22Predictable Temporary File Enables Symlink-Based File Overwrite
scripts/make_chart.py:36Truncated UUID Allows Silent Chart and Metadata Overwrite
The declared description presents a full chart generation and visualization engine. However, the supplied code chunk only performs storage initialization: it creates chart-related directories and, if absent, writes a JSON file with metadata. This is a supporting setup utility rather than the described charting functionality. While local storage of outputs is consistent with the description at a high level, the primary behavior of this code is materially narrower than the declared purpose. Additionally, the code writes to the user's filesystem, which is not reflected in the declared permissions.
The declared description presents a chart generation engine that creates charts from user data and helps decide appropriate chart types. The supplied code chunk only reads stored chart records via load_charts() and prints existing chart metadata and output locations. This is a materially narrower and different behavior than generating charts or transforming datasets into visualizations. While listing stored charts may be a supporting utility within a charting system, this specific code chunk does not implement the primary declared purpose.
The code does match the core local chart-generation claim: it creates charts locally with matplotlib, writes image files to a local output directory, and stores metadata. However, the declared description includes additional capabilities not present in this code chunk, especially turning CSV or JSON into a chart and deciding which chart type fits a dataset best. The actual implementation only accepts preformatted CLI arguments for labels, values, and optional x-values, and supports only bar, line, pie, and scatter charts. There is no dataset parsing from CSV/JSON and no chart-selection logic. No suspicious undeclared security-relevant behavior appears, but the description overstates the implemented functionality enough to count as a mismatch.
The skill declares file read/write behavior through its documented storage locations and script workflows, but it does not define any explicit tool scope such as permissions or allowed-tools. Missing capability scoping increases the chance that an agent may invoke the skill with broader filesystem access than intended, which can enable unintended reads or writes in the user's workspace.
The activation language is broad enough to trigger on many ordinary requests involving visualization, comparison, or deciding how to present data. Overbroad routing can cause this skill to be selected in contexts where file-writing behavior or local processing was not expected, increasing the risk of unintended data handling and workspace modifications.
No suspicious patterns detected.