Repository navigation
Conversation
Application repositories each kept their own Docker workflow, and the copies drifted: unpinned action tags, images pushed from pull requests, and no vulnerability scan. build-image.yml is one standard they call: - builds the image, scans it with digest-pinned Trivy, and fails on fixable CRITICAL vulnerabilities (HIGH reported, .trivyignore for documented exceptions) - pull requests build and scan only; other events push to GHCR (with an optional Docker Hub mirror) with SBOM and provenance attestations, sign the digest with keyless cosign, and output image@sha256 for deployment - every action pinned by commit SHA build-image-selftest.yml checks each change: a pull request must not push, and a push must return a digest that resolves and verifies against this workflow's signing identity. It lives in this public repository so public repositories can call it.
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.
What changed
.github/workflows/build-image.yml, a reusable workflow (workflow_call) for application images:.trivyignoreghcr.io/<image>(optional Docker Hub mirror) with SBOM and provenance attestations, sign the digest with keyless cosign, and outputimage=ghcr.io/<image>@sha256:…for deployment.github/workflows/build-image-selftest.yml: actionlint, then builds a tiny pinned busybox image (.github/build-image-selftest/). On a pull request it asserts nothing was pushed. On a push it asserts the digest resolves in GHCR and passescosign verifyagainst this workflow's signing identity.Why
nirun, nirun-3rd-party, and nirun-dop each keep their own Docker workflow, and the copies have drifted: two use unpinned action tags (
@v3), nirun-3rd-party pushes images from pull requests, and none scans for vulnerabilities. One shared workflow fixes this once for every repository and outputs the digest that vmkit's deploy requires.It lives here because public repositories (nirun) cannot call workflows from a private repository.
Part of nirun-life/vmkit#7.
Scope
New reusable workflow and self-test in
nirun-life/.github. No application repository changes yet: nirun, nirun-3rd-party, and nirun-dop keep their current workflows until they switch in follow-up PRs. vmkit's reference caller follows in a separate PR, pinned to this PR's merge commit.Risk / Impact
docs/risks.mdR13).ghcr.io/nirun-life/build-image-selftest.build-image.yml@<commit-sha>. A change to this workflow reaches a repository only when that repository bumps its pin.How tested
Documentation
README.mdupdatedNotes for reviewer
nirun-life/.github/.github/workflows/build-image.yml@…), not the calling repository. The README's verify command and the self-test both use that identity.