- Location
- SKILL.md:84
- Finding
- Raw Error and Environment Logging Can Commit Sensitive Data to Source Control## Vulnerability Details
**File Location**: `SKILL.md:84-100`, `SKILL.md:318-323`
**Vulnerability Type**: Plaintext sensitive-data exposure through diagnostic logging
**Risk Level**: High
### Vulnerable Code
```markdown
### Error
```
Actual error message or output
```
### Context
- Command/operation attempted
- Input or parameters used
- Environment details if relevant
### Suggested Fix
If identifiable, what might resolve this
### Metadata
- Reproducible: yes | no | unknown
- Related Files: path/to/file.ext
- See Also: ERR-20250110-001 (if recurring)
```
```markdown
## Gitignore Options
**Keep learnings local** (per-developer):
```gitignore
.learnings/
```
**Track learnings in repo** (team-wide):
Don't add to .gitignore - learnings become shared knowledge.
```
### Technical Analysis
The prescribed error-entry format tells the agent to copy the actual error output, command inputs, parameters, and environment details into Markdown files. Diagnostic output frequently contains sensitive information, including authorization headers, tokens embedded in URLs, environment-variable values, database connection strings, private paths, customer data, and command-line credentials.
The Skill provides no redaction rules, secret detection, retention limits, file-permission requirements, or prohibited-data list. It also explicitly presents repository tracking as a supported configuration. As a result, sensitive information can move from transient process output into durable plaintext files and then into version-control history.
Git history makes remediation particularly difficult because deleting the current file does not remove the secret from previous commits, forks, CI caches, pull-request diffs, or cloned repositories. Skill extraction and cross-workspace promotion can further expand the exposure.
### Attack Path
1. A Bash command or external API operation fails and prints a token, credential
...[truncated 1386 chars]
- Remediation
- ## Remediation Suggestions
1. Default `.learnings/` to local, ignored storage and require an explicit security decision before repository tracking.
2. Add mandatory redaction instructions before any error or learning is written.
3. Prohibit storing credentials, tokens, cookies, authorization headers, private keys, connection strings, environment-variable values, and personal data.
4. Record environment-variable names only, never their values.
5. Replace raw command output with a minimal sanitized summary and a stable error code.
6. Mask URL query parameters, usernames, filesystem home paths, request bodies, and command-line secret arguments.
7. Run a secret scanner against `.learnings/`, generated Skills, and persistent instruction files before commits or publication.
8. Apply restrictive filesystem permissions to local learning files.
9. Define retention and deletion policies for diagnostic entries.
10. If a secret has already been committed, revoke or rotate it immediately and purge it from Git history, pull-request artifacts, CI logs, caches, and forks.