mukul975/anthropic-cybersecurity-skills/testing-for-sensitive-data-exposure
Claude Code and agent skill by mukul975/anthropic-cybersecurity-skills
- community
Checking that the SKILL.md file is still in the repository.
Identifying sensitive data exposure vulnerabilities including API key
Install
npx vskill@latest install mukul975/anthropic-cybersecurity-skills/testing-for-sensitive-data-exposureSKILL.md
The same SKILL.md was published earlier as mukul975/anthropic-cybersecurity-skills/testing-for-sensitive-data-exposure.
Testing for Sensitive Data Exposure
When to Use
- During authorized penetration tests when assessing data protection controls
- When evaluating applications for GDPR, PCI DSS, HIPAA, or other data protection compliance
- For identifying leaked API keys, credentials, tokens, and secrets in application responses
- When testing whether sensitive data is properly encrypted in transit and at rest
- During security assessments of APIs that handle PII, financial data, or health records
Prerequisites
- Authorization: Written penetration testing agreement with data handling scope
- Burp Suite Professional: For intercepting and analyzing responses for sensitive data
- trufflehog: Secret scanning tool (
pip install trufflehog) - gitleaks: Git repository secret scanner (
go install github.com/gitleaks/gitleaks/v8@latest) - curl/httpie: For manual endpoint testing
- Browser DevTools: For examining local storage, session storage, and cached data
- testssl.sh: TLS configuration testing tool
Workflow
Step 1: Scan for Secrets in Client-Side Code
Search JavaScript files, HTML source, and other client-side resources for exposed secrets.
Step 2: Analyze API Responses for Data Over-Exposure
Check if API endpoints return more data than necessary.
Step 3: Test Data Transmission Security
Verify that sensitive data is encrypted during transmission.
Step 4: Examine Browser Storage for Sensitive Data
Check local storage, session storage, cookies, and cached responses.
Step 5: Scan Git Repositories and Source Code for Secrets
Search for accidentally committed secrets in version control.
Step 6: Test Data Masking and Redaction
Verify that sensitive data is properly masked in the application.
Key Concepts
| Concept | Description | |
|---|---|---|
| Sensitive Data Exposure | Unintended disclosure of PII, credentials, financial data, or health records | |
| Data Over-Exposure | API returning more data fields than the client needs | |
| Secret Leakage | API keys, tokens, or credentials exposed in client-side code or logs | |
| Data at Rest | Sensitive data stored in databases, files, or backups without encryption | |
| Data in Transit | Sensitive data transmitted over network without TLS encryption | |
| Data Masking | Replacing sensitive data with redacted values (e.g., showing last 4 digits of credit card) | |
| PII | Personally Identifiable Information - data that can identify an individual | |
| Information Leakage | Excessive error messages, stack traces, or debug information in responses |
Tools & Systems
| Tool | Purpose | |
|---|---|---|
| Burp Suite Professional | Response analysis and regex-based sensitive data scanning | |
| trufflehog | Secret detection across git repos, filesystems, and cloud storage | |
| gitleaks | Git repository scanning for hardcoded secrets | |
| testssl.sh | TLS/SSL configuration assessment | |
| git-dumper | Downloading exposed .git directories from web servers | |
| SecretFinder | JavaScript file analysis for exposed API keys and tokens | |
| Retire.js | Detecting JavaScript libraries with known vulnerabilities |
Common Scenarios
Scenario 1: API Key in JavaScript Bundle
The application's JavaScript bundle contains a hardcoded Google Maps API key and a Stripe publishable key. The Stripe key has overly broad permissions, allowing the attacker to create charges.
Scenario 2: User API Returns Password Hashes
The /api/users endpoint returns complete user objects including bcrypt password hashes. Attackers can extract hashes and attempt offline cracking.
Scenario 3: PII in Cached API Responses
The user profile API endpoint returns full SSN and credit card numbers without masking. The endpoint does not set Cache-Control: no-store, so responses are cached in the browser and proxy caches.
Scenario 4: Git Repository with Database Credentials
The .git directory is accessible on the production server. Using git-dumper, the attacker downloads the repository history, finding database credentials committed in an early commit that were later "removed" but remain in git history.
Output Format
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/testing-for-sensitive-data-exposure/SKILL.md
Popularity
- Repository stars
- 33,535
- Repository forks
- 4,068
- 7-day trend score
- 52
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 8 May 2026, 6 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/mukul975/anthropic-cybersecurity-skills/testing-for-sensitive-data-exposure)