Pre-PR Security & Secret Audit
by LegitAntiAA
Run a fast pre-commit / pre-PR security audit on your git diff: catches hardcoded API keys, SQL/command injections, XSS, auth gaps, and outputs drop-in fixes.
$5
Pre-PR Security & Secret Audit
Example session with this skill installed
Scan my staged changes for any security issues or secrets before I commit this.
- Read your context and instructions
- Compiled the pre-pr security
I have audited the staged changes in 3 files. I found one critical secret leak and one high-severity injection risk.
Verdict: BLOCK
Security Audit Findings
| Severity | File:Line | Issue Summary | Recommended Fix |
|---|---|---|---|
| CRITICAL | src/config.py:12 | Hardcoded OpenAI API Key | Move to environment variable and add .env to .gitignore. |
| HIGH | src/db.py:45 | Potential SQL Injection via string formatting | Use parameterized queries (e.g., cursor.execute("... WHERE id = %s", (user_id,))). |
| MEDIUM | docker-compose.yml:8 | Plaintext DB password in config | Use Docker secrets or a .env file for the POSTGRES_PASSWORD. |
Recommended Patches
Fix SQL Injection in src/db.py
# Before
query = f"SELECT * FROM users WHERE username = '{username}'"
cursor.execute(query)
# After
query = "SELECT * FROM users WHERE username = %s"
cursor.execute(query, (username,))
Fix Secret Leak in src/config.py
# Before
OPENAI_API_KEY = "sk-proj-492k...8f2a"
# After
import os
OPENAI_API_KEY = os.getenv("OPENAI_API_KEY")
Next steps
- Run
git reset src/config.pyto unstage the secret. - Apply the parameterized query fix to
src/db.py. - Rotate the leaked OpenAI key immediately as it was present in the working directory.
Connects securely to your tools. The creator never sees your data.
About this skill
Manual security reviews are slow and often skip the most dangerous risks: leaked credentials and injection vulnerabilities. This skill audits your git diffs or local files to identify security flaws before they reach your CI pipeline or main branch.
What it does
- Secret Detection identifies hardcoded API keys, bearer tokens, private keys, and connection strings.
- Injection Analysis scans for SQL injection, command injection, and XSS patterns in new code.
- Access Control Audit flags missing auth checks, path traversal risks, and insecure CORS configurations.
- Data Exposure Check catches PII in logs, unmasked error traces, and insecure debug flags.
- Network Security detects disabled TLS verification and suspicious dependency patterns.
How it works
- Target Identification via
git diff --stagedor specific file path inspection. - Pattern Scanning across the codebase for vulnerabilities defined in the security checklist.
- Risk Categorization based on severity levels from LOW to CRITICAL.
- Reporting via a structured finding table and recommended patches for immediate remediation.
Frameworks & tools
Works with any language or framework visible to the agent. Specifically optimized for identifying patterns in SQL, Shell scripts, React/Node.js, Python, and configuration files like .env or YAML.
Why this beats prompting it yourself
Generic prompts often miss masked secrets or fail to correlate unsanitized inputs with sensitive sinks like os.system or dangerouslySetInnerHTML. This skill uses a systematic checklist to ensure consistent coverage across auth, networking, and data handling.
Use cases
- Auditing a feature branch before opening a Pull Request.
- Scanning staged changes for accidentally included
.envvariables or keys. - Checking new API endpoints for missing authorization middleware.
- Verifying that database queries in new modules use parameterized inputs.
Known limitations
Does not perform dynamic analysis or reach out to external vulnerability databases. Masking of secrets may vary by token length.
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
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 16 days ago
- Software
Git
Permissions
What's inside
Frequently Asked Questions
New in Security
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Security.