CI / Tests, lint (push) Successful in 18s
The CIS gate, the SBOM, the cosign signature and the matcher's verdict lived in NetOrk/base-os, the head of the chain. Every link below it -- base-python, engine, ui, satellite, the service images -- needs the same, so the tools move here, and every image repository pins them by commit. - image_tools: cis.py, cis_os.sh, sbom.py and verify.py from base-os. The image's own repository holds its cis.toml and packages.allow; both default to the working directory. - bin/sign.sh signs whatever platforms a reference holds: base-os's index of amd64 and arm64 (EXPECT_PLATFORMS) or a dev image's single manifest (image_tools/platforms.py). - bin/verify-base.sh checks every FROM image of a Dockerfile against cosign.pub before a build; one without a digest is refused (image_tools/dockerfile.py). - bin/install-cosign.sh installs cosign v3.1.3 for amd64 and arm64 runners, checked against the release checksums. - actions/verify-base, judge, sign wrap them for the workflows. - cosign.pub is the public half of the COSIGN_PRIVATE_KEY_B64 org secret, the key rotated on 2026-10-22.
15 lines
750 B
Bash
Executable File
15 lines
750 B
Bash
Executable File
#!/bin/bash
|
|
# verify-base.sh <Dockerfile>...: every image the files build on is signed with
|
|
# netOrk's key, checked before the build (NetOrk/netork#1390).
|
|
#
|
|
# The images are the FROM lines' references (image_tools/dockerfile.py): stages
|
|
# of the same file and scratch are none, and one without a digest is refused.
|
|
set -euo pipefail
|
|
tools=$(cd "$(dirname "$0")/.." && pwd)
|
|
[ $# -gt 0 ] || { echo "usage: verify-base.sh <Dockerfile>..." >&2; exit 2; }
|
|
files=()
|
|
for f in "$@"; do files+=("$(cd "$(dirname "$f")" && pwd)/$(basename "$f")"); done
|
|
mapfile -t bases < <(cd "$tools" && python3 -m image_tools.dockerfile "${files[@]}")
|
|
[ ${#bases[@]} -gt 0 ] || { echo "no image to verify in $*" >&2; exit 1; }
|
|
"$tools/bin/verify-signature.sh" "${bases[@]}"
|