T09 · Insecure Skill Coding Practices
- Location
src/utils/log.js:25- Finding
Automatic Undisclosed Retention of Queries and Scraped Data
- Content
View full analysis
- Remediation
View remediation
` or `--save` to enable persistence. 2. **Obtain explicit consent** - Clearly state before execution that results will be stored locally when persistence is enabled. - Document the destination, retained fields, and retention behavior in `SKILL.md` and `readme.md`. 3. **Avoid sensitive filenames** - Do not include raw search keywords or user-supplied URLs in filenames. - Use a random identifier, timestamp, or non-reversible identifier instead. 4. **Apply restrictive permissions** - When storage is requested, create directories and files with owner-only permissions where supported. - For example, use mode `0o700` for directories and `0o600` for files. 5. **Add retention controls** - Support automatic deletion after a configurable period. - Provide a documented cleanup command. - Set a maximum number or total size of retained files. 6. **Minimize stored data** - Store only fields explicitly requested by the user. - Consider redacting request parameters, profile identifiers, comments, and other metadata unless needed. 7. **Align documentation with behavior** - Clarify that “no write operations” refers only to remote Douyin actions. - Explicitly disclose any local filesystem writes and distinguish them from platform-side writes. ]]>
