← Back to Skills Marketplace
itsnishi

Audit Code

by ItsNishi · GitHub ↗ · v1.1.1 · MIT-0
cross-platform ⚠ suspicious
2507
Downloads
2
Stars
10
Active Installs
3
Versions
Install in OpenClaw
/install audit-code
Description
Security-focused code review for hardcoded secrets, dangerous calls, and common vulnerabilities
README (SKILL.md)

audit-code -- Project Code Security Review

Security-focused code review of project source code. Covers OWASP-style vulnerabilities, hardcoded secrets, dangerous function calls, and patterns relevant to AI-assisted development.

What to do

Run the auditor against the target path:

python3 "$SKILL_DIR/scripts/audit_code.py" "$ARGUMENTS"

If $ARGUMENTS is empty, default to $PROJECT_ROOT.

What it checks

  • Hardcoded secrets -- API keys (AWS, GitHub, Stripe, OpenAI, Slack), tokens, private keys, connection strings, passwords
  • Dangerous function calls -- eval, exec, subprocess with shell=True, child_process.exec, pickle deserialization, system(), gets(), etc.
  • SQL injection -- String concatenation/interpolation in SQL queries
  • Dependency risks -- Known hallucinated package names, unverified installations
  • Sensitive files -- .env files committed to git, credential files in repo
  • File permissions -- Overly permissive chmod patterns
  • Exfiltration patterns -- Base64 encode + network send, DNS exfiltration, credential file reads

Output

Structured report with severity-ranked findings, file locations, and actionable remediation steps.

When to use

  • Before committing or pushing code
  • When reviewing third-party contributions or PRs
  • As part of a periodic security audit of the codebase
  • After AI-assisted code generation to verify no secrets or vulnerabilities were introduced

Advisory hooks

The repository's .claude/settings.json includes PreToolUse hooks that warn on dangerous Bash and Write operations. These hooks are advisory only -- they produce warnings but do not block execution.

  • audit-code is the detection layer for source code security issues
  • The hooks provide supplementary runtime warnings during agent operation
  • To enforce blocking, hooks must return {"decision": "block"} instead of warning messages
Usage Guidance
This skill appears to be a legitimate local code auditor. Before running it: (1) review the bundled scripts yourself (they are included) to confirm behavior; (2) run it against a specific project path (the script requires a path — SKILL.md's claimed default is inaccurate); (3) run it as a non‑privileged user or inside a sandbox/container to avoid accidental scanning outside the intended repository; (4) be aware it will read files like .env and private keys (that is its purpose) but it does not contain obvious network/exfiltration code; and (5) if you plan to let other agents/tools invoke it, consider the implications of allowing Bash execution in the frontmatter even though model auto-invocation is disabled.
Capability Analysis
Type: OpenClaw Skill Name: audit-code Version: 1.1.1 The bundle is a legitimate security auditing tool designed to perform static analysis on source code to identify vulnerabilities, hardcoded secrets, and supply chain risks. The core logic in `scripts/audit_code.py` and `scripts/patterns.py` uses an extensive database of regex patterns to detect modern attack vectors, including AI-specific prompt injections and MCP tool poisoning. While the tool performs network requests to PyPI and npm registries, these are functionally justified for verifying package legitimacy to prevent 'slopsquatting' or hallucinated dependency attacks, and no evidence of data exfiltration or malicious intent was found.
Capability Assessment
Purpose & Capability
Name/description (code security review for secrets, dangerous calls, dependencies, permissions) align with included artifacts: a Python scanner (scripts/audit_code.py) and a pattern database (scripts/patterns.py). No unrelated credentials, binaries, or external services are requested.
Instruction Scope
Runtime instructions tell the agent to run the included Python script against a target path and to use Bash/Read/Glob/Grep tools. The scanner legitimately reads repository files (including .env and key files) and checks permissions; this is expected. Minor inconsistency: SKILL.md claims 'If $ARGUMENTS is empty, default to $PROJECT_ROOT', but the script actually requires an explicit path and exits if none is provided. Also the frontmatter pre-approves Bash (allowed-tools includes Bash), which is functional here but is a capability that should be intentionally allowed.
Install Mechanism
No install spec or remote downloads; the skill is instruction+bundled code only. All code is included in the package (no external fetches or extract operations), which reduces install-time risk.
Credentials
The skill declares no required environment variables or credentials. The scanner will read repository files (including potential secret files) as part of its function; that file access is proportionate to an auditing tool and is not requesting unrelated secrets.
Persistence & Privilege
always is false and disable-model-invocation is true (skill cannot be auto-invoked by the model), and it does not request persistent system-wide changes. The only elevated capability in the frontmatter is allowing Bash execution when run; because model auto-invocation is disabled, the skill can only be run explicitly by a user.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install audit-code
  3. After installation, invoke the skill by name or use /audit-code
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.1.1
- Expand pattern database from ~70 to 151 patterns across 15 categories - Add 5 new categories: code_before_review, config_backdoor, memory_corruption, confused_delegation, persistence - Add live package verification -- pip/npm install commands checked against PyPI/npm in real time - Non-existent packages flagged CRITICAL (slopsquatting/hallucination detection) - New coverage: reverse shells, cloud IMDS, env var hijacking, persistence mechanisms, dependency confusion, GitHub Actions poisoning, 16+ obfuscation techniques - Document advisory hook behavior in SKILL.md
v1.1.0
- Added documentation of advisory PreToolUse hooks from .claude/settings.json that warn on dangerous Bash and Write operations. - Clarified that these hooks are advisory only and do not block execution by default. - Provided guidance on making hooks enforce blocking behavior. - Made clear the relationship between audit-code as a detection layer and runtime advisory hooks.
v1.0.0
Initial release of audit-code – a security-focused code review skill. - Scans project source code for hardcoded secrets, dangerous calls, and common vulnerabilities (OWASP-style). - Detects risky patterns such as eval/exec, insecure SQL, dependency issues, and secrets in files. - Produces a structured, severity-ranked report with file locations and remediation advice. - Designed for pre-commit checks, security audits, and post–AI code generation validation. - Use via CLI with optional path arguments; defaults to scanning the project root.
Metadata
Slug audit-code
Version 1.1.1
License MIT-0
All-time Installs 12
Active Installs 10
Total Versions 3
Frequently Asked Questions

What is Audit Code?

Security-focused code review for hardcoded secrets, dangerous calls, and common vulnerabilities. It is an AI Agent Skill for Claude Code / OpenClaw, with 2507 downloads so far.

How do I install Audit Code?

Run "/install audit-code" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Audit Code free?

Yes, Audit Code is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Audit Code support?

Audit Code is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Audit Code?

It is built and maintained by ItsNishi (@itsnishi); the current version is v1.1.1.

💬 Comments