Enforce image signature verification in staging and production#87
Merged
Conversation
The verify-images ClusterPolicy checked every ghcr.io/nanohype/* image for a keyless Cosign signature from the org release workflows, but all three environment overlays left validationFailureAction at Audit — so an unsigned or tampered image was reported in PolicyReports and then admitted anyway. The signatures exist (every release workflow signs and attests an SBOM); the admission gate was the missing half. Staging and production overlays now patch the policy to Enforce: an image that is unsigned, foreign-signed, or altered after signing is rejected at admission. Staging enforces for the same reason it mirrors production elsewhere — an unsigned image should fail there first, not surface for the first time during a production rollout. Dev stays Audit so local/dev iteration isn't blocked while images churn; base comments now describe that split directly. This also brings the policy in line with what the repo already documented: the README's environment table and the troubleshooting runbook both state staging/production run Kyverno in Enforce.
CI Results
All checks passed. |
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.
Why
verify-imagesvalidated Cosign keyless signatures on everyghcr.io/nanohype/*image, but all three environment overlays keptvalidationFailureAction: Audit— unsigned or tampered images were reported and then admitted anyway. Meanwhile the README's environment table and the troubleshooting runbook already document staging/production as Enforce; the supply-chain policy set was the one Audit holdout.What
validationFailureActiontoEnforce— unsigned/foreign-signed/tamperedghcr.io/nanohype/*images are rejected at admissionValidation
task validategreen; kustomize render shows production/staging = Enforce, dev = Audit. Rollback: revert the overlay patch value — reports keep flowing either way.