T09 · Insecure Skill Coding Practices
- Location
SKILL.md:121- Finding
Raw Credentials May Be Included in Plaintext Model Handover Documents
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:56-60,SKILL.md:101-110, andSKILL.md:121-127; plaintext output occurs atscripts/generate_transfer.py:91-92
Vulnerability Type: Sensitive information exposure through plaintext context transfer
Risk Level: HighVulnerable Documentation
English rendering of
SKILL.md:56-60:markdown When temporarily switching models: 1. The current model generates a `CONTEXT_TRANSFER` summary 2. Send the summary to the new model 3. The new model continues working based on the summary 4. Transfer the result back after completionEnglish rendering of
SKILL.md:101-110:markdown ### Important Notes - Prohibited actions: [] - Sensitive information: [] - Dependencies: []English rendering of
SKILL.md:121-127:markdown Before handover, confirm: - [ ] The project background is clear - [ ] The current progress is explicit - [ ] Key constraints are recorded - [ ] Files, paths, and credentials have been handed over - [ ] The next actions are specific and executable - [ ] Potential risks are identifiedThe corresponding plaintext write operation in
scripts/generate_transfer.py:91-92is:python with open(output_file, 'w', encoding='utf-8') as f: f.write(content)Technical Analysis
The Skill explicitly instructs users or agents to include credentials in a handover and provides a field for sensitive information. The handover is then intended to be sent to another model. No guidance or enforcement prevents raw API keys, passwords, access tokens, session cookies, private keys, or other secrets from being placed in the generated document.
The generator writes all supplied information directly to an unencrypted Markdown file without secret detection, redaction, output-permission hardening, retention controls, or recipient authorization checks. Although the script does not independently collect or tr ...[truncated 1685 chars]
- Remediation
View remediation
Remediation Suggestions
- Replace the credential-handover requirement with an explicit prohibition against including raw credentials, passwords, tokens, private keys, cookies, or recovery codes.
- Permit only indirect secret references, such as secret-manager identifiers, environment-variable names, or credential aliases that contain no secret value.
- Add a mandatory pre-transfer secret scan for common token formats, private-key headers, connection strings, authentication headers, and high-entropy values.
- Refuse generation or require explicit redaction when a probable secret is detected.
- Remove the generic sensitive-information field or redefine it to contain only handling requirements and data classifications.
- Require confirmation that the receiving model or agent is authorized to access every included resource.
- Create output files with restrictive permissions and avoid predictable shared locations.
- Document retention limits and secure deletion procedures for transfer files, logs, and conversation records.
- Add a warning that model prompts and responses may be retained by providers or observability systems.
- Where cross-agent credential access is necessary, grant access through a scoped secret manager rather than copying secret material into context.
