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.

  1. 01 · Client

    npm, pip, docker, kubelet

    resolves the registry host to the proxy

  2. 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

  3. 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.

ComponentOwnsIf it dies
chainsaw-proxyEvaluates the Rego bundle; forwards, serves from cache or refusesStateless; restart costs the cache warm-up
Billy, approval queueException approvals, written as signed rowsRead-only; pending requests never auto-approve
PostgresAudit rows, exceptions, policy versions, RBACReplica failover; block mode refuses rather than emit unrecorded decisions
Blob storeSBOMs, scan artefacts, bundle payloadsSBOM browsing degrades; enforcement continues
NATS policy-busOptional cache invalidation between replicasFalls back to a 15s cache TTL; verdicts unchanged
K8s admission webhookSame bundle against pod and image specsfailurePolicy Ignore in warn, Fail in block
Intel-bundle storeDigest-verified intel bundle, loaded from CHAINSAW_INTEL_BUNDLE_PATH at startFailed 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

    Dev / CI developer + CI runners Chainsaw SaaS chainsaw-proxy Postgres Blob store Intel bundle Upstream registries npm / PyPI / Docker
    Figure 1 · SaaS

    Chainsaw runs the control and data plane.

  • Customer cloud

    Customer cloud Dev / CI chainsaw-proxy Postgres Blob store Chainsaw control managed updates Upstream registries npm / PyPI / Docker
    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

    Signed Rego bundle one bundle, distributed by your operators signature verified by each proxy at load BU-A chainsaw-proxy BU-B chainsaw-proxy BU-C chainsaw-proxy BU-D chainsaw-proxy solid: same signed bundle, loaded by each proxy
    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

    Customer perimeter (no outbound) Dev / CI chainsaw-proxy Local cache Postgres Intel bundle (sideloaded) Signed bundle tarball manual transfer no outbound
    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.

  1. 01 · Identity provider

    Okta or Entra

  2. 02 · SCIM push

    Users and groups into Postgres

  3. 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.

PathTargetNote
Cache hit, policy unchangedp50 target < 8 msNo network egress on the hot path
Cache miss, upstream fetch + 25 signals + Rego evalp95 target < 450 msDominated by upstream registry latency
K8s admission decisionp99 target < 250 msLedger 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
Prometheuslatency by verdict, cache hit ratio, bundle age
Golden-signal alerts5xx rate, p99, burn rate, bundle age, NATS lag
Audit-row schemastable 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 identityuid 10001, non-root, read-only root filesystem, distroless
Verified binarypublished SHA-256 checksum; Sigstore signing and SLSA provenance on the roadmap, not yet live
Signed policy bundleSigstore-verified at load; disabling it needs an explicit, audited workspace flag
HTTP security headersCSP, 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.