T09 · Insecure Skill Coding Practices
- Location
SKILL.md:162- Finding
Predictable Storage of Sensitive Results in a Shared Temporary Directory
- Content
View full analysis
/.agent.json` (e.g., `/tmp/document.agent.json`). - **Default (per-step results)**: write each step's output to `/..json` (e.g., `/tmp/document.document-parse.json`, `/tmp/document.information-extract.json`). - **Override**: if the user specifies an output path, use it. - **Always print the resolved absolute path(s)** in your response so the user can locate the file(s). ``` ### Technical Analysis The Skill instructs the Agent to store full and per-step document-processing results under a system temporary directory using filenames derived predictably from the input filename and workflow step name. These results may contain parsed text, extracted personal or business data, document classifications, and model-generated analysis. Shared temporary directories such as `/tmp` are commonly writable by multiple local users. Predictable filenames introduce the following risks unless the implementation uses secure creation semantics: - Another local process may predict and pre-create the output file. - A symbolic link may be placed at the expected path before the Agent writes the result. - Permissive file permissions may allow unrelated local users to read the generated data. - A pre-existing file may be overwritten if output files are opened without exclusive creation. - Printing the absolute path may further expose the location of sensitive output in logs or conversation history. The documentation does not require a private temporary directory, owner-only permissions, exclusive file creation, symbolic-link protection, or cleanup after the results are consumed. ### Attack Path 1. An attacker with access to the same multi-user host observes or predicts the input filename, s ...[truncated 1671 chars]- Remediation
View remediation
