- Home
- Skills
- Legal & Compliance
- SOC2 & GDPR PII Scrubber: Pre-Audit Codebase Hygiene
Works with the AI Agents you already use
SOC2 & GDPR PII Scrubber: Pre-Audit Codebase Hygiene
Pre-audit compliance scanner for SOC2 Type II, GDPR, and PCI-DSS. Detects unredacted PII in logger calls, leaked Stripe/AWS secrets, plaintext SSNs, and hardcoded tokens before auditors do.
Free
SOC2 & GDPR PII Scrubber: Pre-Audit Codebase Hygiene
Example session with this skill installed
Run a SOC2 and GDPR compliance audit on our codebase and flag any unredacted PII or leaked keys.
- Read your context and instructions
- Compiled the soc2 & gdpr
I scanned your repository for SOC2 Type II, GDPR, and PCI-DSS audit blockers:
Compliance Scorecard
- Files Analyzed: 28 Source Files
- Violations Detected: 4 Critical Issues
- Readiness Status:
[AUDIT_BLOCKED]
Audit Blockers Found
| Severity | Framework | Issue Description | Location | Remediation |
|---|---|---|---|---|
CRITICAL | SOC2 CC6.1 / PCI | Leaked Stripe Live API Key | backend/auth.py:6 | Move key to environment variables and rotate in Stripe |
CRITICAL | SOC2 CC6.6 | Leaked AWS IAM Access Key | backend/auth.py:7 | Inject credentials via IAM instance role |
HIGH | GDPR Art. 32 | Password logged in plaintext | backend/auth.py:11 | Strip password field from log statements |
CRITICAL | GDPR Art. 9 | Raw US Social Security Number | backend/auth.py:14 | Apply AES-256 field-level encryption |
Action Plan & Remediation Snippets
1. Strip Plaintext Credentials from Logs (backend/auth.py:11)
def handle_user_login(user_id, password):
- logger.info(f"User login attempt for {user_id} with password={password}")
+ logger.info(f"User login attempt for {user_id}") # Credentials stripped for GDPR compliance
2. Rotate Leaked API Keys (backend/auth.py:6)
-STRIPE_API_KEY = "sk_live_51MzExampleSecretKey99887766"
+STRIPE_API_KEY = os.getenv("STRIPE_SECRET_KEY")
Next Steps: Resolving these 4 items clears your codebase for clean auditor sign-off.
Connects securely to your tools. The creator never sees your data.
About this skill
SOC2 & GDPR PII Scrubber: Pre-Audit Codebase Hygiene Scanner
Failing an enterprise SOC2 Type II, GDPR, or security review can stall a high-value B2B contract and cost thousands in auditor re-assessment fees.
SOC2 & GDPR PII Scrubber runs completely offline inside your agent, scanning your code, templates, and logger invocations for exposed API credentials (Stripe, AWS, JWTs), un-hashed SSNs, credit cards, and unredacted customer PII in console and logger statements.
Why Every Developer Needs This:
- 100% Local & Offline: Your code never leaves your machine. Scans source files with zero third-party API dependencies.
- Pre-Audit Confidence: Maps every detected vulnerability directly to formal SOC2 Common Criteria (CC6.1, CC6.6, CC6.7) and GDPR Article 32.
- Safe Previews: Automatically masks discovered secrets in report outputs so you can safely share the audit report with your team.
- Actionable Remediation: Provides exact line numbers and code-level fixes to achieve clean auditor sign-off.
What It Catches:
- Leaked Stripe Live Keys: Detects production
sk_live_...secrets hardcoded in source files. - AWS IAM Access Keys: Catches unencrypted
AKIA...keys before they reach GitHub. - Unredacted Logger PII: Flags passwords, tokens, and customer emails logged via
logger.info()orconsole.log(). - Plaintext SSNs & Tax IDs: Identifies un-hashed US Social Security Numbers violating privacy standards.
- Hardcoded JWT / Bearer Tokens: Flags static session tokens embedded in repositories.
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Legal & Compliance.
Requires the codebase files to be accessible to the agent. Large repositories may require scanning by sub-directory.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Free to use
No account required to browse
Trust & safety
Security scan
Security scan passed 3 days ago
- Free with an Agensi account
- Software
Python 3.10+
Runs 100% locally and offline. No code or file contents are ever transmitted over the network.
Permissions
File Scopes