AGENT SKILL

code-audit

Static security audit of a codebase with inkdex - inkdex-vuln indexes the repository locally, follows data from entry points to sinks and reports vulnerabilities (injections, path traversal, SSRF, secrets, weak crypto, dangerous settings, vulnerable dependencies), then mlab.sh enriches the CVEs. Use when the user asks to scan or audit source code for vulnerabilities, run SAST, map an app's attack surface or unauthenticated routes, trace a data flow, or review the security impact of a change or PR.

License 许可
MIT
最近更新
2026-10-22
Stars
★ 1
Forks
0

01 前言 Front Matter

name
code-audit
description
Static security audit of a codebase with inkdex - inkdex-vuln indexes the repository locally, follows data from entry points to sinks and reports vulnerabilities (injections, path traversal, SSRF, secrets, weak crypto, dangerous settings, vulnerable dependencies), then mlab.sh enriches the CVEs. Use when the user asks to scan or audit source code for vulnerabilities, run SAST, map an app's attack surface or unauthenticated routes, trace a data flow, or review the security impact of a change or PR.

03 SKILL.md 正文

Code Audit (inkdex)

CLI details, preflight and output shapes: ${CLAUDE_PLUGIN_ROOT}/docs/inkdex-reference.md. mlab output shapes: ${CLAUDE_PLUGIN_ROOT}/docs/tool-reference.md.

Local analysis, cloud context. inkdex finds the path from input to impact in the code; mlab says how exploited the vulnerable dependencies are.

Workflow

1. Preflight

inkdex-vuln --version and inkdex license status (see the reference: install paths, license activation). Confirm the target: a repository directory. An application (has routes / a main) is scanned as is; a library (package, crate, module) with --library.

2. Scan

inkdex-vuln scan <path> --update --json

--update builds or refreshes .inkdex/. Add --library for a library. Add --local-sources only if the user asks to treat environment / arguments / local files as untrusted (a CLI tool, a script run by others). If the network or the license's dependency check is unavailable, the scan still runs: say dependencies were not checked.

For a PR or change instead of the whole repo: inkdex index --commit <base>, inkdex index, then inkdex diff <base> --sec --markdown (and --gate to tell whether it adds an unsanitized flow).

3. Understand the findings

  • Start from critical / high and proven. For each, read meta.steps (source → sink); if the path is not obvious, inkdex sec flows --trace on the sink's category, or inkdex explain <file> --line <n> to see what inkdex understood on the line.
  • verify findings need the evidence read: decide true / false with the code, say which and why.
  • Attack surface: inkdex routes --unauthenticated - list the entry points with no authentication found, and which of them reach a finding.
  • Group findings by root cause (one unvalidated parameter reaching three sinks is one fix).

4. Pivot the dependency findings through mlab

For VULN-DEP findings: meta.aliases (CVE ids) → cve_detail (KEV, EPSS, fixed range), then actors_by_cve on KEV / EPSS > 0.5. A dependency marked imported: false is declared but never used by the code: lower priority, often a removal.

5. Report

## Code audit: <repo> - verdict <CLEAN | ISSUES | CRITICAL>

**Bottom line:** <one sentence>

### Exploitable now
<per root cause: rule + CWE, route / entry point, source → sink, file:line, why it is reachable, fix>

### To verify
<verify findings with your call on each: true / false positive, and why>

### Secrets and settings
<keys to rotate first; TLS off, debug, cookies, CORS - with the config line>

### Vulnerable dependencies
<KEV / EPSS-prioritized: package, version, CVE, fixed version, imported or not>

### Attack surface
<unauthenticated entry points, and which reach a finding>

### Actions
<ordered fixes; the CI line to keep it fixed: inkdex-vuln scan . --update --fail-on high>

Rules

  • Never run, build or install the audited project to "confirm" a finding - the analysis is static on purpose.
  • Never handle the license key: the user activates it (inkdex license activate) or sets INKDEX_KEY / INKDEX_TOKEN themselves.
  • A CLEAN result covers what inkdex models (its languages, frameworks and rules); say what was out of scope (other languages, logic bugs, missing authentication as a design flaw).
  • scan exit 1 with --fail-on is the gate, not an error; exit 2 is (no index, no license): read stderr.

04 同仓库更多 Skills

mlab-sh
mlab-sh/mlab-claude

threat-watch

Generate a threat landscape digest from mlab.sh - recent critical/KEV CVEs filtered to a declared technology stack, with actor attribution. Use when the user asks what is new in vulnerabilities, wants a daily/weekly threat brief, asks about recent CVEs for a product, or sets up a recurring watch on their stack.

★ 1
mlab-sh
mlab-sh/mlab-claude

supply-chain-audit

Full supply-chain audit of a project - postmortem detects malicious code, install hooks and risky dependencies locally, then mlab.sh enriches what it finds (hashes, endpoints, actors, CVEs). Use when the user asks to audit a project's dependencies or supply chain, check a repo for malicious packages, or vet a codebase before adoption or deployment.

★ 1
mlab-sh
mlab-sh/mlab-claude

smishing-campaign

Analyze a batch of reported SMS/text messages through mlab.sh - score each for smishing, cluster them into campaigns, and extract the shared infrastructure (URLs, callback numbers, sender patterns). Use when the user has multiple reported SMS from users/employees, or investigates an SMS phishing wave. For a single message, phishing-triage does the job.

★ 1
mlab-sh
mlab-sh/mlab-claude

script-triage

Statically analyze a suspicious shell script through mlab.sh - install.sh, cron payloads, CI steps, curl-pipe-sh one-liners. Flags dangerous constructs (download-piped-to-shell, base64 decoding, reverse shells, persistence, anti-forensics, destructive deletes), extracts every IOC and enriches them. Use when the user pastes shell code and asks if it is safe/malicious, or provides a .sh file to vet before running it.

★ 1
mlab-sh
mlab-sh/mlab-claude

sbom-export

Generate a CycloneDX SBOM locally with postmortem and push it through mlab.sh vulnerability scanning - for projects or container images where no single lockfile can be pasted. Use when the user asks for an SBOM, needs vuln scanning of a container image or a multi-ecosystem repo, or when sbom-audit lacks a usable lockfile.

★ 1
mlab-sh
mlab-sh/mlab-claude

sbom-audit

Audit a dependency lockfile or SBOM for known vulnerabilities via mlab.sh, prioritize findings by KEV status and EPSS, and attribute actively exploited CVEs to threat actors. Use when the user provides a lockfile (package-lock.json, yarn.lock, pnpm-lock.yaml, Cargo.lock, requirements.txt, poetry.lock, uv.lock, Pipfile.lock, go.sum, composer.lock, Gemfile.lock, pom.xml, gradle.lockfile, packages.lock.json, pubspec.lock, mix.lock) or a CycloneDX / SPDX SBOM, or asks to check dependencies for vulnerabilities.

★ 1