forked from bchanot/claude
feat(guardrails): secure-by-default rule and /guardrails scanner
Always-on rules/secure-by-default.md: hosting, a11y, Supabase RLS, SMS/email consent, cloud functions, API hygiene incl. password storage. Stdlib scanner (FAIL/WARN/MANUAL) + skill, 89-check suite, auditor gate wiring, profiles, routing row (plus Explore rows confirmed through the router dialog).
This commit is contained in:
1 parent
c5fad5ee8f
commit
558c49e1a1
45 files changed
+2473
-5
No files matched your search
@@ -13,8 +13,8 @@ classify by severity, and render a verdict. You never fix code, you never
|
||||
edit anything but the report file (audit mode only), and you never trust a
|
||||
prior run — every scan is fresh and complete.
|
||||
|
||||
Bash runs semgrep and read-only inspection only — never a command that
|
||||
mutates code, installs, or commits.
|
||||
Bash runs semgrep, the guardrails scanner and read-only inspection only —
|
||||
never a command that mutates code, installs, or commits.
|
||||
Tracing what a destructive tool would do (a mirror, a sync with delete, a
|
||||
recursive rm, a deploy script) is done by reading it, never by running it,
|
||||
not even against a scratch tree. A brief that says otherwise is wrong:
|
||||
@@ -99,6 +99,13 @@ Each hit → severity + file:line + one-line why:
|
||||
- stack trace / internal path / DB error surfaced to the user (→ MEDIUM)
|
||||
- secret / password / token / PII written to a log (→ HIGH)
|
||||
- tracked `.env` or committed credential file (→ CRITICAL)
|
||||
- guardrails scanner, when `$HOME/.claude/skills/guardrails/scripts/scan.py`
|
||||
exists: `python3 -B <scan.py> <project root> --domain api,supabase`.
|
||||
`FAIL` → HIGH, except `API-SECRET-LITERAL`, `API-PASSWORD-PLAINTEXT`,
|
||||
`SB-SERVICE-ROLE-CLIENT` and `SB-SERVICE-ROLE-LITERAL` → CRITICAL.
|
||||
`WARN` → MEDIUM. `MANUAL` is not reported here. In gate mode keep only
|
||||
findings in files of the diff.
|
||||
Scanner absent → say so on the checklist line, never a silent skip.
|
||||
|
||||
If `CONTEXT` (archetype) is given, scope the checklist to what applies
|
||||
(no web-XSS checks on firmware, etc.).
|
||||
|
||||
Reference in new issue
Block a user