Update registry.access.redhat.com/ubi9/go-toolset Docker tag to v1.25.9-1778675823#3234
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: red-hat-konflux[bot] The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughThree Dockerfiles—the top-level 🚥 Pre-merge checks | ✅ 8 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (8 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
|
Hi @red-hat-konflux[bot]. Thanks for your PR. I'm waiting for a openshift member to verify that this patch is reasonable to test. If it is, they should reply with Regular contributors should join the org to skip this step. Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
0bdc50b to
a69c569
Compare
There was a problem hiding this comment.
🧹 Nitpick comments (1)
Dockerfile (1)
8-17: Consider adding a USER directive to the final stage for security hardening.The final stage inherits the default user (root) from
ubi-micro:latest. While not directly related to this PR's change, adding an explicitUSERdirective with a non-root user would improve the security posture of the container.🛡️ Proposed security improvement
FROM registry.access.redhat.com/ubi9/ubi-micro:latest LABEL description="ROSA CLI" LABEL io.k8s.description="ROSA CLI" LABEL com.redhat.component="rh-rosa-cli" LABEL distribution-scope="release" LABEL name="rh-rosa-cli" release="vX.Y" url="https://github.com/openshift/rosa" LABEL vendor="Red Hat, Inc." LABEL version="vX.Y" +USER 1001 + COPY --from=builder /opt/app-root/src/releases /releasesAs per static analysis hints, Trivy rule DS-0002 recommends specifying at least one USER command with a non-root user.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@Dockerfile` around lines 8 - 17, The Dockerfile's final stage currently runs as root (inherits FROM registry.access.redhat.com/ubi9/ubi-micro:latest) and should explicitly switch to a non-root user; add steps to create or use a non-root user (e.g., add a dedicated user/group, chown the /releases directory copied by COPY --from=builder /opt/app-root/src/releases /releases), and then add a USER directive to run the container as that non-root user so the container no longer defaults to root.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@Dockerfile`:
- Around line 8-17: The Dockerfile's final stage currently runs as root
(inherits FROM registry.access.redhat.com/ubi9/ubi-micro:latest) and should
explicitly switch to a non-root user; add steps to create or use a non-root user
(e.g., add a dedicated user/group, chown the /releases directory copied by COPY
--from=builder /opt/app-root/src/releases /releases), and then add a USER
directive to run the container as that non-root user so the container no longer
defaults to root.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: c72c0eb0-692a-4413-9d74-6c7a3b4b2eac
📒 Files selected for processing (3)
Dockerfileimages/Dockerfile.e2eimages/Dockerfile.konflux
✅ Files skipped from review due to trivial changes (2)
- images/Dockerfile.e2e
- images/Dockerfile.konflux
a69c569 to
c918d22
Compare
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
Dockerfile (1)
8-17:⚠️ Potential issue | 🟠 MajorAdd an explicit non-root
USERin the final stage.The final image has no
USERdirective, so it defaults to root. Add a non-root user (for exampleUSER 1001) after the COPY statement.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@Dockerfile` around lines 8 - 17, The final image stage currently ends with the COPY --from=builder /opt/app-root/src/releases /releases and lacks a USER directive so the container runs as root; add an explicit non-root user by appending a USER directive (e.g., USER 1001) after the COPY statement to ensure the image runs with a non-root UID and update any file ownership/permissions if needed to match that UID.
🧹 Nitpick comments (1)
Dockerfile (1)
1-1: Consider pinning the builder image by digest for reproducibility.Line 1 uses a mutable tag only. Pinning to
@sha256:<digest>makes builds deterministic and improves supply-chain traceability.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@Dockerfile` at line 1, The FROM line uses a mutable tag; update the Dockerfile's FROM instruction that references "registry.access.redhat.com/ubi9/go-toolset:1.25.8-1776213685" to pin the image by its immutable digest (e.g., replace the tag with `@sha256`:<digest>) so builds are reproducible and supply-chain traceable, fetching and verifying the correct sha256 digest for that exact image version before committing the change.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Outside diff comments:
In `@Dockerfile`:
- Around line 8-17: The final image stage currently ends with the COPY
--from=builder /opt/app-root/src/releases /releases and lacks a USER directive
so the container runs as root; add an explicit non-root user by appending a USER
directive (e.g., USER 1001) after the COPY statement to ensure the image runs
with a non-root UID and update any file ownership/permissions if needed to match
that UID.
---
Nitpick comments:
In `@Dockerfile`:
- Line 1: The FROM line uses a mutable tag; update the Dockerfile's FROM
instruction that references
"registry.access.redhat.com/ubi9/go-toolset:1.25.8-1776213685" to pin the image
by its immutable digest (e.g., replace the tag with `@sha256`:<digest>) so builds
are reproducible and supply-chain traceable, fetching and verifying the correct
sha256 digest for that exact image version before committing the change.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 72f8371f-bc91-4f2f-bf7c-f510e35ceacf
📒 Files selected for processing (3)
Dockerfileimages/Dockerfile.e2eimages/Dockerfile.konflux
✅ Files skipped from review due to trivial changes (2)
- images/Dockerfile.konflux
- images/Dockerfile.e2e
c918d22 to
130168a
Compare
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
Dockerfile (1)
8-17:⚠️ Potential issue | 🟠 MajorSet an explicit non-root runtime user in the final image.
There is no
USERinstruction in the runtime stage, so the container defaults to root. Please set a non-root user explicitly.🔐 Proposed fix
FROM registry.access.redhat.com/ubi9/ubi-micro:latest LABEL description="ROSA CLI" LABEL io.k8s.description="ROSA CLI" LABEL com.redhat.component="rh-rosa-cli" LABEL distribution-scope="release" LABEL name="rh-rosa-cli" release="vX.Y" url="https://github.com/openshift/rosa" LABEL vendor="Red Hat, Inc." LABEL version="vX.Y" COPY --from=builder /opt/app-root/src/releases /releases +USER 1001🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@Dockerfile` around lines 8 - 17, The final image defaults to root; add an explicit non-root runtime user by creating or referencing a non-root UID/GID and switching to it after copying artifacts: add a RUN that creates a user/group (e.g., groupadd -r rosa && useradd -r -g rosa -d /nonexistent -s /sbin/nologin rosa), chown the target path copied by COPY --from=builder /opt/app-root/src/releases /releases to that user, and add USER rosa (or USER 1001) before the image exits so the container runs as non-root.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Outside diff comments:
In `@Dockerfile`:
- Around line 8-17: The final image defaults to root; add an explicit non-root
runtime user by creating or referencing a non-root UID/GID and switching to it
after copying artifacts: add a RUN that creates a user/group (e.g., groupadd -r
rosa && useradd -r -g rosa -d /nonexistent -s /sbin/nologin rosa), chown the
target path copied by COPY --from=builder /opt/app-root/src/releases /releases
to that user, and add USER rosa (or USER 1001) before the image exits so the
container runs as non-root.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository YAML (base), Central YAML (inherited)
Review profile: CHILL
Plan: Pro Plus
Run ID: ee786bee-70d4-4e48-a25d-1a2e6a128a57
📒 Files selected for processing (3)
Dockerfileimages/Dockerfile.e2eimages/Dockerfile.konflux
✅ Files skipped from review due to trivial changes (2)
- images/Dockerfile.e2e
- images/Dockerfile.konflux
130168a to
96a09a7
Compare
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
Dockerfile (1)
8-17:⚠️ Potential issue | 🟠 MajorSet an explicit non-root runtime user in the final image stage.
The final stage has no
USERdirective, so the container defaults to running as root. Add a non-rootUSERto satisfy DS-0002 and reduce container breakout impact.Suggested hardening patch
FROM registry.access.redhat.com/ubi9/ubi-micro:latest LABEL description="ROSA CLI" LABEL io.k8s.description="ROSA CLI" LABEL com.redhat.component="rh-rosa-cli" LABEL distribution-scope="release" LABEL name="rh-rosa-cli" release="vX.Y" url="https://github.com/openshift/rosa" LABEL vendor="Red Hat, Inc." LABEL version="vX.Y" COPY --from=builder /opt/app-root/src/releases /releases +USER 1001🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@Dockerfile` around lines 8 - 17, The final Dockerfile stage currently leaves the container running as root (no USER set) which violates DS-0002; update the final image stage (the stage that uses FROM registry.access.redhat.com/ubi9/ubi-micro:latest and performs COPY --from=builder /opt/app-root/src/releases /releases) to create or use a non-root runtime user and set USER to that non-root UID/GID, and ensure /releases (and any other runtime-owned paths) are chowned/chmod'd appropriately so the non-root user can access them before switching to USER; reference the final stage and the COPY step to locate where to add the user creation, ownership fix, and USER directive.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Outside diff comments:
In `@Dockerfile`:
- Around line 8-17: The final Dockerfile stage currently leaves the container
running as root (no USER set) which violates DS-0002; update the final image
stage (the stage that uses FROM registry.access.redhat.com/ubi9/ubi-micro:latest
and performs COPY --from=builder /opt/app-root/src/releases /releases) to create
or use a non-root runtime user and set USER to that non-root UID/GID, and ensure
/releases (and any other runtime-owned paths) are chowned/chmod'd appropriately
so the non-root user can access them before switching to USER; reference the
final stage and the COPY step to locate where to add the user creation,
ownership fix, and USER directive.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository YAML (base), Central YAML (inherited)
Review profile: CHILL
Plan: Pro Plus
Run ID: ad0b73c5-25a4-45d1-a51d-e60cb66f39be
📒 Files selected for processing (3)
Dockerfileimages/Dockerfile.e2eimages/Dockerfile.konflux
✅ Files skipped from review due to trivial changes (2)
- images/Dockerfile.konflux
- images/Dockerfile.e2e
96a09a7 to
4abe763
Compare
4abe763 to
f03adfa
Compare
af3b004 to
ef13496
Compare
ef13496 to
06f3f74
Compare
06f3f74 to
e248535
Compare
e248535 to
099706d
Compare
099706d to
b2b9052
Compare
b2b9052 to
b7bfc49
Compare
b7bfc49 to
8eb896a
Compare
….9-1778675823 Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com>
8eb896a to
c6d051e
Compare
This PR contains the following updates:
1.25.8→1.25.9-17786758231.25.8→1.25.9-1778675823Warning
Some dependencies could not be looked up. Check the warning logs for more information.
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about these updates again.
To execute skipped test pipelines write comment
/ok-to-test.Documentation
Find out how to configure dependency updates in MintMaker documentation or see all available configuration options in Renovate documentation.