Skip to content
Open
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-1783931515 AS builder
FROM registry.access.redhat.com/ubi9/go-toolset:9.8-1784190466 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:

skopeo inspect docker://registry.access.redhat.com/ubi9/go-toolset:9.8-1784190466 \
  | jq -r '.Digest'

Repository: openshift-hyperfleet/hyperfleet-api

Length of output: 213


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '--- Dockerfile ---\n'
cat -n Dockerfile
printf '\n--- refs to go-toolset ---\n'
rg -n 'ubi9/go-toolset|FROM ' Dockerfile

Repository: openshift-hyperfleet/hyperfleet-api

Length of output: 264


🏁 Script executed (no clone):

#!/bin/bash
set -euo pipefail

image='registry.access.redhat.com/ubi9/go-toolset:9.8-1784190466'

printf 'Attempting registry v2 HEAD...\n'
curl -fsSI -H 'Accept: application/vnd.docker.distribution.manifest.v2+json' \
  "https://${image%%:*}/v2/${image#*/v2/}" >/tmp/registry_head.out 2>/tmp/registry_head.err || true

printf '\nHEAD stdout/stderr summary:\n'
sed -n '1,40p' /tmp/registry_head.out 2>/dev/null || true
sed -n '1,80p' /tmp/registry_head.err 2>/dev/null || true

Length of output: 429


🏁 Script executed:

#!/bin/bash
set -euo pipefail
sed -n '1,40p' Dockerfile | cat -n

Repository: openshift-hyperfleet/hyperfleet-api

Length of output: 1759


Pin the base images by digest (CWE-494). ubi9/go-toolset:9.8-1784190466 and ubi9-micro:latest are mutable tags; a registry retag can silently change the build toolchain or runtime image.

πŸ€– 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 the Dockerfile base images used by the builder
stage and runtime stage to immutable digests instead of mutable tags, including
replacing ubi9/go-toolset:9.8-1784190466 and ubi9-micro:latest with their
corresponding sha256 digests while preserving the existing stage structure.

Source: Path instructions


ARG GIT_SHA=unknown
ARG GIT_DIRTY=""
Expand Down