agentleFS
jggomezjggomez/expert-ai-developer-skills/skills/security-audit/SKILL.md

security-audit

Skill30 starsChanged 4 days agoApache-2.0View on GitHub

Conducts comprehensive security reviews on source code, infrastructure as code (IaC), and architectural designs. It identifies vulnerabilities such as injection flaws, broken access control, and exposure of sensitive data. Use this skill when asked to perform a security audit, a pentest review, check for OWASP Top 10 violations, or ensure compliance with security best practices.

We split this skill into the rules it gives an agent

6 rules. 0 are common, 3 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 174 edited versions we read keep these.

  • 3

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    A01: Broken Access Control: Verify object-level permissions (IDOR protection) on every protected route.

    line 34
  2. Distinctive:

    A02: Cryptographic Failures: Ensure secure algorithms (AES-GCM, Argon2/bcrypt), strong TLS, and zero hardcoded keys.

    line 35
  3. Very specific:

    A03: Injection: Verify parameterized queries (SQL, NoSQL, ORM) and safe subprocess execution (avoiding shell=True).

    line 36
  4. Distinctive:

    A05: Security Misconfiguration: Check default credentials, permissive CORS headers, and overly verbose stack trace exposures.

    line 37
  5. Very specific:

    A07: Identification and Authentication Failures: Check session expiration, brute force protections, and secure cookie attributes (HttpOnly, …

    line 38
  6. Very specific:

    Claude Code: Run secret_scanner.py via bash, then audit diffs manually against the OWASP checklist.

    line 65

“Common” is measured: kept by at least 6 in 10 of the 174 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Security Audit Skill

Overview

This skill conducts systematic security reviews across source code, infrastructure declarations, and architectural boundaries. It acts as a Senior Security Architect and Lead Penetration Tester operating under a Zero Trust mindset. It proactively identifies vulnerabilities, assesses exploitability, prevents credential leaks, and delivers actionable, production-ready remediation code blocks.

When to Use

Trigger Scenarios

  • Auditing codebases, branches, or PR diffs for OWASP Top 10 vulnerabilities (Injection, Broken Access Control, SSRF, etc.).
  • Scanning repositories for committed secrets, API keys, private tokens, and certificates.
  • Reviewing authentication, authorization, cryptography, and input validation implementations.
  • Performing pre-release security verification and compliance posture audits.

When NOT to Use

  • Code style, whitespace, and formatting linting: Route to build-and-ci-gates.
  • Performance latency profiling: Route to performance-scalability.
  • Architectural pattern design: Route to senior-architect-engineering.
  • General unit testing: Route to test-driven-development.

Process

Phase 1: Automated Secret & Pattern Scanning

Execute the automated scanner to detect leaked API tokens, private keys, and high-risk API invocations:

python3 ./skills/security-audit/scripts/secret_scanner.py [optional_path_to_scan]

The scanner checks for AWS/GCP tokens, private keys, hardcoded passwords, and risky calls (eval, exec, unescaped raw queries).

Phase 2: OWASP Top 10 Codebase Audit

Review critical components against the security checklist:

  • A01: Broken Access Control: Verify object-level permissions (IDOR protection) on every protected route.
  • A02: Cryptographic Failures: Ensure secure algorithms (AES-GCM, Argon2/bcrypt), strong TLS, and zero hardcoded keys.
  • A03: Injection: Verify parameterized queries (SQL, NoSQL, ORM) and safe subprocess execution (avoiding shell=True).
  • A05: Security Misconfiguration: Check default credentials, permissive CORS headers, and overly verbose stack trace exposures.
  • A07: Identification and Authentication Failures: Check session expiration, brute force protections, and secure cookie attributes (HttpOnly, Secure, SameSite).

Phase 3: Vulnerability Reporting & Remediation

For every security vulnerability found, produce a formal finding report:

### [SEV] Vulnerability Title
- **Severity**: CRITICAL | HIGH | MEDIUM | LOW
- **CWE / OWASP**: (e.g. CWE-89 / OWASP A03:2021-Injection)
- **Location**: `path/to/file.py:42`
- **Exploit Scenario**: Concrete example of how an attacker could leverage the flaw.
- **Remediation**: Corrected, secure drop-in code block.

Usage

Commands & Automation Scripts

# Scan whole workspace or a specific target directory for leaked secrets
python3 ./skills/security-audit/scripts/secret_scanner.py .
python3 ./skills/security-audit/scripts/secret_scanner.py src/

Example Prompts

  • "Run a security audit on our user authentication controller for OWASP Top 10 issues."
  • "Scan this repository for hardcoded secrets, private tokens, or credential leaks."
  • "Audit this payment webhook handler for replay attacks, signature verification, and injection vulnerabilities."

Host Execution Instructions

  • Claude Code: Run secret_scanner.py via bash, then audit diffs manually against the OWASP checklist.
  • Antigravity: Launch security audits before merging code changes or declaring a feature release-ready.

Red Flags

  • Hardcoded passwords, API keys, JWT secrets, or private keys committed to the repository.
  • String concatenation or f-strings used to assemble SQL queries or shell commands.
  • Catching exceptions silently without logging security-relevant failures (auditing blind spots).
  • Running subprocesses with shell=True using untrusted inputs.
  • Storing passwords with reversible encryption or weak hashing (MD5, SHA1, plain SHA256 without salt).

Verification

  • Secret scanner executes cleanly with zero leaked credentials detected:
    python3 ./skills/security-audit/scripts/secret_scanner.py .
  • Zero unparameterized SQL queries or shell injection hazards exist.
  • Authentication and authorization checks verified on all external endpoints.
  • All reported vulnerabilities contain concrete exploit scenarios and verified remediation code.

References

For detailed vulnerability patterns and verification checklists:

  • Security Audit & OWASP Checklist

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.