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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | πŸ”΄ Critical | βš–οΈ Poor tradeoff

Pre-existing: Runtime base image not digest-pinned (CWE-250).

Line 1 defines ARG BASE_IMAGE=registry.access.redhat.com/ubi9-micro:latest (using :latest tag). Line 39 references it in FROM ${BASE_IMAGE}. Per container hardening guidelines, base images must be pinned by digest (@sha256:...), not floating tags. This violates CWE-250 and increases supply-chain attack surface. Not caused by this PR, but should be addressed before merge.

Also applies to: 39-39

πŸ€– 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 1, The BASE_IMAGE argument uses a floating `:latest` tag
instead of being pinned to a specific digest, which violates container hardening
guidelines and increases supply-chain attack surface. Replace the `:latest` tag
in the ARG BASE_IMAGE definition with a specific digest in the format
`@sha256`:... (for example, registry.access.redhat.com/ubi9-micro@sha256:...).
This single change will automatically apply to all references of ${BASE_IMAGE},
including the FROM statement that uses it.

Source: Coding guidelines


FROM registry.access.redhat.com/ubi9/go-toolset:1.26.2-1779959429 AS builder
FROM registry.access.redhat.com/ubi9/go-toolset:1.26.3-1781070142 AS builder

ARG GIT_SHA=unknown
ARG GIT_DIRTY=""
Expand Down