en un clic
security-audit
Detects high-confidence security risks in code.
Installer avec Codex ou Claude Copiez ce prompt, collez-le dans Codex, Claude ou un autre assistant, puis laissez-le vérifier la page du skill et l'installer pour vous.
Menu
Detects high-confidence security risks in code.
Installer avec Codex ou Claude Copiez ce prompt, collez-le dans Codex, Claude ou un autre assistant, puis laissez-le vérifier la page du skill et l'installer pour vous.
Basé sur la classification professionnelle SOC
Flags risky shell commands and unsafe tree ops.
Surfaces the dojo's non-negotiable prime directives.
Activates the dojo framework at the start of a session.
Plans multi-step work before writing code.
Captures lessons and promotes recurring patterns.
Derives measurable NFRs from a parent business driver.
| name | security-audit |
| description | Detects high-confidence security risks in code. |
| tier | practical |
| category | review |
| created_by | human |
| platforms | ["windows","macos","linux"] |
| tags | ["security","audit","secrets","review"] |
| author | Andreas Wasita (@andreaswasita) |
Runs a deterministic heuristic scan over a codebase to flag high-confidence security risks — committed secrets, disabled TLS verification, insecure deserialization, and shell-injection sinks — then optionally layers LLM reasoning (OWASP/STRIDE) on top of the machine findings. This is a lightweight heuristic audit assistant, not a pentest, a SAST replacement, or a proof of security: it is a regex line-scanner that cannot follow data flow and will miss anything outside its rules. Treat its output as triage leads for human review, never as assurance.
derive-security-from-risk (which works forward, producing requirements) — this skill is the reverse, scanning existing code.powershell Copilot tool to invoke the scanner.PATH (the scan logic is one stdlib core; the .sh/.ps1 are thin wrappers).Use the powershell tool to scan a directory and review the findings:
# High-confidence sweep of the repo (exit 1 = findings at/above --fail-on)
bash skills/security-audit/scripts/security-audit.sh . --suggest
# Broader (noisier) profile, fail only on medium-or-higher
bash skills/security-audit/scripts/security-audit.sh src --profile broad --fail-on medium
# Persist a deterministic JSON report for diffing
bash skills/security-audit/scripts/security-audit.sh . --format json --output audit.json
On Windows, call the parity wrapper security-audit.ps1 with the same arguments. Exit codes: 0 clean (below --fail-on), 1 findings at/above it, 2 usage error.
| Rule | Flags | Confidence |
|---|---|---|
| SA-001..005 | private keys, AWS/GitHub/Slack/Stripe/Google tokens | high |
| SA-010 | TLS verification disabled (verify=False) | high |
| SA-011 | shell sink (shell=True, os.system) | high |
| SA-012 | insecure deserialization (pickle.loads, yaml.load) | high |
| SA-020..024 | eval/exec, generic creds, weak hash, DEBUG, CORS * | low (broad only) |
| Flag | Effect |
|---|---|
--profile broad / --include-low-confidence | enable low-confidence rules |
--fail-on low|medium|high | exit-1 threshold (default high) |
--format md|json | report shape (default md) |
--output PATH | persist report (excluded from its own scan) |
--ignore GLOB | extra path to skip (repeatable) |
--suggest | include remediation text |
Run the default (high-confidence) profile over the target with the powershell tool. Start narrow — the default rules are tuned to minimize false positives, so an exit 1 here usually means a real issue.
Read each finding's rule id, severity, confidence, CWE, and location. Confirm whether it is a true positive. For a genuine non-issue, add an inline # security-audit: ignore SA-0NN reason=... on the matched or preceding line; the report then counts it as suppressed rather than dropping it silently.
For findings that need judgement, layer OWASP/STRIDE reasoning on the machine output: is the eval argument attacker-reachable, is the disabled TLS check on an internal or external call, what is the blast radius. The scanner finds candidates; you decide exploitability.
Write a report with --output (and --format json for machine diffing). The report carries no timestamps, absolute paths, or environment data, so re-running on unchanged code produces byte-identical output and a noise-free diff.
Apply fixes guided by the --suggest remediation text. The scanner never edits code — suggestions only, by design. After fixing, re-run and confirm the findings clear (and that no new ones appeared).
Rules live in skills/security-audit/scripts/security_audit.py as one shared core. Add a rule there with a matching case in tests/test_security_audit.py (generate any secret-shaped fixture at runtime — never commit a token-shaped literal), so the .sh and .ps1 wrappers stay in parity.
eval trips it — false positives train reviewers to ignore the tool. Keep noisy rules behind --profile broad..sh/.ps1 are thin and must stay that way.tests/test_security_audit.py.