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
In this repository39 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- ai-agent-securitySkill
- ai-application-securitySkill
- api-securitySkill
- attack-surface-mappingSkill
- authentication-analysisSkill
- authorization-analysisSkill
- axguard-csoSkill
- axguard-knowledgeSkill
- axguard-preshipSkill
- axguard-remediateSkill
- axguard-reportSkill
- axguard-securitySkill
- axguard-triageSkill
- cloud-securitySkill
- command-injectionSkill
- configuration-securitySkill
- deserialization-securitySkill
- file-upload-securitySkill
- graphql-securitySkill
- jwt-securitySkill
- mcp-securitySkill
- oauth-securitySkill
- path-traversalSkill
- prompt-injectionSkill
- prototype-pollutionSkill
- secrets-detectionSkill
- security-architecture-reviewSkill
- security-remediationSkill
- security-triageSkill
- session-securitySkill
- sql-injectionSkill
- ssrf-analysisSkill
- ssti-analysisSkill
- supply-chain-securitySkill
- threat-modelingSkill
- websocket-securitySkill
- xss-analysisSkill
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
- Very specific: line 14
Ensure CLI (axguard version).
- Very specific: line 174
Prefer axguard audit / axguard scan over ad-hoc grepping when CLI is installed.
- Distinctive: line 175
After scan: severity tally → walk critical/high with file:line evidence.
- Distinctive: line 176
Never claim confirmed without location + plausible trigger path.
≈ “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.
Files
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
- Ensure CLI (
axguard version). If missing, from the AXguard repo:
python3 -m venv .venv && source .venv/bin/activate
pip install -e .- Full audit:
axguard audit .
# or
axguard audit ./path/to/app --out-dir .findings/axguardQuick mid-coding pass (no polished deliverable required):
axguard scan .- Artifacts:
.findings/axguard/axguard-report.md.findings/axguard/axguard-report.html.findings/axguard/axguard-report.json
- Triage critical/high with source → sink → missing control. Prefer
/axguard-triagefor noise;/axguard-fixonly after confirmation.
Phase map (rule packs)
| Phase | Packs | Focus |
| surface | — | Routes, APIs, auth boundaries, sinks, configs, build/CI artifacts |
| secrets | secrets, advanced | Keys, tokens, PEM, GitHub/Slack PATs |
| auth | auth, advanced | IDOR/ownership, JWT none/decode-without-verify, CSRF off |
| sql | sql | Concat/f-string/raw ORM SQL |
| injection | injection, advanced | eval/exec, pickle, shell, child_process, os.system, unserialize |
| ssti | ssti | Jinja/Flask/Pug dynamic templates |
| path | path | open/join, sendFile, PHP include |
| ssrf | ssrf, cloud | User URL → fetch/requests; metadata IPs |
| xss | xss | innerHTML, document.write, dangerouslySetInnerHTML |
| upload | upload | Original filename save, multer.any |
| graphql | graphql | Introspection, CSRF off |
| crypto | crypto | Hard-coded keys/IV, MD5/SHA1 passwords, Math.random tokens, verify=False |
| cloud | cloud | Wildcard CORS+creds, public S3 ACL |
| supply | supply | npm lifecycle scripts, extra-index, curl|sh |
| debug | debug | DEBUG=True, Flask debug, stack traces, Actuator |
| agent | agent, advanced | Executing 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=?) withoutuser_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.decodewithout 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, PHPunserialize, JavaObjectInputStream/readObjecton 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, Pugcompileon 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), PHPinclude($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/dangerouslySetInnerHTMLwith 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.randomfor 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,changemein 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|shin 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.exampleonly — 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 scanover 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.
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
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.

