T05 · Unauthorized Access and Privilege Escalation
- Location
SKILL.md:193- Finding
Deep analysis mode accesses full session transcripts without explicit scope or sensitive-data controls
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 193-222
Vulnerability Type: Excessive access to potentially sensitive session data
Risk Level: MediumComplete Vulnerable Snippet
markdown When `--deep` is requested, the skill uses the `entire` CLI to query shadow branch data: ```bash # Check availability entire --version # List recent checkpoints as JSON (id, date, session_id, message, tool_use_id) entire rewind --list # Read a checkpoint's full transcript entire explain --checkpoint <id> --full --no-pager # Or raw JSONL entire explain --checkpoint <id> --raw-transcript --no-pager # Filter to one session entire explain --session <session-id-prefix> # Generate AI summary (expensive, use sparingly) entire explain --checkpoint <id> --generateIf
entireis not installed or the current repo doesn't have Entire enabled,--deepfalls back to.learnings/-only mode and reports the limitation in the gap report.What to extract from a trace
For each checkpoint within the time window, parse the raw transcript and look for:
- Tool call repetition — same tool + similar args > 3 times → likely a retry loop. Pattern-key:
retry-loop.<tool> - User correction markers — user messages containing "no", "wrong", "actually", "instead" immediately after an agent action → Pattern-key:
correction.<area> - Error patterns in tool output — matches against the same regex set as
error-detector.sh(error, failed, Traceback, etc.) → Pattern-key:error.<category> - Handoff triggers — context-surfing exit events and which drift signals fired → Pattern-key:
drift.<signal> - Approach changes — agent switching strategy mid-task without explicit pivot → Pattern-key:
approach-switch.<domain> - Token anomalies — sessions with token count > 2x the median for similar task types → Pattern-key: `c ...[truncated 2573 chars]
- Tool call repetition — same tool + similar args > 3 times → likely a retry loop. Pattern-key:
- Remediation
View remediation
Remediation Suggestions
- Require explicit, informed confirmation before enabling
--deep, including a warning that complete transcripts may contain sensitive information. - Restrict enumeration and retrieval to the current repository, authorized user, requested sessions, and an explicit date range. Reject checkpoints whose ownership or repository association cannot be verified.
- Default to metadata and derived statistics. Retrieve full or raw transcripts only when strictly necessary for a specifically selected checkpoint.
- Introduce secret and sensitive-data redaction before parsing or reporting. Cover API keys, access tokens, passwords, private keys, authorization headers, environment variables, and common personal-data formats.
- Do not include raw prompts, tool output, file contents, session IDs, or full checkpoint IDs in reports. Use minimal sanitized summaries and truncated opaque references.
- Add configurable allowlists and denylists for sessions, paths, tools, and transcript fields.
- Ensure generated reports have restrictive file permissions and a documented retention policy.
- Record which checkpoints were accessed and why, without placing transcript contents in the audit log.
- Document that
entire explain --generatemay involve a separate AI-processing path, and require explicit approval before using it when transcript data may leave the local trust boundary.
- Require explicit, informed confirmation before enabling
