T09 · Insecure Skill Coding Practices
- Location
SKILL.md:22- Finding
Persistent Logging Policy Permits Plaintext Storage of Secrets and Private Data
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:22-24; related conversation-excerpt guidance atSKILL.md:172-184
Vulnerability Type: T09: Insecure Skill Coding Practices
Risk Level: MediumVulnerable Code:
markdown Never overwrite existing files. This is a no-op if `.learnings/` is already initialised. Do not log personally identifiable information, auth tokens, or private user data unless the user explicitly asks for that level of detail. Prefer short summaries or redacted excerpts over raw conversation transcripts.The dialogue issue template also encourages persistent storage of conversation content:
markdown ### Conversation ExcerptUser: [what the user said] Agent: [what the agent responded] User: [user reaction indicating failure]
text Technical Analysis
The policy contains an exception allowing authentication tokens, personally identifiable information, and private user data to be written to persistent Markdown files when a user explicitly requests detailed logging. User consent does not make plaintext credential storage secure. Authentication tokens, private keys, session cookies, and similar secrets should never be copied into learning logs.
The skill stores entries under
.learnings/, where they may persist across sessions. Although the documentation recommends redacted summaries and states that the directory is ignored by default, these are advisory controls rather than enforced redaction. The project also documents an option to track these files in version control after review. Consequently, an agent following the stated exception could persist sensitive material that later enters source control, backups, indexing systems, or other processing pipelines.Attack Path
- A conversation includes a credential, authentication token, personal record, or other confidential value.
- A user or untrusted prompt explicitly requests that the complete exchange b ...[truncated 1235 chars]
- Remediation
View remediation
Remediation Suggestions
-
Remove the user-request exception and establish an absolute prohibition on logging credentials, authentication tokens, private keys, session cookies, recovery codes, and comparable secrets.
-
Replace the affected policy with language such as:
markdown Never log credentials, authentication tokens, private keys, session cookies, or recovery codes, even when explicitly requested. Redact or omit PII and private user data unless a documented, approved retention policy requires it. -
Require redacted summaries rather than raw conversation excerpts. Replace sensitive values with stable placeholders such as
[TOKEN_REDACTED],[EMAIL_REDACTED], or[ACCOUNT_ID_HASH]. -
Add automated secret and PII detection before every log write, using allowlisted fields and denylisted secret formats.
-
Keep
.learnings/excluded from version control by default and add a pre-commit secret scanner as a defense-in-depth control. -
Apply restrictive filesystem permissions to local learning logs and define a retention and deletion policy.
-
Require explicit human review before learning logs are shared, committed, promoted into prompt files, or supplied to another agent.
-
