| Detector | Slug | Sides | Protocols | Mutable |
|---|---|---|---|---|
| Code Sanitation | code_sanitation | input | all | — |
Code Sanitation — code_sanitation
Detects dangerous code‑injection patterns by language in the request and reports
each match as a finding (signal.type: "code_injection"). It never rewrites the
payload.
Built‑in languages: javascript, python, php, sql, shell, html.
Settings
| Field | Type | Default | Notes |
|---|---|---|---|
apply_all_languages | boolean | false | Enable every built‑in language pattern set. |
languages | array<{ language, enabled }> | — | Enable specific languages (language is one of the built‑ins). |
custom_patterns | array<{ name, pattern, description }> | — | Your own regex signatures (pattern required, must compile). |
When to use
- Put this in front of any system that forwards prompt/tool content into databases, shells, templating engines, or downstream APIs.
- Start with the Monitor action to baseline false positives on real traffic, then promote the policy rule to Block.
- It is pattern‑based and complementary to the LLM‑aware content‑security detectors — run both.