codebase-security-audit

codebase-security-audit is a skill for Claude Code, Codex from d-padmanabhan/agent-engineering-handbook. It costs 175 tokens per session (5,054 once invoked), scanned A, original, MIT.

A structured security review of a software codebase. It checks source code, dependencies, configuration, infrastructure, data flows, exposed secrets, and running behavior for security problems.

In plain words
What is it for?
Use it to audit a repository, scan dependencies and infrastructure, check for committed secrets, investigate security incidents, or add security checks to CI/CD.
Why use it?
It helps find vulnerabilities and leaked credentials before they are abused, then organizes the findings by severity and suggested remediation.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to audit a repository, scan dependencies and infrastructure, check for committed secrets, investigate security incidents, or add security checks to CI/CD.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/d-padmanabhan/agent-engineering-handbook/codebase-security-audit
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add d-padmanabhan/agent-engineering-handbook --skill codebase-security-audit
Clone the repo
git clone --depth 1 https://github.com/d-padmanabhan/agent-engineering-handbook

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for codebase-security-audit

README.md
[![agentmods](https://agentmods.dev/badge/skills/d-padmanabhan/agent-engineering-handbook/codebase-security-audit/github.svg)](https://agentmods.dev/skills/d-padmanabhan/agent-engineering-handbook/codebase-security-audit)
Your own site
<a href="https://agentmods.dev/skills/d-padmanabhan/agent-engineering-handbook/codebase-security-audit"><img src="https://agentmods.dev/badge/skills/d-padmanabhan/agent-engineering-handbook/codebase-security-audit/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for codebase-security-audit

Your own site · 80×15
<a href="https://agentmods.dev/skills/d-padmanabhan/agent-engineering-handbook/codebase-security-audit"><img src="https://agentmods.dev/badge/skills/d-padmanabhan/agent-engineering-handbook/codebase-security-audit.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 175 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,054 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 11 findings, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Privilege Escalation · line 3
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • high Privilege Escalation · line 387
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • high Privilege Escalation · line 102
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • high Tool Misuse · line 333
    Code deploys a privileged Kubernetes workload (privileged container, hostPath mount, or host namespaces). This grants root on the node and is a node/cluster takeover vector.
    Fix: Remove privileged, hostPath, and host-namespace settings from workloads. Use a least-privilege securityContext, drop capabilities, and avoid mounting the host filesystem.
  • high Privilege Escalation · line 391
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • high Privilege Escalation · line 392
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • high Privilege Escalation · line 425
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • high Tool Misuse · line 515
    Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
    Fix: Validate all tool parameters against an allowlist. Reject dangerous parameter values (shell=True, --force, -rf /) and use safe defaults.
  • medium Tool Misuse · line 185
    Tool defaults are unsafe or overly permissive (e.g. disabled TLS verification, no authentication, world-writable permissions). Unsafe defaults widen the attack surface.
    Fix: Override unsafe defaults with secure settings (verify=True, auth required, restrictive permissions). Review and harden all tool configurations.
  • medium MCP Rug Pull · line 364
    Docker image references without a specific tag (:latest is implicit) or digest (@sha256:...) can be silently replaced by a malicious image.
    Fix: Pin the image: image:tag or image@sha256:abc123
  • medium MCP Rug Pull · line 368
    Docker image references without a specific tag (:latest is implicit) or digest (@sha256:...) can be silently replaced by a malicious image.
    Fix: Pin the image: image:tag or image@sha256:abc123
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00175 $0.05054
Opus 5.5 $0.00070 $0.02022
Sonnet 5.5 $0.00035 $0.01011
Haiku 4.5 $0.00017 $0.00505

Measured 10d ago against content hash 88bf4274acd0, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

codebase-security-audit scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/codebase-security-audit/SKILL.md · 355 lines

How it starts

The opening of the file, as written. The whole thing — 355 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Codebase Security Audit and Remediation

A systematic, evidence-gated security review. Scanners and manual hunting generate leads; only leads that survive an independent attempt to refute them become findings. Results feed a remediation plan and continuous CI scanning.

Companion rules:

  • 310-security.mdc - secure-coding principles, OWASP Top 10, secret handling
  • 316-zero-trust.mdc - Zero Trust principles
  • 130-git.mdc and 020-agent-audit.mdc - authorization for history rewrites, force pushes, and remote mutations
  • 160-github-actions.mdc - secure CI workflow patterns

When to Invoke

Use when the user asks to:

  • "Security audit" / "harden this repo" / "check for vulnerabilities" / "pen test the code"
  • "Find committed secrets" / "scan for credentials"
  • "OWASP audit" / "Top 10 review"
  • "SAST scan" / "SCA / dependency audit" / "IaC audit" / "DAST validation"
  • "Set up continuous security scanning"
  • Triage a security incident in a codebase

Modes and Authorization

Guidance mode (default). Answer security questions, review the code the user points to, and explain risks. Write no files, run nothing that executes target code, and send no network traffic to the target.

Full audit mode. Use only when the user explicitly asks for an audit or penetration test of the codebase. If the request is ambiguous, ask one question to choose the mode before doing anything.

Loading this skill does not authorize any of the following. Each requires a separate, explicit authorization that names its scope:

  • live or active testing of any deployed system (Phase 10);
  • live verification of discovered secrets with their issuing providers;
  • edits to target source, configuration, or generated remediation files;
  • history rewrites, force pushes, or any other remote mutation; and
  • sending target code or findings to third-party services.

Write audit output to a private directory under $TMPDIR by default. Use an in-repository path such as .agent/reports/security-audit/<date>/ only after git check-ignore confirms it is ignored, and exclude it from every scanner so later runs do not re-scan earlier output. Never write scanner output to the repository root and never commit it. The audit describes fixes; it does not apply them until the user approves remediation.

Read the full file on GitHub · 355 lines

Files

What ships with it

6 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago Changed · -215 lines · +3 tokens per session 88bf4274acd0
  2. 3mo ago First seen · 570 lines · 172 tokens per session scan A 2747c94ba0f5

Subscribe to this mod's changes

codebase-security-audit is a skill published in the GitHub repository d-padmanabhan/agent-engineering-handbook (21 stars, last pushed 9d ago), licensed MIT. It adds 175 tokens to every session and 5,054 once invoked, about $0.0007 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

codebase-security-audit compared with skills from other repositories

codebase-security-audit next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
codebase-security-auditd-padmanabhan/agent-engineering-handbookSkill219d agoMITA175Claude Code, Codex
local-ai-agentsmicrosoft/ai-agents-for-beginnersSkill82ktodayMITA200Claude Code, Codex
imagegenopenai/codexSkill137ktodayApache-2.0A113Codex
playwright-climicrosoft/playwrightSkill102kyesterdayApache-2.0A19Claude Code
browser-automationopenclaw/openclawSkill396ktodayMITA36Claude Code
free-llm-apismnfst/awesome-free-llm-apisSkill15kyesterdayCC0-1.0A113Claude Code, Codex
next-cache-components-adoptionvercel/next.jsSkill144ktodayMITA95Claude Code