Conversation
Signed-off-by: Ilya Buziuk <ibuziuk@redhat.com>
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 37 minutes and 17 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughTwo UBI Dockerfile configurations are updated to include Google Cloud CLI installation. Both images download the gcloud binary for amd64 and arm64 architectures, install it to Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (2)
universal/ubi9/Dockerfile (1)
443-474: Missing checksum verification for gcloud CLI download.Same as the UBI10 Dockerfile - other tools in this file verify checksums (helm, kustomize, terraform, tekton, knative, krew, e2fsprogs). Add checksum verification for consistency and security.
♻️ Proposed fix to add checksum verification
GCLOUD_TGZ="google-cloud-cli-${GCLOUD_VERSION}-linux-${GCLOUD_ARCH}.tar.gz" GCLOUD_TGZ_URL="https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/${GCLOUD_TGZ}" +GCLOUD_SHA256_URL="${GCLOUD_TGZ_URL}.sha256" curl -sSLO "${GCLOUD_TGZ_URL}" +curl -sSLO "${GCLOUD_SHA256_URL}" +echo "$(cat ${GCLOUD_TGZ}.sha256) ${GCLOUD_TGZ}" | sha256sum -c - tar -xzf "${GCLOUD_TGZ}"🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@universal/ubi9/Dockerfile` around lines 443 - 474, Add checksum verification for the Google Cloud CLI download by retrieving the expected checksum for GCLOUD_TGZ (use a trusted source for the checksum tied to GCLOUD_VERSION), compute the downloaded archive's checksum (from GCLOUD_TGZ_URL download), compare them and fail the build if they do not match; update the RUN heredoc block that creates TEMP_DIR and downloads GCLOUD_TGZ (referencing GCLOUD_TGZ, GCLOUD_TGZ_URL, GCLOUD_VERSION and TARGETARCH) to perform the checksum fetch/compare before extracting and running ./google-cloud-sdk/install.sh, and ensure TEMP_DIR is cleaned up on both success and checksum-failure paths.universal/ubi10/Dockerfile (1)
475-506: Add checksum verification for gcloud CLI download.All other tool installations in this Dockerfile (helm, kustomize, terraform, tekton, knative, krew, e2fsprogs) verify checksums after downloading, but the gcloud installation is missing this step. Google publishes SHA256 checksums at:
https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-cli-${VERSION}-linux-${ARCH}.tar.gz.sha256♻️ Proposed fix
GCLOUD_TGZ="google-cloud-cli-${GCLOUD_VERSION}-linux-${GCLOUD_ARCH}.tar.gz" GCLOUD_TGZ_URL="https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/${GCLOUD_TGZ}" +GCLOUD_SHA256_URL="${GCLOUD_TGZ_URL}.sha256" curl -sSLO "${GCLOUD_TGZ_URL}" +curl -sSLO "${GCLOUD_SHA256_URL}" +echo "$(cat ${GCLOUD_TGZ}.sha256) ${GCLOUD_TGZ}" | sha256sum -c - tar -xzf "${GCLOUD_TGZ}"🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@universal/ubi10/Dockerfile` around lines 475 - 506, Add SHA256 checksum verification after downloading the gcloud tarball: construct the checksum URL using GCLOUD_VERSION and GCLOUD_ARCH (parallel to GCLOUD_TGZ_URL), download the .sha256 file, verify the downloaded file (GCLOUD_TGZ) using sha256sum -c (or equivalent) and fail the build if it does not match; place this check in the same RUN <<EOF block after curl -sSLO "${GCLOUD_TGZ_URL}" and before tar -xzf "${GCLOUD_TGZ}" so the install.sh and mv google-cloud-sdk steps only run on verified content.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@universal/ubi10/Dockerfile`:
- Around line 475-506: Add SHA256 checksum verification after downloading the
gcloud tarball: construct the checksum URL using GCLOUD_VERSION and GCLOUD_ARCH
(parallel to GCLOUD_TGZ_URL), download the .sha256 file, verify the downloaded
file (GCLOUD_TGZ) using sha256sum -c (or equivalent) and fail the build if it
does not match; place this check in the same RUN <<EOF block after curl -sSLO
"${GCLOUD_TGZ_URL}" and before tar -xzf "${GCLOUD_TGZ}" so the install.sh and mv
google-cloud-sdk steps only run on verified content.
In `@universal/ubi9/Dockerfile`:
- Around line 443-474: Add checksum verification for the Google Cloud CLI
download by retrieving the expected checksum for GCLOUD_TGZ (use a trusted
source for the checksum tied to GCLOUD_VERSION), compute the downloaded
archive's checksum (from GCLOUD_TGZ_URL download), compare them and fail the
build if they do not match; update the RUN heredoc block that creates TEMP_DIR
and downloads GCLOUD_TGZ (referencing GCLOUD_TGZ, GCLOUD_TGZ_URL, GCLOUD_VERSION
and TARGETARCH) to perform the checksum fetch/compare before extracting and
running ./google-cloud-sdk/install.sh, and ensure TEMP_DIR is cleaned up on both
success and checksum-failure paths.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 398b5548-5d7c-46ee-a66a-7b62349055b7
📒 Files selected for processing (2)
universal/ubi10/Dockerfileuniversal/ubi9/Dockerfile
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: ibuziuk, rohanKanojia 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 |
Signed-off-by: Ilya Buziuk <ibuziuk@redhat.com>
|
New changes are detected. LGTM label has been removed. |
|
Pull Request images published ✨ Base: quay.io/devfile/base-developer-image:pr-253 |
1 similar comment
|
Pull Request images published ✨ Base: quay.io/devfile/base-developer-image:pr-253 |
https://docs.cloud.google.com/sdk/gcloud