T09 · Insecure Skill Coding Practices
- Location
SKILL.md:45- Finding
Sensitive Context and Local Metadata May Be Published Without Safeguards
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 45–49 and 63–71
Vulnerability Type: Sensitive information exposure through unsafe issue-generation requirements
Risk Level: MediumRelevant Code Snippet:
markdown - `--session-id` (str): Session ID. Canonical source: `$CLAUDE_SESSION_ID` env var, fallback: UTC timestamp `YYYYMMDD-HHMMSS` - `--artifact-path` (str): Absolute path or `$HOME`-based path to source artifact - `--captured-by` (str): `explicit` (default) or `safety-net`markdown **Source:** <source> (session <session-id>) **Captured:** <YYYY-MM-DD> **Branch:** <current git branch> **Captured by:** <explicit|safety-net> ### Context <context argument verbatim> ### Original Artifact <artifact-path if provided, otherwise "N/A">Technical Analysis
The deferred-capture contract directs conforming wrappers to include a session identifier, current Git branch, context supplied verbatim, and an optional absolute or home-based local path in a GitHub issue. GitHub issues are remote records whose audience depends on repository visibility and collaborator access.
The specification does not require secret detection, redaction, repository-visibility validation, path normalization, a sanitized preview, or explicit confirmation before publication. Consequently:
- Verbatim context can contain API keys, access tokens, internal URLs, customer data, or confidential discussion.
- An absolute or
$HOME-based path can disclose usernames, workstation directory layouts, internal project names, or mounted resources. - Branch names can reveal unreleased features, incident identifiers, customer names, or internal ticket references.
- Session identifiers can expose operational metadata and facilitate correlation across logs or systems.
This is a specification-level insecure coding practice. The repository contains documentat ...[truncated 1684 chars]
- Remediation
View remediation
Remediation Suggestions
- Do not publish
$CLAUDE_SESSION_IDby default. Use a newly generated non-sensitive correlation identifier where tracking is necessary. - Replace absolute and
$HOME-based paths with repository-relative paths or basenames. Reject paths outside the repository root unless the user explicitly approves them. - Add secret scanning and redaction for common API keys, tokens, private keys, credentials, connection strings, and sensitive URL parameters.
- Sanitize branch names and all user-controlled fields, including control characters and unexpected markup.
- Present the complete, sanitized issue title and body for review before remote submission.
- Require explicit confirmation for non-dry-run creation, especially when the target repository is public.
- Document that context must not contain secrets, personal data, customer information, or confidential discussion.
- Add automated tests confirming that sensitive values and absolute paths are blocked or redacted.
- Prefer an allowlist of necessary metadata rather than transmitting all available contextual information.
- Do not publish
