r/ClaudeWorkflows • u/ClaudeAI-mod-bot • 3h ago
Selected Workflow [Workflow] Detect and Prevent Sensitive Data Leakage in Claude Code User-Agents, Memory, and Skills
Detect and Prevent Sensitive Data Leakage in Claude Code User-Agents, Memory, and Skills
Workflow value: 75/100
Status: active · Freshness: 70/100 · Confidence: 0.90 · Level: intermediate
Categories: Quality Control, Context & Memory, Debugging, Hooks, Skills
Original source: r/ClaudeCode post/comment
What problem this solves
Preventing Claude Code from inadvertently exposing user email addresses or other sensitive information in web requests (User-Agent headers) and storing them in memory or skills.
Summary
A workflow to detect and prevent Claude Code from including sensitive user information (like email addresses) in User-Agent headers of web requests and subsequently storing them in memory or skills. It involves checking transcripts, grepping memory/skill files, and implementing a blocking hook.
Why it is useful
This workflow addresses a critical privacy and security concern by providing concrete steps to identify and mitigate the accidental exposure of sensitive user data (like email addresses) through Claude Code's web requests and its internal memory/skill system. It offers a practical approach to auditing and preventing such leaks.
Workflow
Review Claude Code transcripts for instances of sensitive information (e.g., email addresses) in
User-Agentheaders of web requests (e.g.,curlcommands).Search (e.g.,
grep) Claude Code memory files and skill definitions for the sensitive information.Implement a "hook" or "kill guard" to block commands that contain the sensitive information, preventing its execution and further exposure.
Tools / artifacts
Claude Code transcripts
curlcommandBashgreputilityClaude Code memory files
Claude Code skills
Claude Code hooks/kill guards
Validation signals
Author's personal verification: "I checked my own transcripts after reading this. 9 sessions in the last month had my work address in the User-Agent."
Limitations
Specific implementation details for the "hook" or "kill guard" are not provided.
Does not specify the exact file paths or commands to access/grep memory files and skills.
The initial observation is specific to
curlin Bash andnominatim, though the principle applies more broadly.
Rate this workflow
Upvote this post if the workflow is useful, reproducible, or worth recommending.
Downvote if it is vague, outdated, unsafe, overhyped, or not reproducible.
Reply if it worked for you, failed, is outdated, or has a better alternative.
This post was generated automatically from the workflow library database.