Text Classification
Safetensors
Rust
English
shell-security
shell-risk
bash
powershell
cmd
coding-agents
agent-security
tool-call-security
tf-idf
logistic-regression
cedar
policy-as-code
cpu-inference
agents
ai-agents
agentic-ai
claude-code
codex
terminal
command-line
cli
linux
windows
devops
security
llm-security
ai-security
guardrails
agent-guardrails
command-injection
data-exfiltration
risk-classification
scikit-learn
linear-model
on-device
edge
low-latency
python
Eval Results (legacy)
Model card and FACTS.md: absolute links
Browse filesFiles changed (3)
- FACTS.md+1-1
- README.md+9-9
- manifest.json+2-2
10 unmodified lines111213141415161710 unmodified linessorted and lists are sorted, except `segments`, which keep command order.
Some enums follow DefenseClaw's `defenseclaw.guardrail.semantic.v1` schema (Apache-2.0, see[THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md)): operation kinds, path access, network scope, parse status and[THIRD_PARTY_NOTICES.md](https://huggingface.co/patronus-studio/cat-shell-risk-commander/blob/main/THIRD_PARTY_NOTICES.md)): operation kinds, path access, network scope, parse status anddialect. Patronus adds object classes, verbs, roles, flows and atoms.
## Contents36 unmodified lines37383940404142424344451 unmodified line474849505051525364 unmodified lines11811912012112112212312410 unmodified lines13513613713813813914014127 unmodified lines16917017117217217317417549 unmodified lines225226227228228229230231232233234235235236237238129 unmodified lines36836937037137137237337436 unmodified lines - {type: false_positive_rate, name: FPR at ask threshold (bundle), value: 0.203}---

<p align="center"><a href="#quickstart">Quickstart</a> · <a href="#policies">Policies</a> · <a href="#earlier-turns-and-context">Earlier turns</a> · <a href="FACTS.md">Facts reference</a> · <a href="#benchmarks">Benchmarks</a> · <a href="#comparison-with-secjudge">SecJudge comparison</a> · <a href="#limitations">Limitations</a></p><p align="center"><a href="#quickstart">Quickstart</a> · <a href="#policies">Policies</a> · <a href="#earlier-turns-and-context">Earlier turns</a> · <a href="https://huggingface.co/patronus-studio/cat-shell-risk-commander/blob/main/FACTS.md">Facts reference</a> · <a href="#benchmarks">Benchmarks</a> · <a href="#comparison-with-secjudge">SecJudge comparison</a> · <a href="#limitations">Limitations</a></p>
**Decide before an agent runs a shell command: allow, ask or block, with the reason.**
1 unmodified linethem. Each check has three parts:
1. **Facts.** The command is read into structured facts, `patronus.facts/1`: which program runs, with which verb, on which objects, and where the data flows. Every field and value is listed in [FACTS.md](FACTS.md). verb, on which objects, and where the data flows. Every field and value is listed in [FACTS.md](https://huggingface.co/patronus-studio/cat-shell-risk-commander/blob/main/FACTS.md).2. **Model.** A linear model scores the text together with those facts.3. **Cedar policies.** Policies run over the same facts. You can add your own policies, and pass the facts of earlier commands so that the check sees chains such as "write a secret to a file, then upload the file".64 unmodified linesprint(v["decision"], [p["id"] for p in v["policies"]])```
Output of [`examples/quickstart.py`](examples/quickstart.py):Output of [`examples/quickstart.py`](https://huggingface.co/patronus-studio/cat-shell-risk-commander/blob/main/examples/quickstart.py):
```textallow score -4.11 git status --short10 unmodified lines
`Bundle.score(command, context=None, prior_facts=None, user_policies=(), allowlist=None)` returns the verdictabove. `shellrisk.facts.extract.extract(command, context=None, prior_facts=None)` returns the facts alone; theirfields are described in [FACTS.md](FACTS.md).fields are described in [FACTS.md](https://huggingface.co/patronus-studio/cat-shell-risk-commander/blob/main/FACTS.md).
## Policies
27 unmodified linesfails any check raises `ValueError`. User policies cannot contain regexes.
The full list of fields and values, and how each fact maps to the policy context, is in[FACTS.md](FACTS.md#how-facts-reach-the-policies-cedar-context).[FACTS.md](https://huggingface.co/patronus-studio/cat-shell-risk-commander/blob/main/FACTS.md#how-facts-reach-the-policies-cedar-context).
**Segment context** (one per command in the text):
49 unmodified lines`context` (`cwd`, `home`, `repo_root`, `dialect`) is trusted input from your harness. Relative paths are resolvedlexically, and files under fixture directories of the repository count as fixtures, not secrets. Context reachesonly the policies: the model was trained on command text alone. The full script is[`examples/policies_and_context.py`](examples/policies_and_context.py).[`examples/policies_and_context.py`](https://huggingface.co/patronus-studio/cat-shell-risk-commander/blob/main/examples/policies_and_context.py).
## Benchmarks
All numbers are for the bundle (model plus the same policies) at each model's own thresholds, on sets that arenot used for training. For reference, each table also shows revision `30d77a80` of this repository, thelinear model without facts and Cedar policies. The full reports are in[`evaluation.json`](evaluation.json).[`evaluation.json`](https://huggingface.co/patronus-studio/cat-shell-risk-commander/blob/main/evaluation.json).
### Detection and false positives
129 unmodified lines## Citation and licence
Released under the Apache License 2.0. Third-party data licences are listed above and in `manifest.json`; theDefenseClaw attribution is in [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md).DefenseClaw attribution is in [THIRD_PARTY_NOTICES.md](https://huggingface.co/patronus-studio/cat-shell-risk-commander/blob/main/THIRD_PARTY_NOTICES.md).
```bibtex@misc{catshellriskcommander2026,41 unmodified lines424344454546474748495041 unmodified lines "parity/": "shellrisk parity-export of models/k26: reference facts, kf1 tokens, scores, policies and verdicts for runtime ports; parity_ci and chains are public (MIT / Apache-2.0 sources and synthetic rows)" }, "files": { "FACTS.md": "b11864e6b983342a01eee25e7b9aa42253b508af938c51cd59dd934ee2e30ad7", "FACTS.md": "e6f7c0f312aa7d75b241a6839b570cbfd5cffeb8afdfbe8afe20514065d6e0e4", "LICENSE": "cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30", "README.md": "96e59d687fc6bb7ac452ba18a315e911b2ef4f7eeac9835b530974a769ce6111", "README.md": "c7a2f2dcca05b10ce8e5cb360e29826e71a9b1892a80a13dad80433b6cbe04f8", "THIRD_PARTY_NOTICES.md": "cdbd7833673a11abf3cf4e55a99840940fef6575d3b2277bd51016cce2a4e4b4", "assets/cat-shell-risk-commander-banner.png": "b2d74b956b768d16b2ac92030534ce4bbdb28a40e6fe3fde6c2f46fc0293166f", "evaluation.json": "c32b5abf942b58b9df617482b29d1455db137fcb64d33b39692b0a77d407f76b",FACTS.md+1-1
README.md+9-9
manifest.json+2-2