other
- Location
references/workflow-pr.md:20- Finding
Mandatory Full Prompt-History Publication May Expose Sensitive Information
- Content
View full analysis
Vulnerability Details
File Location:
references/workflow-pr.md:20-39; related instructions inSKILL.md:17-27and output fields inreferences/pr-human-template.md:20-31
Vulnerability Type: Sensitive Data Exposure
Risk Level: MediumVulnerable Code
markdown - Use `/tmp` + `gh pr edit --body-file` for updates. - Create PR with `gh pr create` if not already open. - Default PRs to draft until tests + review pass; ask user before marking ready. ## Prompt History Requirements - Include ISO-8601 timestamps with timezone. - Prefer agent history search tools (`cm`/`cass`, Codex logs, etc.); if unavailable, fall back to manual logs and note the fallback. - Include the full prompt history verbatim; do not omit prompts. - If a prompt contains sensitive info, redact only the sensitive portion and keep the entry. - Always include Environment metadata under Prompt History: - Harness - Model - Thinking level - Terminal - System - Use `scripts/build_pr_body.sh` to collect environment fields when possible. - If any field is unknown, ask the user to fill it. - Format prompt history as a table: `ISO-8601` | `prompt` and wrap prompts in inline code (use double backticks if the prompt contains backticks). - For very long prompts (>200 chars), consider using heading+codeblock format instead of table rows to avoid rendering issues.The corresponding PR template creates designated publication fields:
markdown # Prompt History ## Environment Harness: <value> Model: <value> Thinking level: <value> Terminal: <value> System: <value> ## Prompts | ISO-8601 | Prompt | | --- | --- | | <timestamp> | `<prompt text>` |Technical Analysis
The skill requires an agent to search local agent histories, collect the complete prompt history verbatim, and place it in a pull-request body that is published through GitHub CLI ...[truncated 2251 chars]
- Remediation
View remediation
Remediation Suggestions
- Make prompt-history publication explicitly opt-in rather than mandatory.
- Restrict history collection to prompts from the current task or session that are directly relevant to the change.
- Replace the default full-history requirement with a task-relevant summary or references to privately retained audit records.
- Require explicit user approval of the complete rendered PR body before any
gh pr createorgh pr editcommand. - Run automated secret, credential, PII, and high-entropy-token scanning against the generated body before publication.
- Allow complete omission of sensitive or unrelated entries instead of requiring that every prompt remain present after partial redaction.
- Clearly warn users that public PR bodies and notifications may retain disclosed data even after editing.
- Create temporary files with owner-only permissions, such as through a restrictive
umaskandmktemp, and delete them immediately after use. - Collect only environment fields necessary for review and allow users to omit terminal, system, model, or harness metadata where disclosure is unnecessary.
