Policy & Enforcement
Decide what installs and what gets refused — CVSS/EPSS gates, license rules, freshness, geo/IP, monitor mode, fail-closed, and owner routing.
Policies are how Chainsaw turns “we saw a risky package” into “the install was refused.” Start with the policy model (precedence and exceptions), add your first high-signal gate, then move from authoring rules to operating them safely with monitor mode and tuning.
Policy DSL & signed bundles
Beyond the built-in conditions, Chainsaw lets you author custom org-specific rules in Rego / OPA and ship them as a signed bundle — the product’s policy-as-code surface, enforced at every surface (PR, proxy, publish, K8s admission, runtime, promote).
- Policy DSL Reference (Rego / OPA Authoring Surface) — the
chainsaw.policyentrypoint, the input fields a rule can read, the decision shape, and worked examples - How to Author, Sign, and Load Signed Policy Bundles — author → cosign sign → verify-at-load → promote, with the bundle digest on every signed audit row
- YAML Conditions vs the Rego Policy DSL — the two policy surfaces, when to use which, and how they relate
When a signal could not be evaluated
By default, a signal Chainsaw could not evaluate — feed stale, upstream down, no artifact bytes — is recorded and the install proceeds. Chainsaw does not fail closed as shipped. Regulated and air-gapped deployments can opt into the opposite behaviour for the data sources they name.
- How to Refuse Installs When a Required Signal Could Not Be Evaluated — the optional fail-closed coverage gate: the eight source names, what each surface can honestly attest, and why you should start in
warn. Off by default; not wired into CI.
Where to next
The what you block comes from Threat Detection (the conditions) and Provenance & SBOM. Watch policy outcomes in Monitoring & Compliance.