Models
Two small classifiers add evidence the rules miss. They run on CPU with ONNX Runtime, with no GPU and no external API calls. They are clues, not verdicts.
| Model | Role | Size | Licence |
|---|---|---|---|
| Attestyx Guard 32M | scores each agent step for 8 risk types | 32M parameters, ONNX | Apache-2.0 |
| Wolf Defender Edge → Small | prompt-injection detector for tool output and fetched content | 80M / 141M, ONNX | Apache-2.0 |
How the models affect severity
- Rules and trails decide severity.
- A model clue alone never raises a session above MEDIUM (rules
M10toM15). - No model ever lowers a severity.
M01andM02show the raw model flags as evidence only. They never change severity.ATTESTYX_MODEL_CLUESchooses which clues may raise severity;offkeeps them as evidence only.
Attestyx Guard 32M
A small classifier that scores one step of an AI coding agent for 8 kinds of risk. It runs on CPU with ONNX Runtime, at about 85 ms per step on one thread, with no GPU and no torch. The full model card, with usage code and credits, is on Hugging Face.
Flags
| Flag | Meaning |
|---|---|
secret_access | reads a secret or credential (.env with real values, keys, tokens, password stores) |
secret_exposure | a real-looking secret value is visible in the text, or a credential file is shared |
data_outbound | sends data or a file to another host or service |
destructive | irreversibly deletes or overwrites important data |
privilege_persistence | gains elevated or lasting access (sudo, SSH keys, cron, services, shell profiles) |
security_evasion | hides activity or weakens safety (clears history, disables checks or monitoring) |
remote_code | downloads code from the internet and runs it |
injection_in_content | text (tool output, web page, file) that tries to give the AI agent orders |
Input
One string per step: "[CHANNEL] text", where CHANNEL is one of:
CMD: a shell command;FILE: a file tool and its path, plus edit content;URL: a fetch;TOOL: another tool call;MSG: a developer message;OUT: tool output (onlyinjection_in_contentandsecret_exposureapply here).
Texts longer than 2,048 characters are cut to the first and last 1,024; the max length is 256 tokens. The output is 8 sigmoid scores. config.json holds the production thresholds.
Results
On a sealed holdout of agentapprove/coding-agent-tool-call-safety, never trained on:
- any-risk AUC 0.867;
- recall 51% at 5% safe flagged, 60% at 10%;
- at the production thresholds: 50% of risky calls caught, 7% of safe look-alikes flagged, 4.5 per 1,000 ordinary real developer steps flagged.
| Flag | Precision | Recall |
|---|---|---|
secret_access | 0.91 | 0.42 |
secret_exposure | 0.86 | 0.55 |
data_outbound | 0.90 | 0.68 |
destructive | 1.00 | 0.06 |
privilege_persistence | 0.95 | 0.24 |
security_evasion | 0.47 | 0.20 |
remote_code | 0.61 | 0.64 |
In the Attestyx system (rules v44 + this model), on a fresh blind test of 96 multi-turn agent sessions scored once, it caught the same attacks as the previous model (v2.1) and raised 32% fewer false-alarm clues on real developer work (17 vs 25 steps on held-out sessions).
Limits
- Precision is tuned high and recall is modest. It misses many destructive and privilege steps that rules catch well. Pair it with rules.
- It judges one step at a time. It does not see the conversation, so it cannot tell "asked for" from "not asked for", or a covert sabotage hidden in long legitimate work.
- The training labels come from LLM labellers and public datasets with their own definitions of "risky"; there is no shared standard.
- English, shell- and coding-centric.
- No int8 file: dynamic int8 quantization changed scores by more than 0.5 on about 1% of steps, so only fp32 is published.
Training
Base model: jhu-clsp/ettin-encoder-32m (MIT), fine-tuned as a multi-label classifier. Data: public sets, synthetic risky / safe look-alike pairs written by LLMs, and steps from real developer sessions that were pseudonymized before use (secrets, home folders, emails and names replaced by fakes). No raw session text is in the model repository. Dataset credits are on the model card.
Wolf Defender
Wolf Defender Edge → Small is a prompt-injection detector for tool output and fetched content, 80M / 141M, ONNX, Apache-2.0, from patronus-studio. In Attestyx it produces M02 (evidence only) and M10 (a MEDIUM clue: content the agent read gives the AI orders). Set ATTESTYX_INJECTION_MODEL=off to disable it.
Download and pinning
scripts/download_models.pyfetches each model at a pinned commit and verifies its SHA-256, so a changed upstream repository cannot be pulled in silently.- With Docker, the models are downloaded at image build time and baked into the server image.
- If you use Guard 32M on its own, pin a revision in production.
Runtime
- ONNX Runtime on CPU. No GPU, no external API calls.
- Scores are cached per piece of text, so re-scoring is cheap.
ATTESTYX_MODEL_THREADSsets the CPU threads per model (default1).ATTESTYX_STEP_MODELpoints at the step model folder (defaultmodels/current), oroff.- Without the model files, each model layer switches itself off and Attestyx runs on rules and trails alone.