Repository navigation
Add container-storage support for Podman and Buildah - #5368
Merged
Merged
Conversation
There was a problem hiding this comment.
Warning
Changes github configuration, dependencies, or agent instructions — this requires manual review from @anchore/tools
No action from the PR author is needed.
Guarded files touched in this PR:
.github/workflows/release.yaml(sha:d1cad71b8d1b02ffd3ad0fdf0594fa1577ca3b13).github/workflows/validations.yaml(sha:97acdb6c83ac573439c89b499b111ee58ab3e64b)
This review disposition can be dismissed after manual review.
…ests and documentation Signed-off-by: Bruce Clark <bruce.clark@mandg.com>
…ndle missing images Signed-off-by: Bruce Clark <bruce.clark@mandg.com>
Install uidmap for Podman and Buildah CI jobs. Align temporary rootful and rootless storage paths. Clean up rootless stores within the builder's user namespace. Signed-off-by: Bruce Clark <bruce.clark@mandg.com>
- containers-storage is no longer part of automatic image resolution; it's used only for `--from containers-storage`, the `containers-storage:` scheme, or `default-pull-source: containers-storage` (now an accepted value). Opening a store runs full graph driver init (mounts, locks, store writes), which is too invasive as a probe on every plain image reference. - rootless stores must be read from inside the builder's user namespace (`podman unshare syft ...`), documented in the README. - the `containers_image_openpgp` tag is now applied to unit/integration tests and lint, so dev tooling compiles the same provider that ships. - containers-storage CI runs through `make containers-storage-test` and covers both vfs and overlay stores. Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
- cgo-enabled linux builds (`-race` tests, lint) compile go.podman.io's btrfs graph driver, which needs libbtrfs headers. Add `exclude_graphdriver_btrfs` alongside `containers_image_openpgp` everywhere the tag is set; release builds are `CGO_ENABLED=0` and never included it. - the overlay driver bind-mounts its graphroot inside the rootless user namespace, so the containers-storage test unmounts it before removing the store, and cleanup no longer fails the run. Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
wagoodman
enabled auto-merge (squash)
October 5, 2026 14:45
wagoodman
approved these changes
Oct 5, 2026
wagoodman
added a commit
to Bru456/grype
that referenced
this pull request
Oct 5, 2026
- containers-storage is meant to be used only when requested by name (`--from containers-storage`, the `containers-storage:` scheme, or `default-image-pull-source: containers-storage`). That gating lives in syft (anchore/syft#5368), so plain image references keep probing the local store until grype bumps syft. - set `containers_image_openpgp,exclude_graphdriver_btrfs` everywhere the linux build tag applies (goreleaser, unit, integration, race smoke, golangci-lint), so Go tooling compiles the provider that ships. The btrfs exclude avoids needing libbtrfs headers on cgo builds. - run the e2e through `make containers-storage-test BUILDER=podman|buildah`. It now covers `vfs` and `overlay` stores, runs rootless scans under `<builder> unshare`, asserts the image came out of the store, and checks that plain refs never touch it. - README documents explicit usage and `podman unshare` for rootless stores. Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
wagoodman
added a commit
to Bru456/grype
that referenced
this pull request
Oct 5, 2026
picks up anchore/syft#5368, which only uses the containers-storage provider when requested by name. This pins syft (and transitively stereoscope and go-rpmdb) to unreleased pseudo-versions; swap to the next syft release before merging. Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
wagoodman
added a commit
to anchore/grype
that referenced
this pull request
Oct 5, 2026
* feat: add containers-storage support for Podman and Buildah Enable containers-storage in Linux release builds, document usage, and add provider routing and end-to-end Podman/Buildah validation. Signed-off-by: Bruce Clark <bruce.clark@mandg.com> * chore: align containers-storage support with syft - containers-storage is meant to be used only when requested by name (`--from containers-storage`, the `containers-storage:` scheme, or `default-image-pull-source: containers-storage`). That gating lives in syft (anchore/syft#5368), so plain image references keep probing the local store until grype bumps syft. - set `containers_image_openpgp,exclude_graphdriver_btrfs` everywhere the linux build tag applies (goreleaser, unit, integration, race smoke, golangci-lint), so Go tooling compiles the provider that ships. The btrfs exclude avoids needing libbtrfs headers on cgo builds. - run the e2e through `make containers-storage-test BUILDER=podman|buildah`. It now covers `vfs` and `overlay` stores, runs rootless scans under `<builder> unshare`, asserts the image came out of the store, and checks that plain refs never touch it. - README documents explicit usage and `podman unshare` for rootless stores. Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> * chore(deps): bump syft to main for explicit-only containers-storage picks up anchore/syft#5368, which only uses the containers-storage provider when requested by name. This pins syft (and transitively stereoscope and go-rpmdb) to unreleased pseudo-versions; swap to the next syft release before merging. Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> * chore: tidy containers-storage CI and flag help - fold the Podman and Buildah jobs into one matrix job pinned to `ubuntu-24.04`. Check names are unchanged, and the job carries the release.yaml rename note. - list `containers-storage` in the `--from` flag help. Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> * test: drop provider config sources test covered by the containers-storage e2e Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> * ci: reference the bootstrap action with self-repository syntax zizmor's new `self-repository` audit flags `uses: ./...`. `uses: $/...` resolves from the workflow's own commit instead of the checked-out workspace, so a previous step can't swap the action on disk. Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> * ci: revert self-repository syntax, disable the zizmor rule instead `uses: $/...` makes the runner download the repo as an action archive. Staging that archive fails because the archive omits submodules, so `test/quality/.yardstick/labels` (a symlink into the `vulnerability-match-labels` submodule) dangles. This goes back to `./...` and disables zizmor's `self-repository` audit with that reason. Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> --------- Signed-off-by: Bruce Clark <bruce.clark@mandg.com> Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> Co-authored-by: Bruce Clark <bruce.clark@mandg.com> Co-authored-by: Alex Goodman <wagoodman@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Enable stereoscopes
container-storageprovider in Linux release builds. Allowing Syft to scan local images built with daemonless Podman or Buildah. Introduced in stereoscope PR: anchore/stereoscope#635 and released in version 0.3.3.Plain image references also check the local store before registry lookup. No new configuration options are introduced. MacOS and Windows release builds remain unchanged.
Default and tagged unit tests pass. Both builder tests passed in root and non root Linux containers (locally on my machine).
Podman 4.9.3 and Buildah 1.33.7 installed from Ubuntu 24.04 apt repos. Buildah 1.45.1 built from source in a local go container.
Local tests including building Linux ARM64 Syft locally, copying the binaries into fresh Ubuntu Linux containers with Podman installed on one and buildah on the other. Each test built a local image used Syft to produce an SBOM and validated it with the shared test script in
test/containers-storage/source-test.sh.Rootless tests ran as UID 1001 inside privileged outer containers to permit nested user namespaces. Execution directly on GitHub-hosted runners remains to be verified in CI.
Type of change
Checklist
Issue references
Fixes #1664
Fixes #1173
Fixes #2107