Policy comes first
Rules from global, project and user layers are matched against the action. The most restrictive effect wins: block over confirm over allow.
XRisk sits between an agent’s intended action and the thing that executes it. It checks policy, prompts, secrets and network use, then returns one of those three answers, with the reasons attached.
Pick an action to see what XRisk does with it.
riskIllustrative. Real decisions come from your own policy pack.
Agents fail in predictable ways: tools with too much power, prompts that get hijacked, secrets that leak, and requests that head somewhere they shouldn’t. XRisk sits in the gap between intent and action and says allow, confirm or block, with its reasons attached.
Rules from global, project and user layers are matched against the action. The most restrictive effect wins: block over confirm over allow.
The prompt is inspected for injection and anomalies. The payload is checked for secrets and personal data.
Role limits, capability tokens and network egress rules decide whether this actor can do this thing, and reach that address.
Risk signals are combined, the circuit breaker updates, and the decision lands in a hash-chained audit trail with reasons attached.
Layered global, project and user rules, validated against a schema. Check policy packs in CI for conflicts, shadowed rules and critical allow overrides before they roll out.
Weighted scoring with a breakdown. Every decision says why.
Inspects prompts and scores anomalies before the action runs.
Detects sensitive data and gives you redaction utilities.
Sandbox what an actor may do, and for how long.
Allowlists and denylists for outbound network requests.
Stops repeated loops and escalating risk before they snowball.
Decisions are written to a hash chain. Deterministic forensic hashes let you replay a past decision and check it still holds.
Signature and provenance checks before enforcement.
Verifies consistency and evidence in what the model claims.
Four ways to get the same xrisk command. Start with npx if you only want to try it.
npx xrisk-engine assess --action-file examples/action.json
curl -fsSL https://raw.githubusercontent.com/Hootsworth/XRisk/main/install.sh | sh
brew tap hootsworth/xrisk brew install xrisk
npm install -g xrisk-engine
Prefer to embed it? The README covers createNodeXRisk on the GitHub page.
Pipe in an action and read the decision. Pick a profile to match how strict you need to be. XRisk is a safety layer, not a replacement for hardening your infrastructure.
XRisk is released under the Apache License 2.0. Fork it, add tests for any behaviour change, run npm test, and explain policy or risk changes in your pull request.