Skip to content

Feature/secret leak detector#8148

Open
MohamedXploit wants to merge 8 commits intomitmproxy:mainfrom
MohamedXploit:feature/secret-leak-detector
Open

Feature/secret leak detector#8148
MohamedXploit wants to merge 8 commits intomitmproxy:mainfrom
MohamedXploit:feature/secret-leak-detector

Conversation

@MohamedXploit
Copy link
Copy Markdown

Implement real-time detection of secrets in HTTP traffic with optional blocking and masking.

Description

Adds a new SecretLeakDetector mitmproxy addon that scans live HTTP traffic for leaked credentials in real time. The addon inspects request/response headers, query parameters, and bodies, and supports optional masking and blocking of detected secrets.
Detection coverage:

Anthropic and OpenAI API keys (modern sk-ant-api03- / sk-proj- formats and legacy sk-)
AWS Access Key IDs and Secret Access Keys (with word-boundary guards to avoid base64 false positives)
JWT tokens, Bearer tokens, Google API keys
GitHub PATs (classic ghp_ and fine-grained github_pat_)

Checklist

  • I have updated tests where applicable.
  • I have added an entry to the CHANGELOG.

@mhils
Copy link
Copy Markdown
Member

mhils commented Apr 10, 2026

Thanks! Can you move this into examples/contrib please?

Implement real-time detection of sensitive information in HTTP traffic with optional blocking and masking.
@MohamedXploit
Copy link
Copy Markdown
Author

Done, I've moved it to examples/contrib. Please let me know if anything else is needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants