SecurityLesson 5 of 6
  1. Authentication and service accounts, not reconciled
  2. RBAC, not reconciled
  3. Pod security: securityContext and Pod Security Admission, not reconciled
  4. Admission control and policy, not reconciled
  5. Image supply chain, not reconciled
    1. Threats
    2. Minimal images
    3. Scanning
    4. SBOMs and provenance
    5. Signing and verification
    6. Pull credentials
    7. Allowed registries
  6. Audit logging and runtime security, not reconciled

Image supply chain

A pod runs whatever bytes its image reference resolves to. Pin digests, keep images small, scan them, sign them, verify signatures at admission and control which registries pods may pull from.

  • 30 min
  • 4 objectives
  • 7 scenes
  • Includes an On AWS layer

Shows the lesson one block at a time. Arrow keys step, number keys jump to a scene, and Escape returns to the page where you were.

A pod spec names an image, and the node runs whatever bytes that name resolves to when the kubelet pulls it. Everything between a developer’s commit and that pull is the supply chain: the base image, the build, the registry, the name in the manifest and the credentials that fetch it. Each link can be swapped without the manifest changing. This lesson covers how to make each one verifiable, and how to make the cluster refuse what fails verification.

Reconcile, in 7 scenes

Threats

Four failures account for most supply-chain incidents in Kubernetes.

Mutable tags. A tag is a pointer that anyone with push access can move. api:2.3 today and api:2.3 next week can be different images, and with the default IfNotPresent policy each node keeps whichever one it pulled first. The fix is the image digestThe SHA-256 hash of an image manifest, written sha256:...; it identifies exactly one image and cannot be moved to another.. A reference written name@sha256:... names exactly one manifest, and name:tag@sha256:... is pulled by the digest alone; the tag is only a note for readers.

The default pull policy is fixed when the object is created: a digest gets IfNotPresent, :latest or no tag gets Always, and any other tag gets IfNotPresent. Changing the image later does not recompute it.

What each reference resolves to
kubectl run web --image=nginx:1.31
pod/web created
kubectl run floating --image=nginx
pod/floating created
kubectl run pinned --image=nginx@sha256:f230e7a11804a5e2205989a43e7d8f959b8194dd59f33882e599dcf8ab78410d
pod/pinned created
kubectl get pod web -o jsonpath='{.status.containerStatuses[0].imageID}'
docker.io/library/nginx@sha256:f230e7a11804a5e2205989a43e7d8f959b8194dd59f33882e599dcf8ab78410d
kubectl get pods -o custom-columns=NAME:.metadata.name,IMAGE:.spec.containers[0].image,PULL:.spec.containers[0].imagePullPolicy
NAME       IMAGE                                                                           PULL
floating   nginx                                                                           Always
pinned     nginx@sha256:f230e7a11804a5e2205989a43e7d8f959b8194dd59f33882e599dcf8ab78410d   IfNotPresent
web        nginx:1.31                                                                      IfNotPresent

imageID is the digest the runtime actually started, which is the value to pin. imagePullPolicy: Always does not substitute for pinning: it makes the kubelet re-resolve the tag on every container start and run whatever the tag points at then. It patches nothing, and it makes every start depend on the registry. Pin digests in manifests and let a bot such as Renovate open the pull requests that move them.

Compromised or stale base images. Your image inherits every package in its base. Old bases stop receiving fixes. Go supports only its two newest releases, which on 2026-11-19 are 1.27 and 1.26; Go 1.21 reached end of life on 2024-08-13 and Alpine 3.18 on 2025-05-09, while Ubuntu 22.04 keeps standard support until 2027-06.

Typosquatted names. ngnix is not nginx, and a public registry will happily serve whoever registered the misspelling. An unqualified name also hides its registry: nginx means docker.io/library/nginx. When the misspelled name does not exist, the failure is loud:

A typo in the image name
kubectl run typo --image=ngnix:1.31
pod/typo created
kubectl wait --for=jsonpath='{.status.containerStatuses[0].state.waiting.reason}'=ImagePullBackOff pod/typo --timeout=60s
pod/typo condition met
kubectl get pod typo
NAME   READY   STATUS             RESTARTS   AGE
typo   0/1     ImagePullBackOff   0          15s
kubectl get events --field-selector involvedObject.name=typo,reason=Failed
LAST SEEN   TYPE      REASON   OBJECT     MESSAGE
2s          Warning   Failed   pod/typo   Failed to pull image "ngnix:1.31": rpc error: code = NotFound desc = failed to pull and unpack image "docker.io/library/ngnix:1.31": failed to resolve reference "docker.io/library/ngnix:1.31": docker.io/library/ngnix:1.31: not found
2s          Warning   Failed   pod/typo   Error: ErrImagePull
1s          Warning   Failed   pod/typo   Error: ImagePullBackOff

Against the real Docker Hub the message reads differently: Docker Hub answers a request for a repository that does not exist as it would one for a private repository, so containerd reports pull access denied, repository does not exist or may require authorization, and not found means a missing tag in a repository that exists. When the misspelled name does exist, the pod runs someone else’s code and nothing fails. Only an allowed-registries policy or a signature check catches that.

Leaked registry credentials. A pull Secret is readable by anyone who can read Secrets in its namespace, or create pods there. A push credential that leaks lets an attacker replace tags at the source.

Minimal images

Every binary in an image is something a scanner reports and an attacker can use. A multi-stage build compiles with the full toolchain and ships only the result:

# syntax=docker/dockerfile:1
ARG GO_VERSION=1.27
FROM golang:${GO_VERSION} AS build
WORKDIR /src
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN CGO_ENABLED=0 go build -trimpath -o /out/api ./cmd/api

FROM gcr.io/distroless/static:nonroot
COPY --from=build /out/api /api
USER 65532:65532
ENTRYPOINT ["/api"]

The final stage has no shell and no package manager, so kubectl exec ... -- sh fails and so does an attacker’s. A static Go binary can use scratch; distroless adds CA certificates, time zone data and a nonroot user. A full distribution base such as ubuntu:26.04 or python:3.15 is the right choice only when the application needs what it carries.

The Dockerfile details that matter here:

  • BuildKit is the default builder in Docker Desktop and Docker Engine. Only RUN, COPY, ADD, and WORKDIR when it creates a directory, add layers; ENV, EXPOSE, CMD and the rest only set metadata.
  • ARG is the only instruction allowed before FROM, which is how GO_VERSION reaches the base image reference.
  • An image without its own ENTRYPOINT inherits the base image’s, and setting ENTRYPOINT clears any CMD inherited from the base.
  • Write ENV KEY=value. The space-separated form is deprecated and the LegacyKeyValueFormat build check warns about it.
  • EXPOSE documents a port and publishes nothing; Kubernetes ignores it, and containerPort is informational too. HEALTHCHECK is used by Docker and Swarm; Kubernetes uses the probes in the pod spec.
  • Build-time credentials belong in BuildKit secret mounts, RUN --mount=type=secret,id=npmrc ..., never in ARG or ENV, which persist in the image’s history and configuration. Docker Compose also supports secrets without Swarm, mounted read-only at /run/secrets/ followed by the secret’s name.

Run as a non-root user, and give it as a number. runAsNonRoot: true makes the kubelet refuse a container whose user is UID 0, and it cannot check a name such as appuser without reading the image’s /etc/passwd, so a named USER fails to start under that setting unless the pod also sets runAsUser. The official Node.js images already have a node user with UID 1000: reuse it rather than creating another, as USER 1000 or USER node plus runAsUser: 1000, and install with npm ci --omit=dev. Ports from 1024 up never need privileges, and a non-root process can bind port 80 as well: Docker and the containerd 2.0 CRI plugin set net.ipv4.ip_unprivileged_port_start=0 inside the container’s network namespace, so low ports work unless the pod uses the host network.

Scanning

A scanner reads an image’s package databases and language manifests and matches them against vulnerability feeds. Scan in two places, because they answer different questions.

In CI, the question is whether this build should ship. Fail the pipeline on what you can act on:

trivy image --severity HIGH,CRITICAL --ignore-unfixed --exit-code 1 ghcr.io/acme/api:2.3

--ignore-unfixed drops findings with no fixed version, since failing a build over something nobody can fix only teaches people to bypass the gate.

In the registry, the question is whether an image that shipped last month is still safe. Vulnerabilities are disclosed after images are pushed, so a scan at push time goes stale; a registry that rescans continuously turns each disclosure into findings against images you already run.

Rank findings by exploitability before severity. A critical CVE in a library the binary never loads matters less than a high one with a public exploit in the request path. Known-exploited lists such as CISA KEV, a fix being available, and whether the package is reachable decide the order. A VEX statement records why a finding does not apply, so the next scan stops reporting it.

SBOMs and provenance

A SBOMSoftware bill of materials: a machine-readable list of the packages and versions inside an artifact, in SPDX or CycloneDX format. answers “are we affected?” the day a CVE is published, without re-scanning every image: query the SBOMs for the package. Generate it at build time, when the build knows what went in. docker buildx build --sbom=true attaches an SPDX SBOM, and trivy image --format cyclonedx writes a CycloneDX one.

Provenance records how an artifact was built: the source repository and commit, the builder, the build parameters. SLSA defines the format and the levels. Provenance is only as trustworthy as the builder that signs it, so generate it on a hosted builder rather than on a developer laptop. docker buildx build --provenance=mode=max attaches it with BuildKit; the slsa-github-generator container workflow and GitHub artifact attestations produce it in GitHub Actions. There is no slsa-generator-container command line tool.

Attach both to the image as signed attestations, so a policy can require them:

cosign attest --type cyclonedx --predicate sbom.cdx.json ghcr.io/acme/api@sha256:4c1e...

Without --type, cosign uses the custom predicate type. The command succeeds, and a policy that looks for a CycloneDX attestation never finds it.

Signing and verification

A signature binds an identity to a digest. Verifying it at admission means a pod can run only an image that a trusted builder produced, whatever registry it came from and whatever its tag says.

cosignThe Sigstore command-line tool that signs container images and attestations and stores the signatures in the registry next to the image. signs keyless by default since cosign 2.0; the commands here are written for cosign v3.1.4. In keyless mode the CI job proves its OIDC identity to Fulcio, receives a short-lived certificate for it, signs, and records the signature in the Rekor transparency log. No long-lived key exists to leak or rotate. Sign the digest, not a tag:

cosign sign ghcr.io/acme/api@sha256:4c1e...
cosign verify ghcr.io/acme/api@sha256:4c1e... \
  --certificate-identity=https://github.com/acme/api/.github/workflows/release.yaml@refs/heads/main \
  --certificate-oidc-issuer=https://token.actions.githubusercontent.com

Anyone can get a keyless certificate, so a signature alone proves nothing. Verification must say whose signature counts: cosign requires --certificate-identity or --certificate-identity-regexp, and --certificate-oidc-issuer or --certificate-oidc-issuer-regexp. Material that sets COSIGN_EXPERIMENTAL=1 for keyless or verifies without identity flags predates cosign 2.0.

Docker Content Trust is not an option: Docker announced its retirement on 2025-07-29, the signing certificates of Docker Official Images began expiring on 2025-08-08, and pulls of those images with DOCKER_CONTENT_TRUST=1 fail. Use cosign or Notation.

Enforce at admission with a policy engine. Kyverno’s ImageValidatingPolicy, in policies.kyverno.io/v1, checks signatures and attestations with CEL:

apiVersion: policies.kyverno.io/v1
kind: ImageValidatingPolicy
metadata:
  name: require-release-signature
spec:
  validationActions: [Deny]
  webhookConfiguration:
    timeoutSeconds: 15
  matchConstraints:
    resourceRules:
    - apiGroups: [""]
      apiVersions: ["v1"]
      operations: ["CREATE", "UPDATE"]
      resources: ["pods"]
  matchImageReferences:
  - glob: "ghcr.io/acme/*"
  attestors:
  - name: release
    cosign:
      keyless:
        identities:
        - subject: "https://github.com/acme/api/.github/workflows/release.yaml@refs/heads/main"
          issuer: "https://token.actions.githubusercontent.com"
  validationConfigurations:
    mutateDigest: true
  validations:
  - message: "images from ghcr.io/acme must be signed by the release workflow"
    expression: >-
      images.containers.map(image, verifyImageSignatures(image, [attestors.release])).all(e, e > 0)

mutateDigest rewrites each verified tag to the digest that was verified, which closes the gap between checking a tag and the node pulling it later. Verification calls the registry during admission, which is why the timeout is raised; with failurePolicy Fail, a registry outage blocks pod creation in matched namespaces. Kyverno’s legacy kyverno.io/v1 ClusterPolicy with verifyImages and validationFailureAction: enforce is no longer enforced from Kyverno 1.20.0.

Sigstore’s own policy-controller, v0.15.1, does the same with a policy.sigstore.dev/v1beta1 ClusterImagePolicy, and applies only to namespaces labelled policy.sigstore.dev/include=true.

Pull credentials

A private registry needs credentials, and the kubelet, not the pod, uses them. There are two ways to provide them.

imagePullSecrets. A Secret of type kubernetes.io/dockerconfigjson (or the legacy kubernetes.io/dockercfg) in the pod’s namespace, listed in the pod’s imagePullSecrets. A pod cannot use a Secret from another namespace, and nothing checks at creation that the Secret exists: a missing one shows up as a kubelet warning and an ImagePullBackOff. Listing the Secret on a ServiceAccount makes the ServiceAccount admission plugin copy it into every pod created with that account that lists no pull Secrets of its own; pods that already exist are not changed.

Attach pull credentials to a namespace's default ServiceAccount
kubectl create secret docker-registry ghcr-pull --docker-server=ghcr.io --docker-username=ci-bot --docker-password=example-token
secret/ghcr-pull created
kubectl patch serviceaccount default -p '{"imagePullSecrets":[{"name":"ghcr-pull"}]}'
serviceaccount/default patched
kubectl get serviceaccount default -o jsonpath='{.imagePullSecrets[*].name}'
ghcr-pull

Kubelet credential providers. The kubelet runs an exec plugin that returns short-lived credentials for matching images, configured with --image-credential-provider-config and --image-credential-provider-bin-dir. The provider’s name must match the plugin’s executable in that directory. The mechanism is stable from Kubernetes 1.26. The kubelet’s built-in cloud registry credential code was turned off by default in 1.29 and permanently in 1.31, so material that says the kubelet fetches cloud registry credentials by itself describes code that no longer runs.

apiVersion: kubelet.config.k8s.io/v1
kind: CredentialProviderConfig
providers:
- name: example-credential-provider
  matchImages:
  - "registry.example.com"
  - "*.registry.example.com"
  defaultCacheDuration: "12h"
  apiVersion: credentialprovider.kubelet.k8s.io/v1

From Kubernetes 1.34, where it is beta and on by default, a provider entry can set tokenAttributes so the kubelet hands the plugin a token for the pod’s ServiceAccount, letting the registry grant credentials per workload instead of per node.

Allowed registries

Signatures say who built an image; an allowed-registries policy says where any image may come from. It is cheap, needs no registry call, and catches typosquats and stray public images before a signature check would even run. A ValidatingAdmissionPolicy does it in-process:

apiVersion: admissionregistration.k8s.io/v1
kind: ValidatingAdmissionPolicy
metadata:
  name: allowed-registries.example.com
spec:
  failurePolicy: Fail
  matchConstraints:
    resourceRules:
    - apiGroups: [""]
      apiVersions: ["v1"]
      operations: ["CREATE", "UPDATE"]
      resources: ["pods", "pods/ephemeralcontainers"]
  variables:
  - name: images
    expression: >-
      object.spec.containers.map(c, c.image) +
      (has(object.spec.initContainers) ? object.spec.initContainers.map(c, c.image) : []) +
      (has(object.spec.ephemeralContainers) ? object.spec.ephemeralContainers.map(c, c.image) : [])
  validations:
  - expression: "variables.images.all(i, i.startsWith('registry.example.com/'))"
    messageExpression: "'images must come from registry.example.com/: ' + variables.images.filter(i, !i.startsWith('registry.example.com/')).join(', ')"
---
apiVersion: admissionregistration.k8s.io/v1
kind: ValidatingAdmissionPolicyBinding
metadata:
  name: allowed-registries.example.com
spec:
  policyName: allowed-registries.example.com
  validationActions: [Deny]
  matchResources:
    namespaceSelector:
      matchExpressions:
      - key: kubernetes.io/metadata.name
        operator: NotIn
        values: ["kube-system"]

Three details carry the weight. The trailing slash: startsWith('registry.example.com') also admits registry.example.com.attacker.io/api. Init and ephemeral containers: a policy that reads only containers lets an image in through initContainers, and kubectl debug adds ephemeral containers through the pods/ephemeralcontainers subresource. And unqualified names: nginx is a Docker Hub image, and the string the policy sees is nginx, so it fails the prefix test, which is the point.

Matching pods rather than Deployments has a visible consequence. The Deployment and its ReplicaSet are created, the ReplicaSet controller’s pod creates are denied, and the only evidence is FailedCreate events on the ReplicaSet and a Deployment stuck at zero ready replicas. Run with [Warn, Audit] first to find every workload that would break.

Pin a pod to the digest the node resolved

  1. kubectl --context kind-kx run web --image=nginx:1.31
  2. kubectl --context kind-kx wait --for=condition=Ready pod/web
  3. kubectl --context kind-kx get pod web -o jsonpath='{.status.containerStatuses[0].imageID}'
  4. kubectl --context kind-kx run pinned --image=$(kubectl --context kind-kx get pod web -o jsonpath='{.status.containerStatuses[0].imageID}')
  5. kubectl --context kind-kx get pods -o custom-columns=NAME:.metadata.name,IMAGE:.spec.containers[0].image,PULL:.spec.containers[0].imagePullPolicy
  6. kubectl --context kind-kx run typo --image=ngnix:1.31
  7. kubectl --context kind-kx wait --for=jsonpath='{.status.containerStatuses[0].state.waiting.reason}'=ImagePullBackOff pod/typo --timeout=60s
  8. kubectl --context kind-kx get events --field-selector involvedObject.name=typo,reason=Failed
  9. kubectl --context kind-kx delete pod web pinned typo

For your own kind cluster kx: copy a command and paste it into your terminal. Run in the simulator runs the same command in this page's simulated cluster instead; nothing on this page touches your machine. The pinned pod's image is docker.io/library/nginx@sha256:... with pull policy IfNotPresent, while web keeps the tag. The typo pod's events show the pull access denied message, then ErrImagePull and ImagePullBackOff, because docker.io/library/ngnix does not exist.

Actual state

Check your understanding

5 checks

Your first answer to each check is the one that counts. After a miss you can answer again; passing every check reconciles the lesson.

  1. Check 1 of 5

    A container sets image to registry.example.com/shop/api:2.3@sha256:4c1e..., and someone has since pushed a rebuilt 2.3. What does the kubelet pull?

  2. Check 2 of 5

    What does imagePullPolicy: Always on a container using api:2.3 guarantee?

  3. Check 3 of 5

    CI signs images keyless with cosign from a GitHub Actions workflow. Which verification is meaningful?

  4. Check 4 of 5

  5. Check 5 of 5

    A Deployment in shop sets imagePullSecrets to regcred, which exists only in namespace ci. The private image has never been pulled on any node. What happens?

Lesson not yet reconciled

Desired: 4 objectives, 0 metReconciled: 4 of 4 objectives met

  • Pin images by digest and explain what that protects against. (not yet met)
  • Wire scanning into CI and the registry and act on the results. (not yet met)
  • Sign images and verify signatures at admission. (not yet met)
  • Pull from private registries with imagePullSecrets or a kubelet credential provider. (not yet met)

Pass every check above to reconcile this lesson.

Every check has passed, so the desired state is met. First-try accuracy: 0 of 5. This lesson's review cards are in your queue.

Practice

Put this lesson to work on the simulated cluster. Everything runs in your browser, with nothing to install.

Changed since the notes

This lesson draws on an earlier set of study notes. Where the documentation contradicts a claim in them, qualifies it or has moved past it, the claim is listed here with the corrected statement and the source it was checked against.

Show 32 corrections
  1. Stale, true once, no longerDockerfiles Deep Dive

    The notes saidFROM ubuntu:22.04, python:3.11-slim, golang:1.21

    CorrectedCurrent versions are Ubuntu 26.04 LTS (2026-04-23), Python 3.15 (2026-10-09) and Go 1.27 (2026-08-19). Go 1.25 is no longer supported.

    Sourcego.dev/doc/go1.27

  2. Nuance, true with conditionsDockerfiles Deep Dive

    The notes saidBuildKit, Docker's modern build backend

    CorrectedBuildKit is the default builder for Docker Desktop and Docker Engine users. The current page does not name the Engine version where it became the default.

    Sourcedocs.docker.com/build/buildkit

  3. Nuance, true with conditionsDockerfiles Deep Dive

    The notes saidThe older syntax ENV MY_VAR value is still supported

    CorrectedIt is supported for backward compatibility but deprecated. The LegacyKeyValueFormat build check warns about it, and the Dockerfile reference says it may be removed in a future release. Use ENV KEY=value.

    Sourcedocs.docker.com/reference/build-checks/legacy-key-value-format

  4. Wrong, not trueDockerfiles Deep Dive

    The notes saidEach instruction in the Dockerfile creates a layer

    CorrectedOnly instructions that change files create layers: RUN, COPY, ADD, and WORKDIR when it creates a directory. EXPOSE, CMD, ENV and similar only set image metadata.

    Sourcedocs.docker.com/get-started/docker-concepts/building-images/understanding-image-layers

  5. Nuance, true with conditionsDockerfiles Deep Dive

    The notes saidEvery Dockerfile must start with a FROM instruction

    CorrectedFROM can come after parser directives, comments and global ARGs. ARG is the only instruction allowed before FROM.

    Sourcedocs.docker.com/reference/dockerfile

  6. Nuance, true with conditionsDockerfiles Deep Dive

    The notes saidIf you don't specify ENTRYPOINT, it defaults to an empty value

    CorrectedIf you don't set ENTRYPOINT, the image inherits the base image's ENTRYPOINT. Setting ENTRYPOINT clears an inherited CMD.

    Sourcedocs.docker.com/reference/dockerfile

  7. Nuance, true with conditionsDockerfiles Deep Dive

    The notes saidHEALTHCHECK is used by orchestrators

    CorrectedDocker and Swarm use HEALTHCHECK. Kubernetes uses the liveness, readiness and startup probes in the Pod spec (exec, grpc, httpGet, tcpSocket). I found no primary Kubernetes page that says outright that HEALTHCHECK is ignored.

    Sourcekubernetes.io/docs/concepts/workloads/pods/probes

  8. Nuance, true with conditionsDockerfiles Deep Dive

    The notes saidEXPOSE is used by some orchestration systems for networking

    CorrectedEXPOSE does not publish a port. It documents the port and is used by docker run -P. Kubernetes does not use it, and containerPort is informational too.

    Sourcedocs.docker.com/reference/dockerfile

  9. Stale, true once, no longerContainer Security

    The notes saidBasic scanning uses the Clair database

    CorrectedECR basic scanning uses AWS native technology with more than 50 data feeds. Clair is deprecated: the ECR document history records every account migrated to AWS native basic scanning as of 2026-02-02 (an earlier notice gave 2025-10-01).

    Sourcedocs.aws.amazon.com/AmazonECR/latest/userguide/image-scanning-basic.html

  10. Stale, true once, no longerContainer Security

    The notes saidDocker Content Trust provides image signing

    CorrectedDocker announced the retirement of DCT (Notary v1) on 2025-07-29. Docker Official Images signing certificates began expiring on 2025-08-08, and pulls with DOCKER_CONTENT_TRUST=1 fail for those images. Use Sigstore cosign or Notation instead. Final shutdown dates are not confirmed from a primary source.

    Sourcedocker.com/blog/retiring-docker-content-trust

  11. Nuance, true with conditionsContainer Security

    The notes saidConfigure the application to use non-privileged ports (above 1024) (two entries)

    CorrectedUnprivileged ports are those >= 1024, so 1024 itself is unprivileged. Docker sets net.ipv4.ip_unprivileged_port_start=0 in container network namespaces, and the containerd 2.0 CRI plugin does the same by default (enable_unprivileged_ports = true). Non-root processes can therefore bind low ports in containers that don't use the host network.

    Sourcecontainerd.io/docs/2.2/containerd-2.0

  12. Wrong, not trueContainer Security

    The notes saidDocker secrets only work with Swarm, not standalone Docker (two entries)

    CorrectedDocker Compose supports secrets without Swarm. They are mounted read-only at /run/secrets/<name> in Linux containers.

    Sourcedocs.docker.com/compose/how-tos/use-secrets

  13. Stale, true once, no longerSecurity Best Practices

    The notes saidaws ecr put-image-scanning-configuration --image-scanning-configuration scanOnPush=true

    CorrectedRepository-level PutImageScanningConfiguration is being deprecated in favour of registry-level aws ecr put-registry-scanning-configuration, whose rules set BASIC or ENHANCED (Amazon Inspector) scanning by repository filter.

    Sourcedocs.aws.amazon.com/AmazonECR/latest/APIReference/API_PutImageScanningConfiguration.html

  14. Stale, true once, no longerAWS ECR Deep Dive

    The notes saidbasic scanning using the Clair engine (grouped: two note-54 claims)

    CorrectedECR basic scanning uses AWS-native scanning technology. The Clair-based basic scanning engine was deprecated and is unsupported after Oct 1, 2025. Enhanced scanning uses Amazon Inspector.

    Sourcedocs.aws.amazon.com/AmazonECR/latest/userguide/image-scanning-basic.html%20;%20https://docs.aws.amazon.com/AmazonECS/latest/developerguide/security-tasks-containers.html

  15. Wrong, not trueAWS ECR Deep Dive

    The notes saidSupported upstreams include Docker Hub, ECR Public, Quay, GHCR and other registries; upstream authentication presented as optional (grouped)

    CorrectedPull-through cache upstreams fall into three groups. No authentication: ECR Public, the Kubernetes registry (registry.k8s.io) and Quay. Credentials required, stored in a Secrets Manager secret whose name starts with ecr-pullthroughcache/: Docker Hub, GitHub Container Registry, Azure Container Registry, GitLab Container Registry (GitLab.com only) and Chainguard. IAM role: another ECR private registry (ECR-to-ECR).

    Sourcedocs.aws.amazon.com/AmazonECR/latest/userguide/pull-through-cache.html%20;%20https://docs.aws.amazon.com/AmazonECR/latest/userguide/pull-through-cache-creating-secret.html

  16. Nuance, true with conditionsAWS ECR Deep Dive

    The notes saidAmazonEC2ContainerRegistryReadOnly grants pull access

    CorrectedTrue, but the AWS managed policy AmazonEC2ContainerRegistryPullOnly grants only the permissions needed to pull and is the narrower choice for node roles.

    Sourcedocs.aws.amazon.com/AmazonECR/latest/userguide/security-iam-awsmanpol.html

  17. Nuance, true with conditionsAWS ECR Deep Dive

    The notes saidLifecycle rules by tag pattern, tag status, age

    CorrectedLifecycle rules can also count by sinceImagePulled and sinceImageTransitioned, and a rule can transition images to the archive storage class instead of expiring them.

    Sourcedocs.aws.amazon.com/AmazonECR/latest/userguide/LifecyclePolicies.html%20;%20https://docs.aws.amazon.com/AmazonECR/latest/userguide/lifecycle_policy_examples.html

  18. Nuance, true with conditionsAWS ECR Deep Dive

    The notes saidThe kubelet automatically gets ECR credentials

    CorrectedThe kubelet gets ECR credentials through the ecr-credential-provider kubelet image credential provider plugin, which EKS AMIs configure, not through built-in kubelet logic.

    Sourcekubernetes.io/docs/tasks/administer-cluster/kubelet-credential-provider

  19. Wrong, not trueAWS ECR Deep Dive

    The notes saidCloudWatch metrics show pull success rates and latency

    CorrectedECR publishes only RepositoryPullCount in the AWS/ECR namespace, plus API usage metrics in AWS/Usage. There is no pull success-rate or latency metric; diagnose failed pulls from kubelet/containerd events or CloudTrail.

    Sourcedocs.aws.amazon.com/AmazonECR/latest/userguide/ecr-repository-metrics.html%20;%20https://docs.aws.amazon.com/AmazonECR/latest/userguide/monitoring-usage.html

  20. Wrong, not trueAWS ECR Deep Dive

    The notes saidThe 'dry-run mode' for lifecycle policies

    CorrectedConfirmed. The feature is called lifecycle policy preview: aws ecr start-lifecycle-policy-preview, then get-lifecycle-policy-preview.

    Sourcedocs.aws.amazon.com/AmazonECR/latest/userguide/LifecyclePolicies.html

  21. Stale, true once, no longerContainer Image Security

    The notes saidCOSIGN_EXPERIMENTAL: "true" for keyless

    CorrectedKeyless signing has been the default since cosign 2.0. cosign is at v3.1.4.

    Sourcegithub.com/sigstore/cosign/releases/tag/v3.1.4

  22. Wrong, not trueContainer Image Security

    The notes saidKeyless cosign verify without identity flags

    CorrectedKeyless verify requires --certificate-identity(-regexp) and --certificate-oidc-issuer(-regexp).

    Sourcedocs.sigstore.dev/cosign/verifying/verify

  23. Stale, true once, no longerContainer Image Security

    The notes saidKyverno ClusterPolicy with validationFailureAction: enforce

    CorrectedLowercase values are deprecated, and 1.13 moved the setting to per-rule failureAction. Kyverno 1.19 deprecated kyverno.io/v1 ClusterPolicy/Policy, and 1.20.0 (2026-11-12) no longer enforces them. Use policies.kyverno.io/v1 ValidatingPolicy or ImageValidatingPolicy. This also affects the latest-tag policy.

    Sourcekyverno.io/docs/installation/upgrading

  24. Nuance, true with conditionsContainer Image Security

    The notes saidpolicy.sigstore.dev/v1alpha1 ClusterImagePolicy

    Correctedv1beta1 is documented. policy-controller is at v0.15.1.

    Sourcedocs.sigstore.dev/policy-controller/overview

  25. Nuance, true with conditionsContainer Image Security

    The notes saidBase images golang:1.21, alpine:3.18, ubuntu:22.04

    CorrectedGo 1.21 reached EOL on 2024-08-13 and Alpine 3.18 on 2025-05-09. Ubuntu 22.04 keeps standard support until 2027-06.

    Sourceendoflife.date/go

  26. Stale, true once, no longerContainer Image Security

    The notes saidnpm ci --only=production

    CorrectedUse --omit=dev.

    Sourcedocs.npmjs.com/cli/v11/commands/npm-ci

  27. Nuance, true with conditionsContainer Image Security

    The notes saidECR scanning is built in via scan_on_push

    CorrectedBasic scanning uses AWS-native technology, and enhanced scanning uses Amazon Inspector.

    Sourcedocs.aws.amazon.com/AmazonECR/latest/userguide/image-scanning-basic.html

  28. Wrong, not trueContainer Image Security

    The notes saidCreate a new non-root user on a node slim image

    CorrectedUID/GID 1000 already belongs to the node user. Use USER node.

    Sourcegithub.com/nodejs/docker-node/blob/main/docs/BestPractices.md

  29. Wrong, not trueContainer Image Security

    The notes saidUSER appuser with runAsNonRoot

    CorrectedThe kubelet cannot verify a non-numeric user. Use a numeric UID or set runAsUser.

    Sourcekubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1#security-context-1

  30. Wrong, not trueContainer Image Security

    The notes saidslsa-generator-container generate command

    CorrectedThis CLI does not exist. Use the slsa-github-generator container workflow, buildx provenance or GitHub attestations.

    Sourcegithub.com/slsa-framework/slsa-github-generator/blob/main/internal/builders/container/README.md

  31. Nuance, true with conditionsContainer Image Security

    The notes saidcosign attest without --type is an error

    Corrected--type defaults to custom, so the command succeeds with a custom predicate type.

    Sourcegithub.com/sigstore/cosign/blob/main/doc/cosign_attest.md

  32. Wrong, not trueContainer Image Security

    The notes saidimagePullPolicy: Always ensures patched images

    CorrectedAlways only re-resolves the tag.

    Sourcekubernetes.io/docs/concepts/containers/images

Every correction across the guide, by note and topic.

Sources

Checked against kubernetes.io and AWS documentation for Kubernetes 1.37 on .

  1. kubernetes.io/docs/concepts/containers/images
  2. kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry
  3. kubernetes.io/docs/tasks/configure-pod-container/configure-service-account
  4. kubernetes.io/docs/tasks/administer-cluster/kubelet-credential-provider
  5. kubernetes.io/docs/reference/access-authn-authz/validating-admission-policy
  6. docs.docker.com/reference/dockerfile
  7. docs.docker.com/build/buildkit
  8. docs.docker.com/build/metadata/attestations/slsa-provenance
  9. docs.docker.com/build/metadata/attestations/sbom
  10. docs.docker.com/compose/how-tos/use-secrets
  11. docker.com/blog/retiring-docker-content-trust
  12. trivy.dev/docs/latest/references/configuration/cli/trivy_image
  13. slsa.dev/spec/v1.0/provenance
  14. github.com/slsa-framework/slsa-github-generator
  15. docs.sigstore.dev/cosign/signing/signing_with_containers
  16. docs.sigstore.dev/cosign/verifying/verify
  17. docs.sigstore.dev/policy-controller/overview
  18. kyverno.io/docs/policy-types/image-validating-policy
  19. docs.aws.amazon.com/AmazonECR/latest/userguide/image-scanning-basic.html
  20. docs.aws.amazon.com/AmazonECR/latest/userguide/image-scanning-enhanced.html
  21. docs.aws.amazon.com/AmazonECR/latest/userguide/image-signing.html
  22. docs.aws.amazon.com/eks/latest/userguide/image-verification.html
  23. docs.aws.amazon.com/AmazonECR/latest/userguide/ECR_on_EKS.html
  24. docs.aws.amazon.com/AmazonECR/latest/userguide/security-iam-awsmanpol.html
  25. docs.aws.amazon.com/AmazonECR/latest/userguide/pull-through-cache-creating-rule.html

Image supply chain

↓ ↑ step, 1 to 7 scene, Esc leave

kind cluster kxLast command: Nothing run yet