Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ARG BASE_IMAGE=registry.access.redhat.com/ubi9-micro:latest

FROM registry.access.redhat.com/ubi9/go-toolset:9.8-1786023237 AS builder
FROM registry.access.redhat.com/ubi9/go-toolset:9.8-1786351949 AS builder

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

πŸ”’ Security & Privacy | 🟠 Major | ⚑ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail
skopeo inspect --format '{{.Name}}@{{.Digest}}' \
  docker://registry.access.redhat.com/ubi9/go-toolset:9.8-1786351949

Repository: openshift-hyperfleet/hyperfleet-sentinel

Length of output: 222


🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

printf '%s\n' '--- Dockerfile ---'
cat -n Dockerfile

printf '%s\n' '--- Docker-related files ---'
git ls-files | rg '(^|/)(Dockerfile|Containerfile)([^/]*$)|(^|/)\.dockerignore$' || true

printf '%s\n' '--- relevant diff summary ---'
git diff --stat
git diff -- Dockerfile

Repository: openshift-hyperfleet/hyperfleet-sentinel

Length of output: 2564


🏁 Script executed (no clone):

#!/usr/bin/env bash
set -euo pipefail

image='registry.access.redhat.com/ubi9/go-toolset'
tag='9.8-1786351949'

printf '%s\n' '--- registry manifest headers ---'
curl --fail-with-body -sSIL \
  -H 'Accept: application/vnd.docker.distribution.manifest.v2+json' \
  -H 'Accept: application/vnd.oci.image.manifest.v1+json' \
  "https://${image}/manifests/${tag}" || true

printf '%s\n' '--- registry manifest response headers ---'
curl --fail-with-body -sS -D - -o /dev/null \
  -H 'Accept: application/vnd.docker.distribution.manifest.v2+json' \
  -H 'Accept: application/vnd.oci.image.manifest.v1+json' \
  "https://${image}/manifests/${tag}" || true

Length of output: 698


🏁 Script executed (no clone):

#!/usr/bin/env bash
set -euo pipefail

repo='ubi9/go-toolset'
tag='9.8-1786351949'

printf '%s\n' '--- registry API ---'
curl -sS -D - -o /tmp/registry-v2-response \
  'https://registry.access.redhat.com/v2/' || true
cat /tmp/registry-v2-response

printf '%s\n' '--- image manifest through registry API ---'
curl -sS -D /tmp/manifest-headers -o /tmp/manifest-body \
  -H 'Accept: application/vnd.oci.image.index.v1+json' \
  -H 'Accept: application/vnd.docker.distribution.manifest.list.v2+json' \
  -H 'Accept: application/vnd.oci.image.manifest.v1+json' \
  "https://registry.access.redhat.com/v2/${repo}/manifests/${tag}" || true
cat /tmp/manifest-headers
printf '%s\n' '--- manifest body ---'
cat /tmp/manifest-body

printf '%s\n' '--- catalog API candidates ---'
for url in \
  "https://catalog.redhat.com/api/containers/v1/repositories/registry/registry.access.redhat.com/ubi9/go-toolset" \
  "https://catalog.redhat.com/api/containers/v1/repositories/registry/ubi9/go-toolset" \
  "https://catalog.redhat.com/api/containers/v1/repositories/registry/registry.access.redhat.com/ubi9/go-toolset/tags/${tag}"; do
  printf 'URL: %s\n' "$url"
  curl -sS -L -w '\nHTTP %{http_code}\n' "$url" | head -c 4000
  printf '\n'
done

Length of output: 2567


🌐 Web query:

registry.access.redhat.com ubi9/go-toolset 9.8-1786351949 manifest digest

πŸ’‘ Result:

The manifest digest for a specific container image tag like registry.access.redhat.com/ubi9/go-toolset:9.8-1786351949 is not a single, universally static value because these tags are updated frequently by Red Hat as part of their security patching and maintenance cycle [1][2][3]. To obtain the current manifest digest for this specific image tag, you should use one of the following authoritative methods: 1. Red Hat Ecosystem Catalog: Visit the official Red Hat Ecosystem Catalog page for the UBI 9 Go Toolset [4]. This site provides the official manifest list digest for the current version of the image, which ensures you pull the correct, supported image for your architecture [4]. 2. Skopeo: Use the skopeo tool to inspect the image remotely without pulling it to your local system [5]. This command will return the digest associated with the tag: skopeo inspect docker://registry.access.redhat.com/ubi9/go-toolset:9.8-1786351949 3. Docker/Podman: You can also identify the digest after pulling the image by running: podman images --digests --no-trunc or docker images --digests --no-trunc Because Red Hat container tags are mutable and updated regularly, referencing them by tag rather than digest may lead to pulling different image content over time [6][7]. It is a recommended best practice to verify the specific digest for your environment at the time of your build using the methods above [6].

Citations:


Pin both container base images by digest before merge.

Line 3 resolves to manifest-list digest sha256:0b471eb04868f3d9d90bf3c668f9c6c7a22cef07474ac9fec067909dfd7dec7c:

FROM registry.access.redhat.com/ubi9/go-toolset:9.8-1786351949@sha256:0b471eb04868f3d9d90bf3c668f9c6c7a22cef07474ac9fec067909dfd7dec7c AS builder

Pin the runtime default BASE_IMAGE at line 1 as well. Tag-only references permit different image contents across builds, creating a supply-chain integrity risk under CWE-494.

πŸ€– Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@Dockerfile` at line 3, Pin both Docker base image references by digest:
append the specified manifest-list digest to the builder image in the FROM
instruction, and update the runtime default BASE_IMAGE to use its corresponding
immutable digest while preserving the existing tags and build flow.

Source: Path instructions


ARG GIT_SHA=unknown
ARG GIT_DIRTY=""
Expand Down