T09 · Insecure Skill Coding Practices
Warning
- Location
- scripts/collect-diagnostics.sh:20
- Finding
- Diagnostic reports expose sensitive local and repository metadata<: ```bash bash collect-diagnostics.sh # print to stdout bash collect-diagnostics.sh diag.md # write to file ``` Collects system info, language ...[truncated 2521 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Remove the username, absolute working directory, and Git remote URL from the default report. 2. Make sensitive fields opt-in through explicit flags such as `--include-paths` and `--include-remote`. 3. If the remote URL is needed, parse and sanitize it before output: - Remove URL user information. - Replace internal hostnames with a placeholder. - Retain only a provider classification or sanitized repository identifier. 4. Replace the absolute working directory with a neutral value such as the project directory basename, or omit it. 5. Add a prominent warning to stdout and generated files stating that reports must be reviewed before external sharing. 6. Produce a sanitized sharing mode by default and reserve a clearly labeled local-only mode for full diagnostics. 7. Add automated tests covering HTTPS remotes with embedded credentials, SSH remotes, internal hostnames, usernames, and absolute paths. 8. Continue requiring final output redaction at the Skill-instruction level, but do not rely on that manual control as the primary safeguard. ]]>
