|
This is unreleased documentation for Network Enforcer 0.4-dev. |
Verifying Kubewarden Network Enforcer
The Kubewarden Network Enforcer project signs what it publishes, so that you can check that an artifact is the one the project built. For each release, the project publishes:
-
A signed container image.
-
A signed Software Bill of Materials (SBOM) and a signed provenance attestation for each architecture of the image.
-
A signed Helm chart.
The signatures use Sigstore in keyless mode. The
signing certificate names the GitHub Actions workflow that built the
artifact. Each cosign command below passes two values:
-
--certificate-oidc-issuer: alwayshttps://token.actions.githubusercontent.com. -
--certificate-identity: the workflow file and the Git ref of the release. For a release of Network Enforcer, this ishttps://github.com/kubewarden/network-enforcer/.github/workflows/release.yml@refs/tags/v0.3.0.
|
Use the exact identity, with the release tag, as the commands below do. A
pattern such as |
The examples use the release v0.3.0 and the chart version
0.1.3. Replace them with the versions that you verify.
Container images
Network Enforcer publishes one image,
ghcr.io/kubewarden/network-enforcer/controller. The release workflow signs
each single-architecture image and the multi-architecture index. To verify
it, run:
cosign verify \
--certificate-oidc-issuer=https://token.actions.githubusercontent.com \
--certificate-identity="https://github.com/kubewarden/network-enforcer/.github/workflows/release.yml@refs/tags/v0.3.0" \
ghcr.io/kubewarden/network-enforcer/controller:v0.3.0
Verification for ghcr.io/kubewarden/network-enforcer/controller:v0.3.0 --
The following checks were performed on each of these signatures:
- The cosign claims were validated
- Existence of the claims in the transparency log was verified offline
- The code-signing certificate was verified using trusted certificate authority certificates
<snipped json>
SBOM and provenance attestations
For each architecture, the release workflow extracts an SBOM in SPDX format and a provenance attestation in SLSA format. It signs each file and attaches the files to the GitHub release. The names follow this pattern:
-
NetworkEnforcer-controller-attestation-<arch>-provenance.intoto.jsonl -
NetworkEnforcer-controller-attestation-<arch>-sbom.json
Each file has a Sigstore bundle with the same name and the suffix
.bundle.sigstore. Download the file and its bundle from the
release page, then
verify the provenance:
cosign verify-blob \
--certificate-oidc-issuer=https://token.actions.githubusercontent.com \
--certificate-identity="https://github.com/kubewarden/network-enforcer/.github/workflows/release.yml@refs/tags/v0.3.0" \
--bundle NetworkEnforcer-controller-attestation-amd64-provenance.intoto.jsonl.bundle.sigstore \
NetworkEnforcer-controller-attestation-amd64-provenance.intoto.jsonl
Verified OK
And the SBOM:
cosign verify-blob \
--certificate-oidc-issuer=https://token.actions.githubusercontent.com \
--certificate-identity="https://github.com/kubewarden/network-enforcer/.github/workflows/release.yml@refs/tags/v0.3.0" \
--bundle NetworkEnforcer-controller-attestation-amd64-sbom.json.bundle.sigstore \
NetworkEnforcer-controller-attestation-amd64-sbom.json
Verified OK
After the check, you can read the files. The SBOM lists the packages in the image. The provenance names the source commit, the builder, and the build parameters.
The same attestations are also attached to the image in the registry, in the
format that Docker uses. The signed copies are the release assets. To read
the registry copy, list the attestation manifest with
crane:
crane manifest ghcr.io/kubewarden/network-enforcer/controller:v0.3.0 \
| jq '.manifests[] | select(.annotations["vnd.docker.reference.type"]=="attestation-manifest")'
Then fetch the manifest by its digest and read each layer with crane blob.
Helm chart
The Network Enforcer chart is in the Helm repository at
https://charts.kubewarden.io and, as an OCI artifact, at
ghcr.io/kubewarden/charts/network-enforcer. The OCI copy is signed. The
chart is released from the kubewarden/helm-charts repository, so the
identity names that workflow:
cosign verify \
--certificate-oidc-issuer=https://token.actions.githubusercontent.com \
--certificate-identity="https://github.com/kubewarden/helm-charts/.github/workflows/helm-chart-release.yml@refs/heads/main" \
ghcr.io/kubewarden/charts/network-enforcer:0.1.3
Verification for ghcr.io/kubewarden/charts/network-enforcer:0.1.3 --
The following checks were performed on each of these signatures:
- The cosign claims were validated
- Existence of the claims in the transparency log was verified offline
- The code-signing certificate was verified using trusted certificate authority certificates
<snipped json>
The chart also has a GitHub build provenance attestation. The GitHub CLI verifies it:
gh attestation verify oci://ghcr.io/kubewarden/charts/network-enforcer:0.1.3 \
--repo kubewarden/helm-charts
To list every image that the chart deploys, render it and extract the image fields:
helm template network-enforcer oci://ghcr.io/kubewarden/charts/network-enforcer \
--version 0.1.3 \
| yq '..|.image? | select(.)' \
| sort -u
Verify the Network Enforcer image in that list as the container images section shows.
Third-party images
The chart also deploys images that the Network Enforcer project does not build and does not sign:
-
otel/opentelemetry-collector-contrib, whentelemetry.collectorStrategyisdefault. -
fluent/fluent-bit, whencontroller.provider.nameisistio.
Verify them with the method that their own projects document.