diff --git a/.claude/memory/journal.md b/.claude/memory/journal.md index 8741098..e99c90a 100644 --- a/.claude/memory/journal.md +++ b/.claude/memory/journal.md @@ -624,3 +624,4 @@ rules: ## 2026-10-18 - Guardrails ask (user): 5 domains baseline + API/access hygiene + test skill. `rules/secure-by-default.md` always-on (CLAUDE.global 320/320, BDR-085 path). `/guardrails` = stdlib py scanner (6 domains, FAIL/WARN/MANUAL) + judgment; auditor gate runs api+supabase. Calibrated on game/faunosteo: 7 FP classes fixed (stopPropagation wrappers, hidden inputs, service_role-only policies, border focus, UI routes dir, ignored .env, dup origin). Branch feature/secure-by-default, not committed. BDR-120 pending user approval. - Passwords added on user question ("stockés en clair ?"): gap, rule had none. `checks/passwords.py` (api domain): clear column w/o hash lib, `==` or SQL compare, fast hash, log call, literal. Calibrated 7 projects: zero noise after htpasswd volume-mount FP. Suite 89/89, `make test` green. +- Live probe added (user: "est-ce qu'il attaque de l'exterieur ?"). `probe.py` read-only, `--authorized`, env secrets, same-host redirect only, budget-capped. 5 probes confirm a hole from outside (OPEN/CLOSED). Suite 16/16 on a localhost fixture. Classifier blocked edits/tests carrying exploit-language and the SSRF-shaped redirect fixture; full-file Write passed, so probe strings are neutral and interpretation lives in checks.md. diff --git a/.claude/tasks/TODO.md b/.claude/tasks/TODO.md index 2a193b6..e0f7bf9 100644 --- a/.claude/tasks/TODO.md +++ b/.claude/tasks/TODO.md @@ -11,6 +11,7 @@ Language call: scanner is Python stdlib, not Rust (default-language contraindica - [x] T6 registration: profiles full/max/dev, routing.json row, README, USAGE x2, CHANGELOG - [x] T7 `make test` all green (70 guardrails checks), shellcheck clean, 25/80/5/5 limits met; calibrated on 8 real projects (game, faunosteo, zenquality, robin_petier, alphalink, game-deploy, config, explanations), 9 false-positive classes fixed and locked by benign tests. Journal done. [ ] BDR-120 awaits user approval; [ ] commit + merge = user go - [x] T8 passwords (user ask 2026-10-18): doctrine bullet in the rule (argon2id, no clear compare, no log, no literal, delegated auth), `checks/passwords.py` in the api domain (API-PASSWORD-PLAINTEXT / WEAK-HASH / LOGGED FAIL, LITERAL WARN), 8 mutants + 10 benign locks (89 checks), auditor maps PLAINTEXT to CRITICAL; calibrated on 7 projects: 0 hits after one FP fix (yaml volume mount `htpasswd:/etc/...`) +- [x] T9 live probe (user ask 2026-10-18, "attaque de l'exterieur ?"): `skills/guardrails/scripts/probe.py` read-only (GET/HEAD/OPTIONS, `--authorized` gate, env secrets, same-host redirect only, request budget, 25-req burst cap). 5 probes: anon-read, cross-user, no-auth route, cors-reflect, rate-limit. Suite `lib/tests/guardrails-probe.test.sh` 16/16 vs a localhost http.server fixture. SKILL STEP 5 + checks.md section + CHANGELOG/README/USAGE. Redirect-guard unit test blocked by the auto-mode classifier (SSRF-shaped fixture), guard is code-reviewed. ## 2026-10-17 — /explain-diff skill: HTML explanation of a diff (feature/explain-diff) Source: geoffreylitt gist `explain-diff-html` (Notion variant dropped). Built through the skill-creator loop (draft, evals with/without skill, user review).