T09 · Insecure Skill Coding Practices
- Location
SKILL.md:62- Finding
Unscoped Plaintext Persistence and Cross-Session Disclosure of Strategic Data
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 62–73 and 493–501
Vulnerability Type: Unprotected storage and cross-session disclosure of sensitive business data
Risk Level: MediumVulnerable Code
markdown **Step A — Related Decision Discovery** Search for past strategic decisions related to this topic: ```bash mkdir -p ~/.strategic-decisions ls -t ~/.strategic-decisions/*.md 2>/dev/null | head -10If files exist, grep for keyword overlap with the current topic (3-5 key terms). If matches found, surface them:
- "Prior decision found: '{title}' on {date}. Key overlap: {1-line summary}."
- Ask via AskUserQuestion: "Build on this prior decision or start fresh?"
text ```markdown ### Persist Decision (AGGRESSIVE and SELECTIVE modes) After writing the Decision Summary, write it to disk so the thinking survives beyond this conversation. ```bash mkdir -p ~/.strategic-decisions DATETIME=$(date +%Y%m%d-%H%M%S) SLUG=$(echo "$TOPIC" | tr '[:upper:]' '[:lower:]' | sed 's/[^a-z0-9]/-/g' | sed 's/--*/-/g' | cut -c1-40)Write to
~/.strategic-decisions/{date}-{slug}.mdtext ### Technical Analysis The Skill instructs the Agent to persist strategic decision summaries in a predictable, shared home-directory path as plaintext. These records can contain confidential strategy, assumptions, risks, implementation plans, stakeholder information, and other sensitive organizational context. The storage design does not specify restrictive file permissions, encryption, project isolation, user or tenant ownership metadata, retention limits, deletion controls, or content redaction. It also instructs subsequent runs to search these records and disclose matching titles and summaries before obtaining explicit authorization to read historical data. Although the topic-derived filename slug is sanitized and no command-injection path is evident in the shown command, sanitization does not address the confidentiality and isolation weaknesses. ### Atta ...[truncated 1604 chars]- Remediation
View remediation
Remediation Suggestions
-
Require explicit informed consent before persistence
- Default to ephemeral processing.
- Explain what fields will be stored, where they will be stored, and for how long.
- Obtain approval before writing each decision record.
-
Require authorization before historical lookup
- Do not automatically inspect prior records.
- Ask whether the user wants to search a specified project-scoped history.
- Do not reveal titles, dates, summaries, or excerpts until access is authorized.
-
Isolate records by user, tenant, and project
- Use a storage path tied to verified ownership and project identity.
- Prevent unrelated sessions from searching a global home-directory collection.
- Enforce access checks before reading or listing records.
-
Apply restrictive filesystem permissions
- Create storage directories with mode
0700. - Create decision files with mode
0600. - Set a restrictive
umask, such as077, before creation. - Reject storage locations with unsafe ownership or permissions.
- Create storage directories with mode
-
Minimize and protect persisted content
- Redact credentials, personal data, customer information, and confidential raw context.
- Store only the minimum summary required for the feature.
- Use encryption at rest with keys scoped to the authorized user or project where feasible.
-
Add lifecycle controls
- Define an expiration period.
- Provide commands to list, inspect, export, and securely delete stored decisions.
- Avoid including these files in general-purpose backups unless explicitly approved.
-
Limit search disclosure
- Return only opaque record identifiers initially.
- Require explicit selection before loading content.
- Record access events in an audit log without logging sensitive document contents.
-
