-
Notifications
You must be signed in to change notification settings - Fork 2
feat: INFRA-6244 Fix image source #89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: Dmitrii Spichakov <[email protected]>
Signed-off-by: Dmitrii Spichakov <[email protected]>
|
Caution Review failedThe pull request is closed. WalkthroughThe Dockerfile's Cronos tarball reference was updated: the download URL and referenced tarball filename were changed from a mainnet release to the v1.5.3 testnet tarball; extraction, cleanup, and move commands continue to operate on the new filename. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes
Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
Dockerfile(1 hunks)
🧰 Additional context used
🪛 Checkov (3.2.334)
Dockerfile
[high] 11-12: Ensure that certificate validation isn't disabled with wget
(CKV2_DOCKER_3)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: guardrails/scan
🔇 Additional comments (1)
Dockerfile (1)
11-12: Tarball filename verified as correct and consistent.The artifact
cronos_1.5.3-testnet_Linux_x86_64.tar.gzis confirmed as a valid release asset for Cronos v1.5.3-testnet. The filename is used consistently across the wget download, tar extraction, and rm removal commands in the Dockerfile with no mismatches or typos. No changes required.
| RUN cd /tmp && wget --no-check-certificate https://github.com/crypto-org-chain/cronos/releases/download/v1.5.3/cronos_1.5.3-testnet_Linux_x86_64.tar.gz && tar -xvf cronos_1.5.3-testnet_Linux_x86_64.tar.gz \ | ||
| && rm cronos_1.5.3-testnet_Linux_x86_64.tar.gz && mv ./* /home/cronos/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove --no-check-certificate to enforce SSL/TLS validation.
Disabling certificate validation creates a security risk by making the download vulnerable to man-in-the-middle attacks. This is a critical security posture gap that should be remediated.
Apply this diff to enforce certificate validation:
- RUN cd /tmp && wget --no-check-certificate https://github.com/crypto-org-chain/cronos/releases/download/v1.5.3/cronos_1.5.3-testnet_Linux_x86_64.tar.gz && tar -xvf cronos_1.5.3-testnet_Linux_x86_64.tar.gz \
- && rm cronos_1.5.3-testnet_Linux_x86_64.tar.gz && mv ./* /home/cronos/
+ RUN cd /tmp && wget https://github.com/crypto-org-chain/cronos/releases/download/v1.5.3/cronos_1.5.3-testnet_Linux_x86_64.tar.gz && tar -xvf cronos_1.5.3-testnet_Linux_x86_64.tar.gz \
+ && rm cronos_1.5.3-testnet_Linux_x86_64.tar.gz && mv ./* /home/cronos/If certificate validation fails due to missing CA certificates in the base image, consider installing ca-certificates instead of disabling validation:
# Install dependencies
- RUN apt-get update -y && apt-get install wget curl procps net-tools jq lz4 -y
+ RUN apt-get update -y && apt-get install wget curl procps net-tools jq lz4 ca-certificates -y📝 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.
| RUN cd /tmp && wget --no-check-certificate https://github.com/crypto-org-chain/cronos/releases/download/v1.5.3/cronos_1.5.3-testnet_Linux_x86_64.tar.gz && tar -xvf cronos_1.5.3-testnet_Linux_x86_64.tar.gz \ | |
| && rm cronos_1.5.3-testnet_Linux_x86_64.tar.gz && mv ./* /home/cronos/ | |
| RUN cd /tmp && wget https://github.com/crypto-org-chain/cronos/releases/download/v1.5.3/cronos_1.5.3-testnet_Linux_x86_64.tar.gz && tar -xvf cronos_1.5.3-testnet_Linux_x86_64.tar.gz \ | |
| && rm cronos_1.5.3-testnet_Linux_x86_64.tar.gz && mv ./* /home/cronos/ |
🧰 Tools
🪛 Checkov (3.2.334)
[high] 11-12: Ensure that certificate validation isn't disabled with wget
(CKV2_DOCKER_3)
🤖 Prompt for AI Agents
In Dockerfile around lines 11-12, the wget call uses --no-check-certificate
which disables TLS validation; remove that flag and ensure the image has
up-to-date CA roots by adding installation of ca-certificates (and update
package lists) earlier in the Dockerfile so wget can validate the server
certificate; keep the rest of the download/tar/move steps unchanged.
Fix image source for v1.5.3-testnet image upgrade
Summary by CodeRabbit