# Pre-PR Security & Secret Audit

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

Pre-PR Security & Secret Audit is a paid AI agent skill on Agensi by LegitAntiAA, in Security. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: $5 (one-time purchase)
- Creator: [LegitAntiAA](https://www.agensi.io/creators/legitantiaa)
- Category: [Security](https://www.agensi.io/skills/security)
- Version: 1.0
- Last updated: 2026-11-18
- Security: scan passed (2026-11-18); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/pre-pr-security-secret-audit
- Tags: security, code-review, testing, git, secrets-detection

## 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
1. **Target Identification** via `git diff --staged` or specific file path inspection.
2. **Pattern Scanning** across the codebase for vulnerabilities defined in the security checklist.
3. **Risk Categorization** based on severity levels from LOW to CRITICAL.
4. **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 `.env` variables 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.

## Requires

- Git

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the Pre-PR Security & Secret Audit skill from Agensi" and describe your task.
3. Buy it on the listing or let your agent ask you first; your agent then loads it from Agensi when it needs it. Every paid skill has a money-back guarantee: https://www.agensi.io/docs/money-back-guarantee

## Frequently asked questions

### What specific types of hardcoded secrets can this skill detect?

This skill identifies a wide range of sensitive data, including API keys (AWS, Stripe, etc.), Bearer tokens, private SSH keys, database connection strings, and exposed .env files that may have been accidentally staged.

### Does this skill work with any programming language?

Yes, it is language-agnostic. While it is optimized for popular stacks like Node.js, Python, and SQL, it scans any text-based source code or configuration file for security patterns and vulnerabilities.

### How do I target only my current changes instead of my entire repository?

Simply provide the agent access to your local repository; it uses standard git commands to target staged changes, ensuring only your newest code is audited without scanning the entire legacy codebase.

### What kind of output should I expect when a security flaw is found?

The skill provides a structured report categorizing findings by severity (Low to Critical) along with specific remediation advice or code patches to fix the vulnerability immediately.

### Does this skill perform live penetration testing or dynamic analysis?

This skill focuses on static analysis of code and configurations; it does not perform dynamic runtime testing (DAST) or verify if a detected API key is currently active or revoked.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
