T09 · Insecure Skill Coding Practices
- Location
SKILL.md:42- Finding
Credential Disclosure Through Required Before-and-After Proof
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 42-59
Vulnerability Type: Exposure of plaintext sensitive data
Risk Level: HighVulnerable Code Snippet
markdown **Require:** - Concrete BEFORE state (exact values) - Concrete AFTER state (exact values) - Proof they're different (side-by-side comparison) **Example from OAuth refresher:**BEFORE:
- Access Token: POp5z1fi...eSN9VAAA
- Expires: 1769189639000
AFTER:
- Access Token: 01v0RrFG...eOE9QAA ✅ Different
- Expires: 1769190268000 ✅ Extended
text **Action:** Always show data transformation with real valuesThe same unsafe practice is reinforced at:
SKILL.md, lines 193-195:markdown **Don't say:** "It should work now" **Show:** "Here's the BEFORE token (POp5z...), here's AFTER (01v0R...), they're different"README.md, lines 48-50:markdown 2. **How do I prove this works?** - Can I show BEFORE/AFTER with real values from different setups?pre-publish-checklist.sh, line 104:bash echo " (showed BEFORE/AFTER with real values?)"
Technical Analysis
The skill instructs users or agents to prove OAuth refresh behavior by displaying exact, real before-and-after values. The surrounding examples explicitly concern access tokens, refresh tokens, and operating-system keychain records.
Revealing a complete secret is unnecessary to prove that credential rotation occurred. A secure implementation should compare secrets internally and expose only non-sensitive evidence, such as expiration timestamps, boolean comparison results, or non-reversible fingerprints. Although the example token strings appear partially abbreviated, the imperative to use “exact values” and “real values” could cause an executing agent or user to disclose complete credentials.
Attack Path
- A user or agent loads the skill while debugging an OAuth or keychain workf ...[truncated 1203 chars]
- Remediation
View remediation
Remediation Suggestions
- Replace every requirement to show “exact” or “real” secret values with an explicit prohibition on printing complete credentials.
- Compare credentials internally and report only whether they differ:
bash if [[ "$BEFORE_TOKEN" != "$AFTER_TOKEN" ]]; then printf '%s\n' "Token changed successfully" fi - If correlation evidence is required, produce a non-reversible fingerprint without printing the source value:
bash token_fingerprint() { printf '%s' "$1" | shasum -a 256 | cut -c1-12 } - Prefer safe proof fields such as expiration timestamps, token identifiers explicitly documented as non-secret, refresh status, and boolean comparison results.
- Update
README.mdandpre-publish-checklist.shto require redacted evidence. - Add a checklist rule that rejects examples or diagnostics containing plaintext tokens, passwords, API keys, session cookies, or private key material.
- Treat existing transcripts or logs produced under this guidance as potentially compromised and rotate any credentials that may have been displayed.
