# Chainguard integration

Integrations / Base images. Breadcrumb: [Home](https://osty.dev/) / [Integrations](https://osty.dev/integrations) / Chainguard

Chainguard supplies minimal base images; Osty rolls them out. Pin each image by `@sha256`, record the base digest with `osty stamp --base-image-digest`, and Osty can open digest-bump pull requests in topological waves, auto-merge them under policy on green CI and canary gates, and flag workloads still running an older image.

Table: Who does what in a Chainguard plus Osty setup

| Task | Chainguard | Osty |
| --- | --- | --- |
| Build minimal, signed base images | Yes | No. Osty is not a base-image vendor. |
| Pin the image in each Dockerfile | Publishes digests | Opens `@sha256` bump pull requests in waves. |
| Merge the bump | Not involved | `AUTO_MERGE_SAFE` under policy, after CI and canary gates. |
| Vet packages installed on top | Chainguard Libraries for supported ecosystems | Detonation verdicts for npm and PyPI; proxy checks for six ecosystems. |
| Find services on old images | Not involved | Runtime lineage from `base_image_digest` in `osty stamp` attestations. |

Record the base image in build provenance:

```bash
osty stamp --artifact-digest "$IMAGE_DIGEST" --base-image-digest "$BASE_DIGEST" --signing-key stamp.pem --out provenance.json
```

## How should Dockerfiles reference Chainguard images?

Pin both stages by digest. A digest bump is a deterministic change, which is what makes it eligible for policy-gated auto-merge; a floating tag is not.

`Dockerfile` with digest-pinned Chainguard stages:

```text
FROM cgr.dev/chainguard/python:latest-dev@sha256:<builder-digest> AS build
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir --target /app/deps -r requirements.txt
COPY . .

FROM cgr.dev/chainguard/python:latest@sha256:<runtime-digest>
WORKDIR /app
COPY --from=build /app /app
ENV PYTHONPATH=/app/deps
ENTRYPOINT ["python", "main.py"]
```

Gate the Python packages before the build installs them:

```bash
osty verify --lockfile requirements.txt --json
```

## How does a new Chainguard digest roll across services?

1. Osty reads `base_image_digest` from each build's attestation to find every service on the old image.
2. It plans waves from the internal dependency graph, so internal base images built on Chainguard ship before the services that use them.
3. Each bump runs speculative CI within the `ciGovernor` budget.
4. Tiers allowed `AUTO_MERGE_SAFE` merge on green CI; deploys pass canary soak and error-rate gates before the next wave.

`autonomy` section of `.osty/policy.yaml`:

```yaml
autonomy:
  defaultTier: VERIFIED_PR
  canaryDefaults:
    soakMinutes: 30
    maxErrorRateDeltaPct: 1.0
    maxP99DeltaPct: 20
    zeroOOMKills: true
  tiers:
    TIER_0:
      maxAutonomy: VERIFIED_PR
      requireObservabilityGate: true
    TIER_1:
      maxAutonomy: AUTO_MERGE_SAFE
      requireObservabilityGate: true
      canarySoakMinutes: 15
    TIER_2:
      maxAutonomy: CANARY_ROLLOUT
      allowStaleMainAutoRedeploy: true
```

## What does Osty check when moving to a Chainguard image line?

Moving from a Debian or Ubuntu base to a Chainguard image changes the C library and system packages under your native wheels and binaries. Osty reads ELF `DT_NEEDED` and `VERNEED` entries to confirm the target image meets each binary's glibc floor, and stops the change as `ENV_BLOCKED` with the exact blocker when it does not.

## How does Osty triage CVEs on Chainguard images?

Osty's distro backport triage reads Debian, Ubuntu, Alpine, RHEL and Amazon Linux security data. It does not ingest Chainguard's own advisory feed today, so use Chainguard's advisories for packages inside Chainguard images and Osty's backport proof for images you have not migrated.

## Frequently asked questions

### Can Osty auto-merge a Chainguard digest bump on a Tier-0 service?

Only if your policy allows it. The example policy caps `TIER_0` at `VERIFIED_PR`, so a person merges.

### Does Osty work with free Chainguard images?

Yes. Osty works with whatever digest your Dockerfile pins.

### Do I need the registry proxy for this?

No. Digest waves need the GitHub App, `osty stamp` provenance and `osty-edge` for autonomy above `VERIFIED_PR`.

## Related pages

- [Osty vs Chainguard](https://osty.dev/compare/osty-vs-chainguard): Why the two products are complementary.
- [Plan](https://osty.dev/plan): Upgrade intelligence: distro backport normalization, ELF and glibc ABI floors, SPDX license shifts, breaking call sites and topological rollout waves.
- [Ship](https://osty.dev/ship): Fleet campaigns on Temporal, offline AI migrations capped at `VERIFIED_PR`, the Policy Patch Verifier, CI side-effect classification, canary gates and a stateful-safe kill switch.
- [CircleCI integration](https://osty.dev/integrations/circleci): Stamp builds with `--base-image-digest` in CircleCI.

## See your fleet in 10 minutes

Connect a read-only GitHub App and cloud role. Osty installs nothing in your environment and writes nothing to your repositories, and the report shows false positives, stale deploys and unowned workloads.

Get a free X-Ray: https://osty.dev/xray

Written by Osty Engineering. Published 2026-11-29. Updated 2026-11-29.

Canonical: https://osty.dev/integrations/chainguard
