Skip to content
Hands-on IT IT Drills

Appendix B: Final Exam

Goal: Apply the book without instructions: send notes-api through a complete supply chain in eight exercises – from the Containerfile to the signed service under systemd – plus a short knowledge section. · Duration: approx. 150 min · Prerequisite: Day 16

Rules of Play

  • Each exercise lists requirements and a check made of individual commands. You pass it when every command shows what is expected. Read the solution only afterwards.
  • The exercises build on each other and all run in ~/ct-lab/anhb, version 1.0.0, target $REG/anhb/notes-api. You start with the demo application from Day 0 and the gate files from Days 11, 12 and 14.
  • Allowed are Appendix A, --help and the official docs, not Days 1–15. The solution files are in code/anhb/loesung/.
  • You pass with eight passed checks and at least 8 out of 10 points in the knowledge section.
 Containerfile ─► hadolint ─► buildah build ─► dive, dockle ─► trivy, grype
   (Exercise 1)                (2)              (3)             (4)
 ─► syft ─► podman push ─► cosign sign/attest ─► Quadlet with cosign verify
    (5)      (6)            (7)                   (8)
source ~/ct-lab/setup/env.sh
mkdir -p ~/ct-lab/anhb && cd ~/ct-lab/anhb
cp -R "$LAB/code/notes/." .
cp "$LAB/code/tag14/notes/"{.dive-ci,.dockleignore,lab-signing-config.json} .
export DOCKLE_HOST="unix://$XDG_RUNTIME_DIR/podman/podman.sock"

The checks need DOCKLE_HOST; in a new shell you set it again. IDs, digests and times in the outputs will differ for you.

Exercise 1: A Containerfile of your own

Material from Days 1, 5 and 12. Write notes-api/Containerfile – leave the existing Dockerfile untouched:

  • Build stage on docker.io/library/golang:1.27-alpine, static binary (CGO_ENABLED=0, -trimpath), version via the build arg VERSION into main.version.
  • Runtime stage scratch with CA certificates, numeric user 65532:65532, label org.opencontainers.image.version, ENTRYPOINT and HEALTHCHECK in exec form (/notes-api healthcheck).
  • hadolint with the project’s .hadolint.yaml reports nothing, not even info.

Check:

hadolint notes-api/Containerfile; echo "Exit: $?"
grep -E '^(FROM|USER)' notes-api/Containerfile
grep -A1 '^HEALTHCHECK' notes-api/Containerfile

Expected:

Exit: 0
FROM docker.io/library/golang:1.27-alpine AS build
FROM scratch
USER 65532:65532
HEALTHCHECK --interval=10s --timeout=2s --start-period=5s \
  CMD ["/notes-api", "healthcheck"]

Solution

cat > notes-api/Containerfile <<'EOF'
# notes-api/Containerfile – Appendix B, solution to Exercise 1
FROM docker.io/library/golang:1.27-alpine AS build
WORKDIR /src
COPY go.mod go.sum ./
RUN go mod download
COPY . .
ARG VERSION=dev
RUN CGO_ENABLED=0 go build -trimpath \
      -ldflags="-s -w -X main.version=${VERSION}" -o /out/notes-api .

FROM scratch
ARG VERSION=dev
LABEL org.opencontainers.image.title="notes-api" \
      org.opencontainers.image.source="https://example.com/ct-lab/notes" \
      org.opencontainers.image.version="${VERSION}"
COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
COPY --from=build /out/notes-api /notes-api
EXPOSE 8080
USER 65532:65532
HEALTHCHECK --interval=10s --timeout=2s --start-period=5s \
  CMD ["/notes-api", "healthcheck"]
STOPSIGNAL SIGTERM
ENTRYPOINT ["/notes-api"]
EOF
hadolint notes-api/Containerfile; echo "Exit: $?"

Expected:

Exit: 0
  • go.mod and go.sum first: if only the code changes, the download step stays in the cache (with Podman, when building with layers).
  • No --chmod: go build creates the binary executable. With --chmod, newly created folders like /etc/ssl/certs would also get that mode – user 65532 couldn’t get in.
  • ARG VERSION appears in both stages: an ARG only applies in the stage in which it is declared.

Save your progress? Sign up for free

Exercise 2: Building with Buildah

Material from Days 1 and 5. Build localhost/notes-api:1.0.0 with buildah build from your Containerfile:

  • Docker format, so that the health check stays in the image.
  • Reproducible: two builds in a row produce the same image ID.
  • A test container on 127.0.0.1:8091 becomes healthy, runs as 65532 and reports /version = 1.0.0.

Check: the image’s format, health check and label:

podman image inspect localhost/notes-api:1.0.0 --format '{{.ManifestType}}'
podman image inspect localhost/notes-api:1.0.0 --format '{{.Config.Healthcheck.Test}}'
podman image inspect localhost/notes-api:1.0.0 \
  --format '{{index .Config.Labels "org.opencontainers.image.version"}}'

Expected:

application/vnd.docker.distribution.manifest.v2+json
[CMD /notes-api healthcheck]
1.0.0

A test container runs healthy as 65532 and reports 1.0.0:

podman run -d --name anhb-test -p 127.0.0.1:8091:8080 \
  -e NOTES_API_KEY=lab-api-key-123 localhost/notes-api:1.0.0
sleep 4
podman ps --filter name=anhb-test --format '{{.Status}}'
podman exec anhb-test /notes-api healthcheck; echo "Exit: $?"
podman top anhb-test user
curl -s 127.0.0.1:8091/version; echo
podman rm -f anhb-test

Expected (shortened; ID and time will differ):

0d54eece8589…
Up 5 seconds (healthy)
Exit: 0
USER
65532
1.0.0
anhb-test

Solution

for n in 1 2; do
  buildah build -q --format docker --timestamp 0 --build-arg VERSION=1.0.0 \
    -f notes-api/Containerfile -t localhost/notes-api:1.0.0 notes-api
done
podman image inspect localhost/notes-api:1.0.0 \
  --format '{{.ManifestType}} {{.Config.User}} {{.Created}}'

Expected (shortened; the first build takes one to two minutes):

525cfb4522715cd07f54a6780db3016f34ab9116c3fabd88f7d362ee29c4c2de
525cfb4522715cd07f54a6780db3016f34ab9116c3fabd88f7d362ee29c4c2de
application/vnd.docker.distribution.manifest.v2+json 65532:65532 1970-01-01 00:00:00 +…

-f selects the Containerfile, the context stays notes-api. --timestamp 0 sets all timestamps to 1970 – hence the same ID twice.

Save your progress? Sign up for free

Exercise 3: Image gates – dive and dockle

Material from Days 11 and 12. The image passes both image checks with the files from the project folder (.dive-ci, .dockleignore) and is smaller than 20 MB.

Check:

dive --ci --source podman localhost/notes-api:1.0.0 | grep -E 'efficiency:|Result:'
dockle --no-color -c 1 localhost/notes-api:1.0.0; echo "Exit: $?"
podman images localhost/notes-api:1.0.0 --format '{{.Size}}'

Expected (shortened):

  efficiency: 100.0000 %
Result:PASS [Total:3] [Passed:3] [Failed:0] [Warn:0] [Skipped:0]
SKIP    - DKL-LI-0001: Avoid empty password
    * failed to detect etc/shadow,etc/master.passwd
SKIP    - DKL-LI-0002: Be unique UID/GROUP
    * failed to detect etc/passwd
    * failed to detect etc/group
Exit: 0
11.9 MB

Solution

With the Containerfile from Exercise 1 there is nothing to repair – the gates confirm it:

dive --ci --source podman localhost/notes-api:1.0.0 | grep -E 'efficiency:|Result:'
dockle --no-color -c 1 localhost/notes-api:1.0.0 | grep -E '^[A-Z]'
podman image inspect --format '{{.Size}}' localhost/notes-api:1.0.0

Expected:

  efficiency: 100.0000 %
Result:PASS [Total:3] [Passed:3] [Failed:0] [Warn:0] [Skipped:0]
SKIP    - DKL-LI-0001: Avoid empty password
SKIP    - DKL-LI-0002: Be unique UID/GROUP
11901755

Two files, one layer per COPY, nothing duplicated: 100% efficiency. With scratch, SKIP means: no /etc/passwd, nothing to check. The health check spares you the finding CIS-DI-0006.

Save your progress? Sign up for free

Exercise 4: Vulnerability gate

Material from Day 13. Two scanners, one rule: no fixable vulnerability from HIGH upward.

  • trivy: --severity HIGH,CRITICAL --ignore-unfixed --exit-code 1, grype: --only-fixed --fail-on high – both with exit 0.
  • Without .trivyignore: whatever has a fix gets fixed.
  • The gates from Exercise 3 stay green.

Check:

trivy image -q --scanners vuln --severity HIGH,CRITICAL --ignore-unfixed \
  --exit-code 1 localhost/notes-api:1.0.0 >/dev/null; echo "Exit: $?"
grype -q podman:localhost/notes-api:1.0.0 --only-fixed --fail-on high >/dev/null
echo "Exit: $?"
ls .trivyignore
grep golang.org/x/text notes-api/go.mod

Expected:

Exit: 0
Exit: 0
ls: cannot access '.trivyignore': No such file or directory
    golang.org/x/text v0.41.0 // indirect

The gates from Exercise 3 stay green:

dive --ci --source podman localhost/notes-api:1.0.0 >/dev/null; echo "Exit: $?"
dockle -c 1 localhost/notes-api:1.0.0 >/dev/null; echo "Exit: $?"

Expected:

Exit: 0
Exit: 0

Solution

First the finding:

trivy image -q --scanners vuln --severity HIGH,CRITICAL --ignore-unfixed \
  --exit-code 1 localhost/notes-api:1.0.0 | grep -E 'Total|CVE' | tr -s ' ' \
  | cut -c1-88; echo "trivy: ${PIPESTATUS[0]}"
grype -q podman:localhost/notes-api:1.0.0 --only-fixed --fail-on high --by-cve \
  | cut -c1-72; echo "grype: ${PIPESTATUS[0]}"

Expected:

Total: 2 (HIGH: 2, CRITICAL: 0)
│ golang.org/x/text │ CVE-2026-56851 │ HIGH │ fixed │ v0.29.0 │ 0.41.0 │ golang.org/x/te
│ │ CVE-2026-56852 │ │ │ │ 0.39.0 │ golang.org/x/text: golang.org/x/text: Denial of Serv
trivy: 1
NAME               INSTALLED  FIXED IN  TYPE       VULNERABILITY   SEVER
golang.org/x/text  v0.29.0    0.39.0    go-module  CVE-2026-56852  High
golang.org/x/text  v0.29.0    0.41.0    go-module  CVE-2026-56851  High
grype: 2

Both scanners agree: golang.org/x/text needs 0.41.0. Update it in the Go container, then rebuild:

podman run --rm -v "$PWD/notes-api:/src:Z" -w /src \
  docker.io/library/golang:1.27-alpine \
  sh -c 'go get golang.org/x/[email protected] && go mod tidy' >/dev/null 2>&1
grep 'golang.org/x/text' notes-api/go.mod
buildah build -q --format docker --timestamp 0 --build-arg VERSION=1.0.0 \
  -f notes-api/Containerfile -t localhost/notes-api:1.0.0 notes-api | cut -c1-12
trivy image -q --scanners vuln --severity HIGH,CRITICAL --ignore-unfixed \
  --exit-code 1 localhost/notes-api:1.0.0 >/dev/null; echo "trivy: $?"
grype -q podman:localhost/notes-api:1.0.0 --only-fixed --fail-on high; echo "grype: $?"

Expected:

    golang.org/x/text v0.41.0 // indirect
10fafdba6081
trivy: 0
No vulnerabilities found
grype: 0

New content, new ID – the same tag 1.0.0 now points to the repaired image. That’s fine before the first push; after a release, the fix would get a new version.

Save your progress? Sign up for free

Exercise 5: SBOM

Material from Days 13 and 14. From the local image, generate three SBOMs in one syft run under sbom/: notes-api-1.0.0.cdx.json (CycloneDX), .spdx.json (SPDX) and .syft.json (lossless). grype passes the same gate on the SBOM as well.

Check:

ls sbom/
jq -r '.components[] | select(.name == "golang.org/x/text") | .version' \
  sbom/notes-api-1.0.0.cdx.json
grype -q sbom:sbom/notes-api-1.0.0.cdx.json --only-fixed --fail-on high >/dev/null
echo "Exit: $?"

Expected:

notes-api-1.0.0.cdx.json
notes-api-1.0.0.spdx.json
notes-api-1.0.0.syft.json
v0.41.0
Exit: 0

Solution

mkdir -p sbom
syft -q podman:localhost/notes-api:1.0.0 \
  -o cyclonedx-json=sbom/notes-api-1.0.0.cdx.json \
  -o spdx-json=sbom/notes-api-1.0.0.spdx.json \
  -o syft-json=sbom/notes-api-1.0.0.syft.json
ls -l sbom | awk 'NR > 1 {print $5, $9}'
jq -r '.components[] | select(.name == "golang.org/x/text") | .version' \
  sbom/notes-api-1.0.0.cdx.json

Expected:

10009 notes-api-1.0.0.cdx.json
14064 notes-api-1.0.0.spdx.json
19926 notes-api-1.0.0.syft.json
v0.41.0

podman: reads from your storage via the socket. The SBOM belongs to the repaired image – that’s why it comes only after Exercise 4.

Save your progress? Sign up for free

Exercise 6: Push to your own registry

Material from Days 7 and 8. Push the image as $REG/anhb/notes-api:1.0.0 and record the manifest digest in digest.txt – from now on you work only with it.

  • The registry holds a Docker manifest, and the config contains the health check.
  • The local image ID is the config digest in the registry.

Check: digest.txt and the registry know the same digest:

cat digest.txt; echo
crane digest "$REG/anhb/notes-api:1.0.0"

Expected:

sha256:6c7b0143e50159976b4d3e9e1f88bf18bbc3dd467e8ffa24262b349994afd212
sha256:6c7b0143e50159976b4d3e9e1f88bf18bbc3dd467e8ffa24262b349994afd212

Docker manifest with health check; the config is the local image ID:

crane manifest "$REG/anhb/notes-api:1.0.0" | jq -r '.mediaType, .config.digest'
crane config "$REG/anhb/notes-api:1.0.0" | jq -c .config.Healthcheck.Test
podman image inspect localhost/notes-api:1.0.0 --format '{{.Id}}'

Expected:

application/vnd.docker.distribution.manifest.v2+json
sha256:10fafdba6081d14e0e803f79e65899f7374ff08a8f91e1eb64091a7bc973564a
["CMD","/notes-api","healthcheck"]
10fafdba6081d14e0e803f79e65899f7374ff08a8f91e1eb64091a7bc973564a

Solution

podman push --digestfile digest.txt localhost/notes-api:1.0.0 \
  "$REG/anhb/notes-api:1.0.0" 2>&1 | tail -1
cat digest.txt; echo
crane manifest "$REG/anhb/notes-api:1.0.0" | jq -r '.mediaType, .config.digest'
crane config "$REG/anhb/notes-api:1.0.0" | jq -c .config.Healthcheck.Test

Expected:

Writing manifest to image destination
sha256:6c7b0143e50159976b4d3e9e1f88bf18bbc3dd467e8ffa24262b349994afd212
application/vnd.docker.distribution.manifest.v2+json
sha256:10fafdba6081d14e0e803f79e65899f7374ff08a8f91e1eb64091a7bc973564a
["CMD","/notes-api","healthcheck"]

--digestfile saves you the later lookup via crane digest – and with it the gap in which someone could move the tag (Day 16, Round 10).

Save your progress? Sign up for free

Exercise 7: Sign and attach the SBOM

Material from Day 14. Sign the digest from digest.txt with your key and the annotation version=1.0.0, attach the CycloneDX SBOM as an attestation – without a public transparency log – and verify both.

Check:

ref="$REG/anhb/notes-api@$(cat digest.txt)"
cosign verify --key ~/ct-lab/keys/cosign.pub --insecure-ignore-tlog=true \
  -a version=1.0.0 "$ref" >/dev/null 2>&1; echo "Exit: $?"
cosign verify-attestation --key ~/ct-lab/keys/cosign.pub --insecure-ignore-tlog=true \
  --type cyclonedx "$ref" >/dev/null 2>&1; echo "Exit: $?"
crane ls "$REG/anhb/notes-api"
grep -o '"rekorTlogConfig":{}' lab-signing-config.json

Expected (shortened):

Exit: 0
Exit: 0
1.0.0
sha256-6c7b0143e50159976b4d3e9e1f88bf18bbc3dd467e8ffa24262b349994afd212
"rekorTlogConfig":{}

Solution

export COSIGN_PASSWORD=lab-cosign-pw-123
ref="$REG/anhb/notes-api@$(cat digest.txt)"
cosign sign --key ~/ct-lab/keys/cosign.key --signing-config lab-signing-config.json \
  --yes -a version=1.0.0 "$ref"
cosign attest --key ~/ct-lab/keys/cosign.key --signing-config lab-signing-config.json \
  --yes --type cyclonedx --predicate sbom/notes-api-1.0.0.cdx.json "$ref"
cosign tree "$ref" 2>&1 | LC_ALL=C tr -cd '\12\40-\176' | cut -c1-80
crane ls "$REG/anhb/notes-api"

Expected (symbols and tree lines removed):

Signing artifact...
Pushing signature to: registry.ct.lab:5000/anhb/notes-api
Using payload from: sbom/notes-api-1.0.0.cdx.json
Signing artifact...
 Supply Chain Security Related artifacts for an image: registry.ct.lab:5000/anhb
  https://sigstore.dev/cosign/sign/v1 artifacts via OCI referrer: registry.ct.la
     sha256:907a6c37e0dae42e23306f742e6ab045b006c88bb5a26a19e8e1aeb6080548d9
  https://cyclonedx.org/bom artifacts via OCI referrer: registry.ct.lab:5000/anh
     sha256:acf4328c4a0b9e9bd8b1be719720fd627139f0d1ed1bfd013b7adfc41d4b3ae2
1.0.0
sha256-6c7b0143e50159976b4d3e9e1f88bf18bbc3dd467e8ffa24262b349994afd212

The empty signing config from Day 14 keeps Rekor and the timestamping service out; when verifying, --insecure-ignore-tlog=true says the same. Signature and attestation hang as referrers on the index under sha256-6c7b….

Save your progress? Sign up for free

Exercise 8: Signed startup with Quadlet

Material from Days 3 and 14. Run notes-api 1.0.0 as the Quadlet service anhb-api:

  • Image by digest from digest.txt, not by tag; port 127.0.0.1:8091, Notify=healthy, starts with the user manager (default.target).
  • Before every start, systemd verifies the signature with cosign. An unsigned image must not start.
  • The dry run is clean.

Check:

/usr/libexec/podman/quadlet -dryrun -user >/dev/null 2>&1; echo "Exit: $?"
systemctl --user is-active anhb-api.service
podman ps --filter name=anhb-api --format '{{.Status}}'
curl -s 127.0.0.1:8091/version; echo

Expected (the time will differ):

Exit: 0
active
Up 4 seconds (healthy)
1.0.0

The container runs by digest, and the signature was verified before the start:

podman ps --filter name=anhb-api --format '{{.Image}}'
cat digest.txt; echo
journalctl --user -u anhb-api.service -o cat | grep 'signatures were verified'

Expected (shortened):

registry.ct.lab:5000/anhb/notes-api@sha256:6c7b0143e50159976b4d3e9e1f88bf18bbc3dd…
sha256:6c7b0143e50159976b4d3e9e1f88bf18bbc3dd467e8ffa24262b349994afd212
  - The signatures were verified against the specified public key

Solution

Quadlet doesn’t know shell variables. So the shell writes the digest into the file (heredoc without quotes); %h is the systemd placeholder for your home directory:

d=$(cat digest.txt); q=~/.config/containers/systemd
cat > "$q/anhb-api.container" <<EOF
# ~/.config/containers/systemd/anhb-api.container – Appendix B, solution to Exercise 8
[Unit]
Description=notes-api aus der Pipeline, nur signiert (Anhang B)

[Container]
ContainerName=anhb-api
Image=$REG/anhb/notes-api@$d
PublishPort=127.0.0.1:8091:8080
Environment=NOTES_API_KEY=lab-api-key-123
Notify=healthy

[Service]
ExecStartPre=/usr/local/bin/cosign verify --key %h/ct-lab/keys/cosign.pub \\
  --insecure-ignore-tlog=true $REG/anhb/notes-api@$d
Restart=on-failure

[Install]
WantedBy=default.target
EOF
/usr/libexec/podman/quadlet -dryrun -user 2>&1 \
  | grep -E '^---anhb|^ExecStartPre|rror' | cut -c1-88
systemctl --user daemon-reload
systemctl --user start anhb-api.service; echo "Exit: $?"
journalctl --user -u anhb-api.service -o cat --no-pager \
  | grep -E 'signatures were|Started' | cut -c1-88
curl -s 127.0.0.1:8091/version

Expected:

---anhb-api.service---
ExecStartPre=/usr/local/bin/cosign verify --key %h/ct-lab/keys/cosign.pub --insecure-ign
Exit: 0
  - The signatures were verified against the specified public key
Started anhb-api.service - notes-api aus der Pipeline, nur signiert (Anhang B).
1.0.0

\\ in the heredoc becomes a single \ in the file – systemd reads the continuation line, and the dry run shows it joined. ExecStartPre= runs before podman run; if cosign exits with an error, systemd doesn’t start the container. Counter-check with an unsigned image in the same registry:

podman push -q localhost/notes-api:0.2.0 "$REG/anhb/notes-api:0.2.0"
d2=$(crane digest "$REG/anhb/notes-api:0.2.0")
sed -e "s#@$d#@$d2#g" -e 's/^ContainerName=anhb-api/ContainerName=anhb-gegen/' \
  -e 's/8091:8080/8092:8080/' "$q/anhb-api.container" > "$q/anhb-gegen.container"
systemctl --user daemon-reload
systemctl --user start anhb-gegen.service; echo "Exit: $?"
journalctl --user -u anhb-gegen.service -o cat --no-pager \
  | grep -E 'no signatures' | head -1
podman ps -a --filter name=anhb-gegen --format '{{.Names}}' | wc -l
rm "$q/anhb-gegen.container" && systemctl --user daemon-reload

Expected (shortened):

Job for anhb-gegen.service failed because the control process exited with error code.
See "systemctl --user status anhb-gegen.service" and "journalctl --user -xeu anhb-geg…
Exit: 1
Error: no signatures found
0

No container, not even created: the check sits before the start.

Tip: The whole chain from Exercises 1–7 as one script with an exit code is in code/anhb/loesung/pipeline.sh (call it as COSIGN_PASSWORD=… ./pipeline.sh 1.0.1; 1 min 46 s in testing). It overwrites digest.txt with the digest of the new version.

Save your progress? Sign up for free

Knowledge section

One point each, answers in one or two sentences.

  1. Why does podman build without a switch build images without a health check, and what two ways are there to have one anyway?
  2. What distinguishes Podman’s image ID from the manifest digest in the registry?
  3. Why does Podman reject nginx:1.30.6-alpine on a fresh machine, even though it works for you?
  4. Container UID 70, rootless as ubuntu with ubuntu:100000:65536 – which UID shows up on the host, and how do you delete files owned by that UID?
  5. Which file does regctl read for logins, which one does crane auth login write, and which one podman login?
  6. What happens with skopeo copy --format oci to a Docker image, and which tool converts without losing the health check?
  7. Why do oras and cosign create a tag sha256-<digest> in the lab registry?
  8. What does dive count as waste – and what does the score overlook?
  9. Why does every line in .trivyignore need an exp:?
  10. Why do you sign digests rather than tags, and why do you then also start by digest?

Solutions

  1. Podman builds OCI by default, and the OCI format has no HEALTHCHECK (just a warning). Remedy: --format docker when building, or specify the check at startup (--health-cmd, Quadlet HealthCmd=) (Days 1, 5).
  2. The image ID is the digest of the config. The manifest digest only comes into being at push time (compressed layers) and is what the registry, cosign and Kubernetes address (Day 7).
  3. Ubuntu has no unqualified-search-registries, and shortnames.conf doesn’t know nginx. A short name only matches an image that is present locally (Days 1, 15).
  4. 100000 + 70 − 1 = 100069. Delete inside the user namespace: podman unshare rm -rf … (Day 2).
  5. regctl: ~/.regctl/config.json, falling back to ~/.docker/config.json. crane: ~/.docker/config.json (or $DOCKER_CONFIG). Podman: $XDG_RUNTIME_DIR/containers/auth.json, in RAM (Days 7, 8, 15).
  6. skopeo converts the config to OCI – new digest, health check gone. regctl image mod --to-oci only changes the media types (Day 8).
  7. Registry 3.1.2 has no Referrers API. The OCI specification’s fallback scheme is an index under sha256-<digest> that lists all referrers (Days 9, 14).
  8. Files that occur in several layers. A folder deleted in a later layer doesn’t count – look at the layer sizes as well (Day 11).
  9. So that “later” doesn’t turn into “never”: after the date, the exception no longer applies, and the gate fires again (Days 13, 15).
  10. A tag can point to a different image at any time; the signature applies to the digest. Whoever starts by tag may not be starting the verified image (Days 14, 15).

Finally, clean up – in the lab, the service is just an exam piece:

systemctl --user stop anhb-api.service
rm ~/.config/containers/systemd/anhb-api.container
systemctl --user daemon-reload
podman rmi localhost/notes-api:1.0.0

Expected:

Untagged: localhost/notes-api:1.0.0

The repository anhb/notes-api with signature and SBOM stays in your registry – that is the result of the exam.