agentleFS
awarexoneawarexone/AXguard/axguard-audit/SKILL.md

axguard-audit

Skill18 starsChanged 3 months agoMITView on GitHub

Full A-Z pre-ship security audit. Run when the user asks to audit, scan for vulnerabilities, security review before publish, or generate an AXguard report. Covers secrets, auth/IDOR, SQL/SSTI/injection, path traversal, SSRF, XSS, uploads, GraphQL, crypto, CORS/cloud, supply chain, debug exposure, and AI-agent risks; writes Markdown and HTML reports.

  • Pipes a download into a shell
  • Reads credentials
  • Installs packages

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 2 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Ensure CLI (axguard version).

    line 14
  2. Very specific:

    Prefer axguard audit / axguard scan over ad-hoc grepping when CLI is installed.

    line 174
  3. Distinctive:

    After scan: severity tally → walk critical/high with file:line evidence.

    line 175
  4. Distinctive:

    Never claim confirmed without location + plausible trigger path.

    line 176

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “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

AXguard — Full Audit (A → Z)

Pre-ship gate for the current project. Deterministic scan first, then hunter-grade verification. Defensive review only — cite location + trigger path; do not write live exploit playbooks against third parties.

For class deep-dives, load axguard-knowledge (references/vuln-classes.md).

Default action

  1. Ensure CLI (axguard version). If missing, from the AXguard repo:
python3 -m venv .venv && source .venv/bin/activate
pip install -e .
  1. Full audit:
axguard audit .
# or
axguard audit ./path/to/app --out-dir .findings/axguard

Quick mid-coding pass (no polished deliverable required):

axguard scan .
  1. Artifacts:
  • .findings/axguard/axguard-report.md
  • .findings/axguard/axguard-report.html
  • .findings/axguard/axguard-report.json
  1. Triage critical/high with source → sink → missing control. Prefer /axguard-triage for noise; /axguard-fix only after confirmation.

Phase map (rule packs)

PhasePacksFocus
surface—Routes, APIs, auth boundaries, sinks, configs, build/CI artifacts
secretssecrets, advancedKeys, tokens, PEM, GitHub/Slack PATs
authauth, advancedIDOR/ownership, JWT none/decode-without-verify, CSRF off
sqlsqlConcat/f-string/raw ORM SQL
injectioninjection, advancedeval/exec, pickle, shell, child_process, os.system, unserialize
sstisstiJinja/Flask/Pug dynamic templates
pathpathopen/join, sendFile, PHP include
ssrfssrf, cloudUser URL → fetch/requests; metadata IPs
xssxssinnerHTML, document.write, dangerouslySetInnerHTML
uploaduploadOriginal filename save, multer.any
graphqlgraphqlIntrospection, CSRF off
cryptocryptoHard-coded keys/IV, MD5/SHA1 passwords, Math.random tokens, verify=False
cloudcloudWildcard CORS+creds, public S3 ACL
supplysupplynpm lifecycle scripts, extra-index, curl|sh
debugdebugDEBUG=True, Flask debug, stack traces, Actuator
agentagent, advancedExecuting model output, unrestricted shell tools
report—MD + HTML + JSON

Hunter checklist (verify scanner leads)

Work critical → high → medium. For each keep candidate: sink, who triggers, impact one-liner, fix.

AuthZ / IDOR — CWE-639, OWASP A01

  • Object fetch by id alone (get(id), find_by_id, WHERE id=?) without user_id / tenant_id / ACL.
  • Cross-tenant list/export endpoints; admin routes missing role gate.
  • FP: internal admin-only tools with separate network auth; test helpers not shipped.
  • Fix: authorize on every object access; deny by default; central policy helper.

JWT / session — CWE-347, CWE-287

  • alg=none, jwt.decode without verify, weak/shared secrets in source.
  • FP: decode-only for display after prior verify.
  • Fix: pin algorithms; verify always; rotate secrets out of repo.

SQL injection — CWE-89, A03

  • f-string / % / + / `...${}` into execute; ORM .raw / text() with unbound input.
  • FP: constants-only SQL; bind params present on adjacent lines.
  • Fix: parameterized queries / typed query builders only.

Command / code injection — CWE-78, CWE-94, CWE-95

  • eval/exec, shell=True, child_process.exec(string), os.system/popen.
  • FP: fixed argv lists; trusted build scripts with no user input.
  • Fix: argv arrays, shell=False; never eval untrusted strings.

Deserialization — CWE-502

  • pickle.loads, PHP unserialize, Java ObjectInputStream/readObject on untrusted bytes.
  • FP: pickle of local trusted cache only (still prefer safer formats).
  • Fix: JSON/protobuf; allowlisted deserializers.

SSTI — CWE-1336 / CWE-94

  • render_template_string, Jinja from variable, Pug compile on user text.
  • FP: static template names only.
  • Fix: file-based templates; never compile user strings as code.

Path traversal / LFI — CWE-22, CWE-98

  • open(join(base, user)), sendFile(userPath), PHP include($var).
  • FP: path already resolved + allowlisted under chroot.
  • Fix: resolve + prefix-check against allowed root; never include user paths.

SSRF — CWE-918, A10

  • Variable URL into requests/fetch; cloud metadata URLs in code.
  • FP: hardcoded allowlisted hosts; SSRF mitigations (scheme/host allowlist) nearby.
  • Fix: allowlist schemes/hosts; block link-local/metadata; no user-controlled redirects to internals.

XSS — CWE-79, A03

  • innerHTML / document.write / dangerouslySetInnerHTML with untrusted data.
  • FP: constant HTML; sanitized via trusted library with correct context.
  • Fix: textContent / safe framework binding; contextual encode; CSP.

Upload — CWE-434

  • Save with original filename; multer.any(); no type/size/content checks.
  • FP: uploads to isolated object storage with random keys + content-type sniffing.
  • Fix: random server names; allowlist extensions + magic bytes; store outside web root.

GraphQL — CWE-200, CWE-352

  • Introspection in prod; CSRF protection disabled for cookie sessions.
  • FP: internal staging with network controls documented.
  • Fix: disable introspection in prod; auth on mutations; CSRF for cookie auth.

Crypto misuse — CWE-321, CWE-328, CWE-338, CWE-295

  • Hard-coded key/IV; MD5/SHA1 for passwords; Math.random for tokens; TLS verify disabled.
  • FP: non-security checksums; test-only fixtures excluded from ship.
  • Fix: KDF (bcrypt/argon2/scrypt); CSPRNG; secrets from KMS/env; verify TLS.

Secrets — CWE-798, CWE-321

  • AWS keys, API key assigns, PEM blocks, GitHub/Slack tokens in tree or build artifacts.
  • FP: clearly fake placeholders (EXAMPLE, changeme in docs only) — still scrub if shippable.
  • Fix: rotate; move to secret manager; pre-commit secret scan.

Cloud / CORS — CWE-942, CWE-284

  • Access-Control-Allow-Origin: * with credentials; public-read S3 ACL.
  • FP: truly public static assets with no sensitive data.
  • Fix: explicit origin allowlist; private buckets + signed URLs.

Supply chain — CWE-494, CWE-506

  • Suspicious postinstall; pip --extra-index-url; curl|sh in README/CI.
  • FP: pinned official installers with checksums.
  • Fix: lockfiles; pin hashes; avoid pipe-to-shell; review lifecycle scripts.

Debug exposure — CWE-489, CWE-209, CWE-200

  • Django/Flask DEBUG; verbose Express errors; Spring Actuator wide exposure.
  • FP: local .env.example only — confirm prod config path.
  • Fix: DEBUG off in prod; generic errors; lock actuators.

LLM / agent — CWE-77, CWE-78, CWE-94 — OWASP LLM

  • Tool executes model output / unrestricted shell; prompt→shell without policy.
  • FP: dry-run / human-approval gates that always run before exec.
  • Fix: allowlisted tools; no shell-from-LLM; sandbox + human confirm for high risk.

Agent behavior

  • Prefer axguard audit / axguard scan over ad-hoc grepping when CLI is installed.
  • After scan: severity tally → walk critical/high with file:line evidence.
  • Never claim confirmed without location + plausible trigger path.
  • Chain: triage → remediate → report → CI as requested.

Output contract

Critical: N
High: N
Medium: N
Low: N
Reports: .findings/axguard/axguard-report.{md,html,json}

For each confirmed finding: Title, Severity, CWE/OWASP (if known), Location, Why it matters, Evidence, Fix.

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.