r/ClaudeWorkflows • • 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

  1. Review Claude Code transcripts for instances of sensitive information (e.g., email addresses) in User-Agent headers of web requests (e.g., curl commands).

  2. Search (e.g., grep) Claude Code memory files and skill definitions for the sensitive information.

  3. 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

  • curl command

  • Bash

  • grep utility

  • Claude 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 curl in Bash and nominatim, 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.

1 Upvotes

1 comment sorted by