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
3 changes: 2 additions & 1 deletion openshift/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ RUN dnf clean all && rm -rf /var/cache/dnf/* \
&& dnf update -y \
&& dnf install -y catatonit python3.12-cryptography python3.12-devel gcc \
&& pushd /usr/local/bin && ln -sf ../../bin/python3.12 python3 && popd \
&& python3 -m ensurepip --upgrade
&& python3 -m ensurepip --upgrade \
&& {dnf remove -y python3-six || true; }
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

Missing space after { causes shell syntax error.

Brace groups in shell require whitespace after the opening {. Currently {dnf is interpreted as a literal command name, not as the start of a compound command, which will fail the build.

🐛 Proposed fix
     && python3 -m ensurepip --upgrade \
-    && {dnf remove -y python3-six || true; }
+    && { dnf remove -y python3-six || true; }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
&& {dnf remove -y python3-six || true; }
&& { dnf remove -y python3-six || true; }
🧰 Tools
🪛 Trivy (0.69.3)

[error] 26-31: 'dnf clean all' missing

'dnf clean all' is missed: dnf clean all && rm -rf /var/cache/dnf/* && dnf update -y && dnf install -y catatonit python3.12-cryptography python3.12-devel gcc && pushd /usr/local/bin && ln -sf ../../bin/python3.12 python3 && popd && python3 -m ensurepip --upgrade && {dnf remove -y python3-six || true; }

Rule: DS-0019

Learn more

(IaC/Dockerfile)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@openshift/Dockerfile` at line 31, The brace group "{dnf remove -y python3-six
|| true; }" is missing a space after the opening "{", causing a shell syntax
error; fix it by adding a space so the compound command reads with "{ dnf remove
-y python3-six || true; }" (ensure the existing semicolon before the closing "}"
remains) to make the shell recognize the brace group in the Dockerfile.


# Add steps for cachito
ENV REMOTE_SOURCES=${REMOTE_SOURCES:-"./openshift/"}
Expand Down