-
Notifications
You must be signed in to change notification settings - Fork 2
feat: INFRA-6244 Cronos testnet image upgrade v1.5.3 #88
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 <dmitrii.spichakov@chainstack.com>
WalkthroughThe Dockerfile's Cronos binary download configuration has been modified to fetch the testnet v1.5.1 release instead of mainnet v1.5.3, updating the download URL, tarball filename, and extraction path accordingly while preserving all other build steps. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
Possibly related PRs
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
🧹 Nitpick comments (1)
Dockerfile (1)
11-12: Consider adding checksum verification for supply chain security.Downloading and extracting binaries without verifying checksums or signatures increases the risk of deploying compromised binaries. GitHub releases typically provide SHA256 checksums.
Add checksum verification after download:
RUN cd /tmp && wget https://github.com/crypto-org-chain/cronos/releases/download/v1.5.1/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.1/cronos_1.5.3-testnet_Linux_x86_64.tar.gz && \ + wget https://github.com/crypto-org-chain/cronos/releases/download/v1.5.1/cronos_1.5.3-testnet_Linux_x86_64.tar.gz.sha256 && \ + sha256sum -c cronos_1.5.3-testnet_Linux_x86_64.tar.gz.sha256 && \ + tar -xvf cronos_1.5.3-testnet_Linux_x86_64.tar.gz && \ + rm cronos_1.5.3-testnet_Linux_x86_64.tar.gz cronos_1.5.3-testnet_Linux_x86_64.tar.gz.sha256 && \ + mv ./* /home/cronos/Confirm that the release provides an SHA256 checksum file before implementing this.
📜 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
| # Download and verify tarball | ||
| RUN cd /tmp && wget --no-check-certificate https://github.com/crypto-org-chain/cronos/releases/download/v1.5.3/cronos_1.5.3_Linux_x86_64.tar.gz && tar -xvf cronos_1.5.3_Linux_x86_64.tar.gz \ | ||
| && rm cronos_1.5.3_Linux_x86_64.tar.gz && mv ./* /home/cronos/ | ||
| RUN cd /tmp && wget --no-check-certificate https://github.com/crypto-org-chain/cronos/releases/download/v1.5.1/cronos_1.5.3-testnet_Linux_x86_64.tar.gz && tar -xvf cronos_1.5.3-testnet_Linux_x86_64.tar.gz \ |
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 flag for security.
Disabling certificate validation via --no-check-certificate introduces a man-in-the-middle attack vector, even in a trusted Docker build environment. This is a security best practice violation.
Apply this fix to remove the flag:
-RUN cd /tmp && wget --no-check-certificate https://github.com/crypto-org-chain/cronos/releases/download/v1.5.1/cronos_1.5.3-testnet_Linux_x86_64.tar.gz && tar -xvf cronos_1.5.3-testnet_Linux_x86_64.tar.gz \
+RUN cd /tmp && wget https://github.com/crypto-org-chain/cronos/releases/download/v1.5.1/cronos_1.5.3-testnet_Linux_x86_64.tar.gz && tar -xvf cronos_1.5.3-testnet_Linux_x86_64.tar.gz \If certificate issues persist in your build environment, consider updating the base image (bullseye-slim includes current CA certificates) rather than disabling verification.
📝 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.1/cronos_1.5.3-testnet_Linux_x86_64.tar.gz && tar -xvf cronos_1.5.3-testnet_Linux_x86_64.tar.gz \ | |
| RUN cd /tmp && wget https://github.com/crypto-org-chain/cronos/releases/download/v1.5.1/cronos_1.5.3-testnet_Linux_x86_64.tar.gz && tar -xvf cronos_1.5.3-testnet_Linux_x86_64.tar.gz \ |
🧰 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 line 11, the wget invocation uses the insecure
--no-check-certificate flag; remove that flag from the RUN command and use plain
wget to fetch the tarball, and ensure the image has up-to-date CA certificates
by adding a package install (e.g., apt-get update && apt-get install -y
ca-certificates) earlier in the Dockerfile if necessary so TLS verification
succeeds during build.
| RUN cd /tmp && wget --no-check-certificate https://github.com/crypto-org-chain/cronos/releases/download/v1.5.1/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.
🧩 Analysis chain
Verify release version: PR claims v1.5.3 but URL downloads v1.5.1.
The PR objective states "Cronos testnet image upgrade to v1.5.3", but line 11 downloads from the v1.5.1 release tag. The tarball filename references 1.5.3-testnet, creating ambiguity about which version is actually being deployed. This mismatch between the PR objective and the release tag needs clarification—is v1.5.1 the correct version, or should the URL reference v1.5.3?
Run the following script to verify the release exists and inspect its contents:
🏁 Script executed:
#!/bin/bash
# Description: Verify the v1.5.1 release and check for the expected tarball
# Fetch release metadata
gh api repos/crypto-org-chain/cronos/releases/tags/v1.5.1 --jq '.assets[] | {name, download_count}'
# Check if v1.5.3 release also exists
echo "Checking for v1.5.3 release..."
gh api repos/crypto-org-chain/cronos/releases/tags/v1.5.3 --jq '.assets[] | {name, download_count}' 2>/dev/null || echo "v1.5.3 release not found or not accessible"Length of output: 1697
Fix critical version mismatch: URL downloads v1.5.1 but requests v1.5.3 file that doesn't exist.
Line 11 contains a breaking error: the URL references the v1.5.1 release tag, but attempts to download cronos_1.5.3-testnet_Linux_x86_64.tar.gz. This file does not exist in the v1.5.1 release (which only contains cronos_1.5.1-testnet_* files). The v1.5.3 file exists in the v1.5.3 release. This mismatch will cause the build to fail. Change the download URL from v1.5.1 to v1.5.3 to match the PR objective and the requested filename:
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/
Additionally, remove the --no-check-certificate flag to avoid disabling SSL certificate verification (security risk flagged by Checkov CKV2_DOCKER_3).
🧰 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 URL uses release tag v1.5.1 but
attempts to fetch cronos_1.5.3-testnet_Linux_x86_64.tar.gz (causing a
nonexistent-file build failure); update the download URL to use the v1.5.3
release so the requested filename exists, and remove the --no-check-certificate
flag to avoid disabling SSL verification (ensure the tarball name and URL tag
match exactly and keep the subsequent tar, rm, and mv steps unchanged).
Cronos testnet image upgrade v1.5.3
INFRA-6244 Cronos v1.5.3 Upgrades across clusters
Summary by CodeRabbit