T09 · Insecure Skill Coding Practices
- Location
scripts/audit.sh:149- Finding
Receipt Data Is Persisted Despite a Process-and-Forget Privacy Claim
- Content
View full analysis
Vulnerability Details
File Location:
scripts/audit.sh:149-153
Related Documentation:SKILL.md:548
Vulnerability Type: Plaintext retention of sensitive financial data
Risk Level: MediumVulnerable Code
bash # Save prompt for reference PROMPT_FILE="${SKILL_DIR}/references/last-prompt.txt" mkdir -p "$(dirname "$PROMPT_FILE")" BUILD_PROMPT > "$PROMPT_FILE" echo "" echo "📎 AI prompt saved to: $PROMPT_FILE"The behavior conflicts with the privacy guarantee in
SKILL.md:548:markdown - **Privacy-first**: No data storage — process and forgetTechnical Analysis
BUILD_PROMPTincludes the supplied receipt text, bill file contents, or AA-split configuration. The script unconditionally writes that complete prompt to the predictable plaintext pathreferences/last-prompt.txt.The file is created without an explicit restrictive
umaskor permission mode. Its effective permissions therefore depend on the execution environment. The script also provides no retention period, automatic cleanup, redaction, or option to disable storage.Although each execution overwrites the previous prompt rather than appending to it, the most recently processed financial data remains on disk after execution. This is a direct contradiction of the documented “No data storage — process and forget” behavior.
Attack Path
- A user processes receipt data, an expense file, or an AA configuration containing sensitive financial information.
BUILD_PROMPTincorporates the complete input into the generated prompt.- The script redirects the generated prompt into
references/last-prompt.txt. - The plaintext file remains after the command finishes.
- A later user or process with read access to the project directory retrieves merchant names, transaction dates, amounts, descriptions, or participant names from the retained file.
Impact Assessment
This issue does not grant elevated system privileges and does not transmit data over th ...[truncated 546 chars]
- Remediation
View remediation
Remediation Suggestions
- Remove prompt persistence from the default execution path.
- Require an explicit opt-in option such as
--save-prompt <path>. - If storage is enabled, set restrictive permissions before file creation:
bash umask 077 PROMPT_FILE="$USER_SELECTED_PATH" BUILD_PROMPT > "$PROMPT_FILE" chmod 600 "$PROMPT_FILE"- Reject unsafe destinations and avoid writing into the packaged skill directory.
- Add an explicit cleanup or retention mechanism.
- Redact sensitive fields where full prompt retention is unnecessary.
- Update
SKILL.mdso its privacy statement accurately discloses any remaining storage behavior. - Add a regression test confirming that default execution leaves no receipt or prompt data on disk.
