security-audit

security-audit is a skill for Claude Code from asgarovf/locusai. It costs 35 tokens per session (1,683 once invoked), scanned A, original, MIT.

A security review of application code, dependencies, and infrastructure to find weaknesses before or during deployment. It includes checks for exposed credentials, unsafe input handling, and common web security problems.

In plain words
What is it for?
Scanning for hardcoded secrets, reviewing authentication and permissions, checking dependencies, looking for OWASP Top 10 issues, hardening deployments, and responding to security alerts.
Why use it?
It helps uncover stolen-secret risks, injection attacks, weak access controls, vulnerable dependencies, and configuration problems that could expose users or systems.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: positional $N argument.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is // req.query.name = "../../etc/passwd".

Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/asgarovf/locusai
agentmods
npx agentmods add skills/asgarovf/locusai/security-audit

Made for: Claude Code.

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 security-audit

README.md
[![agentmods](https://agentmods.dev/badge/skills/asgarovf/locusai/security-audit.svg)](https://agentmods.dev/skills/asgarovf/locusai/security-audit)
Your own site
<a href="https://agentmods.dev/skills/asgarovf/locusai/security-audit"><img src="https://agentmods.dev/badge/skills/asgarovf/locusai/security-audit.svg" alt="Measured on agentmods" height="20"></a>
Per session 35 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,683 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
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.00035 $0.01683
Opus 5 $0.00017 $0.00842
Sonnet 5 $0.00007 $0.00337
Haiku 4.5 $0.00003 $0.00168

Measured 6d ago against content hash e2d8a42345cf, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

security-audit scanned grade A with 1 finding 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 6d 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.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

grep -rn "exec(\|spawn(\|execSync(\|child_process\|subprocess\|os\.system\|os\.popen" --include="*.ts" --include="*.py" --include="*.js" .
skills/security-audit/SKILL.md · 210 lines

How it starts

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

Security Audit

When to use this skill

  • Auditing a codebase for security vulnerabilities
  • Reviewing authentication and authorization
  • Checking for exposed secrets or credentials
  • Assessing dependency security
  • Hardening an application before deployment
  • Responding to security alerts

Step 1: Secrets and credentials scan

# Search for hardcoded secrets
grep -rn "password\s*=\|api_key\s*=\|secret\s*=\|token\s*=" --include="*.ts" --include="*.py" --include="*.js" --include="*.env" .
grep -rn "AKIA[0-9A-Z]\{16\}" .  # AWS access keys
grep -rn "sk-[a-zA-Z0-9]\{20,\}" .  # API keys (OpenAI, Stripe, etc.)
grep -rn "ghp_[a-zA-Z0-9]\{36\}" .  # GitHub personal access tokens

# Check for .env files in git
git ls-files | grep -i "\.env"

# Check .gitignore covers sensitive files
cat .gitignore | grep -i "env\|secret\|key\|credential"

Findings to flag:

  • Any credential in source code (even in comments)
  • .env files tracked by git
  • Missing .gitignore entries for sensitive files

Step 2: Input validation (Injection attacks)

SQL Injection

# Find raw SQL queries
grep -rn "query(\`\|query(f\"\|execute(f\"\|\.raw(" --include="*.ts" --include="*.py" --include="*.js" .
grep -rn "\$\{.*\}" --include="*.sql" .
// VULNERABLE
db.query(`SELECT * FROM users WHERE id = ${userId}`);

// SAFE: Parameterized query
db.query('SELECT * FROM users WHERE id = $1', [userId]);

XSS (Cross-Site Scripting)

# Find dangerous HTML injection
grep -rn "innerHTML\|dangerouslySetInnerHTML\|v-html\|\|html(" --include="*.tsx" --include="*.jsx" --include="*.vue" --include="*.html" .
// VULNERABLE
element.innerHTML = userInput;
<div dangerouslySetInnerHTML={{ __html: userContent }} />

// SAFE
element.textContent = userInput;
// Or sanitize: DOMPurify.sanitize(userContent)

Command Injection

# Find shell command execution
grep -rn "exec(\|spawn(\|execSync(\|child_process\|subprocess\|os\.system\|os\.popen" --include="*.ts" --include="*.py" --include="*.js" .

Read the full file on GitHub · 210 lines

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. 6d ago First seen · 210 lines · 35 tokens per session scan A e2d8a42345cf

Subscribe to this mod's changes

security-audit is a skill published in the GitHub repository asgarovf/locusai (23 stars, last pushed 5mo ago), licensed MIT. It adds 35 tokens to every session and 1,683 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

security-review

Security audit focused on OWASP Top 10 — injection, auth flaws, secrets exposure, IDOR, and more. Use when reviewing code for vulnerabilities, before deploying to production, or auditing a new codebase.

chandrudp29/skillhub · 46 tokens

testing-api-authentication-weaknesses

Tests API authentication mechanisms for weaknesses including broken token validation, missing authentication on endpoints, weak password policies, credential stuffing susceptibility, token leakage in URLs or logs, and session management flaws. The tester evaluates JWT implementation, API key handling, OAuth flows, and…

xalgorix/xalgorix · 102 tokens

ship-safe

Run a full security audit on this project — 16 agents scan for secrets, injections, auth bypass, SSRF, supply chain, Supabase RLS, MCP security, agentic AI, RAG poisoning, PII compliance, and more. Use when the user wants a security audit, vulnerability scan, or asks if their code is safe to ship.

asamassekou10/ship-safe · 75 tokens

ship-safe-baseline

Manage your security baseline — accept current findings as known debt, then only report new regressions on future scans. Use when the user wants to adopt security scanning incrementally or suppress existing findings.

asamassekou10/ship-safe · 43 tokens

ship-safe-ci

Run Ship Safe in CI mode — compact output, exit codes, SARIF generation. Use when the user wants to set up CI/CD security gates or test their pipeline configuration.

asamassekou10/ship-safe · 39 tokens

ship-safe-deep

Run a deep security audit with LLM-powered taint analysis — regex scan nominates findings, then an LLM verifies taint reachability and exploitability. Use when the user wants thorough, high-confidence results with fewer false positives.

asamassekou10/ship-safe · 52 tokens