Reference architecture
Four topologies, one binary, identical policy.
Chainsaw is a supply chain firewall between your developers, CI and clusters and the seventeen registries they pull from. It ships as one binary that runs in four topologies: SaaS, customer cloud, on-prem with one proxy per business unit, or air-gapped. The Rego bundle and the audit-row schema are the same in all four, so the topology changes where Chainsaw runs, not what it decides.
Dataflow
How does a request flow through the Chainsaw proxy?
A client such as npm, pip, docker or the kubelet resolves the registry host to the Chainsaw proxy. The proxy returns a structured refusal or streams the bytes to the client, and either way a signed audit row is written.
-
01 · Client
npm, pip, docker, kubeletresolves the registry host to the proxy
-
02 · chainsaw-proxy
- authenticate, identify workspace
- 25 signals beyond CVE
- Rego bundle
- Trivy on OCI layers
cache miss: upstream fetch, then evaluate · hit: verdict from memory
-
Structured refusal
signed audit row written
Bytes streamed
signed audit row written
K8s admission runs the same bundle against the pod spec and returns admit, warn or deny.
Component map · HA
What runs, and what breaks if it dies?
Chainsaw is one binary, and the topology decides where each piece sits.
| Component | Owns | If it dies |
|---|---|---|
| chainsaw-proxy | Evaluates the Rego bundle; forwards, serves from cache or refuses | Stateless; restart costs the cache warm-up |
| Billy, approval queue | Exception approvals, written as signed rows | Read-only; pending requests never auto-approve |
| Postgres | Audit rows, exceptions, policy versions, RBAC | Replica failover; block mode refuses rather than emit unrecorded decisions |
| Blob store | SBOMs, scan artefacts, bundle payloads | SBOM browsing degrades; enforcement continues |
| NATS policy-bus | Optional cache invalidation between replicas | Falls back to a 15s cache TTL; verdicts unchanged |
| K8s admission webhook | Same bundle against pod and image specs | failurePolicy Ignore in warn, Fail in block |
| Intel-bundle store | Digest-verified intel bundle, loaded from CHAINSAW_INTEL_BUNDLE_PATH at start | Failed verification: previous bundle stays |
Topologies
Where can Chainsaw run?
Chainsaw runs in four topologies with the same binary, Rego bundle and audit-row schema.
-
SaaS, Chainsaw-hosted
Figure 1 · SaaS Chainsaw runs the control and data plane.
-
Customer cloud
Figure 2 · Customer cloud (dashed: out-of-band control plane) Data plane in your cloud; no inbound vendor connection.
-
On-prem, one proxy per BU
Figure 3 · On-prem, one proxy per BU A deployment pattern you run: each proxy verifies the same signed Rego bundle, which you distribute.
-
Air-gapped
Figure 4 · Air-gapped Zero outbound: CHAINSAW_OFFLINE=1.
Identity flow
How do Okta and Entra groups reach a Chainsaw policy?
Okta or Entra ID pushes users and groups to Chainsaw over SCIM, and Chainsaw stores them in
Postgres. At evaluation time they reach the Rego input as input.actor.groups, so
policies predicate on the directory without re-querying the IdP at evaluation time.
-
01 · Identity provider
Okta or Entra
-
02 · SCIM push
Users and groups into Postgres
-
03 · Rego input
input.actor.groups
Latency budget
How fast is a Chainsaw verdict?
Chainsaw targets a p50 under 8 ms on a cache hit, a p95 under 450 ms on a cache miss and a p99 under 250 ms for a Kubernetes admission decision. These are targets, not measurements. Deployments publish observed p50 / p95 to your Prometheus.
| Path | Target | Note |
|---|---|---|
| Cache hit, policy unchanged | p50 target < 8 ms | No network egress on the hot path |
| Cache miss, upstream fetch + 25 signals + Rego eval | p95 target < 450 ms | Dominated by upstream registry latency |
| K8s admission decision | p99 target < 250 ms | Ledger write is async |
Air-gapped operational lifecycle
How do you update an air-gapped Chainsaw?
You sideload a signed intel bundle, verify it, and restart. chainsaw bundle verify
checks the manifest, hashes and digest binding (--strict adds Sigstore authenticity);
CHAINSAW_INTEL_BUNDLE_PATH points the proxy at the bundle, and providers pick it up on
the next refresh tick after the restart. chainsaw doctor --offline shows which
registries the loaded bundle can adjudicate. A failed verify loads nothing; the previous bundle
stays.
# manifest, hashes and digest binding (--strict adds Sigstore authenticity)
chainsaw bundle verify ./chainsaw-intel-bundle-2026-05-25.tar.gz
# point the proxy at it and restart; providers pick it up on the next refresh tick
CHAINSAW_INTEL_BUNDLE_PATH=./chainsaw-intel-bundle-2026-05-25.tar.gz
# which registries the loaded bundle can adjudicate
chainsaw doctor --offline CHAINSAW_OFFLINE_FAIL_MODE is advisory: it refuses nothing on its own, and each
policy condition applies its own outage fall-back.
Telemetry surfaces
What telemetry does Chainsaw export?
Chainsaw exports OpenTelemetry (OTLP) traces and metrics, Prometheus metrics, golden-signal alerts and a stable JSON audit-row schema.
| OpenTelemetry (OTLP) | traces and metrics |
|---|---|
| Prometheus | latency by verdict, cache hit ratio, bundle age |
| Golden-signal alerts | 5xx rate, p99, burn rate, bundle age, NATS lag |
| Audit-row schema | stable JSON for Splunk, Sentinel and QRadar |
Security baseline
Which security defaults does Chainsaw ship with?
Chainsaw ships a non-root, read-only, distroless container and a Sigstore-verified policy bundle; Sigstore signing and SLSA provenance for the binary are on the roadmap, not yet live.
| Container identity | uid 10001, non-root, read-only root filesystem, distroless |
|---|---|
| Verified binary | published SHA-256 checksum; Sigstore signing and SLSA provenance on the roadmap, not yet live |
| Signed policy bundle | Sigstore-verified at load; disabling it needs an explicit, audited workspace flag |
| HTTP security headers | CSP, X-Frame-Options, Referrer-Policy on every admin response |
Scope boundary
What is Chainsaw not?
Chainsaw is not a SAST tool, a secret-at-rest scanner, a CI posture auditor or an endpoint agent. It refuses on the install path and composes with the categories below.
Architect review
Walk an engineer through your topology
30 minutes with a Chainsaw engineer. Bring your network diagram; leave with a placement plan.