T09 · Insecure Skill Coding Practices
- Location
SKILL.md:38- Finding
Persistent Logging of Potentially Sensitive Operational Metadata Without Safeguards
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:38-52
Vulnerability Type: Persistent plaintext storage of potentially sensitive operational metadata
Risk Level: Mediummarkdown Maintain a running daily cost log in your memory files:text ## Daily Cost Log — [DATE] | Time | Model | Tokens (in/out) | Est. Cost | Task Type | Description | |------|-------|-----------------|-----------|-----------|-------------|2. Action Logging
Every significant action gets logged with:
- Timestamp: When it happened
- Action type: Post, reply, API call, file read, file write, skill use, tool use
- Target: Where/what was affected
- Outcome: Success, failure, or partial
- Cost: If applicable
text ### Technical Analysis The skill instructs the agent to maintain persistent cost and action records in its memory files. The action records include file operations, API calls, tool usage, affected targets, descriptions, and outcomes. These fields can contain sensitive filenames, filesystem paths, resource identifiers, user context, API operation details, or other operational metadata. No requirements are provided for user consent, data minimization, access control, encryption, redaction, retention periods, or secure deletion. Persisting this information in general-purpose agent memory can expose it to future sessions, other installed skills, or any process with access to that memory. This is an insecure data-handling practice rather than evidence of deliberate exfiltration. The audited project contains no script or instruction that transmits the stored records to the promotional domains or another remote service. ### Attack Path 1. A user or automated task causes the agent to read a sensitive file, invoke an API, use a tool, or operate on a sensitive target. 2. Following the skill instructions, the agent records the action type, target, description, and outcome in a persistent memo ...[truncated 1155 chars]- Remediation
View remediation
Remediation Suggestions
- Require explicit user opt-in before enabling persistent operational logging.
- Store logs in a dedicated, access-controlled location rather than general-purpose agent memory.
- Default to aggregated metrics, such as total token usage and cost, instead of recording individual file, API, and tool targets.
- Redact credentials, authorization headers, tokens, personal data, URL query strings, sensitive paths, and resource identifiers before storage.
- Define a short retention period and automatically delete records after expiration.
- Provide commands to inspect, export, disable, and securely erase collected records.
- Apply least-privilege filesystem permissions and encryption at rest where supported.
- Document exactly what is collected, where it is stored, who can access it, and how long it is retained.
- Avoid logging action descriptions or notes unless necessary; use predefined event categories and sanitized identifiers.
- Add explicit instructions prohibiting other skills or reporting features from transmitting logs without separate, informed authorization.
