-
Notifications
You must be signed in to change notification settings - Fork 2
feat: Cronos mainnet image bump v1.4.11 #84
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]>
WalkthroughSingle Dockerfile refactor: reorders user and directory setup, consolidates package installation flags, changes downloaded Cronos tarball from v1.5.0 testnet to v1.4.11 with a different extraction/move flow, removes SHA256 verification, adjusts chown placement, switches runtime user to root, and retains the same ENTRYPOINT. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 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
📜 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
| RUN cd /tmp && wget --no-check-certificate https://github.com/crypto-org-chain/cronos/releases/download/v1.4.11/cronos_1.4.11_Linux_x86_64.tar.gz && tar -xvf cronos_1.4.11_Linux_x86_64.tar.gz \ | ||
| && rm cronos_1.4.11_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.
Reinstate TLS and checksum verification for the Cronos tarball.
wget --no-check-certificate disables TLS validation and the checksum verification step has been dropped, so we now pipe an unauthenticated binary straight into the image. This is a critical supply-chain regression relative to the previous Dockerfile. Please restore CA verification and the SHA256 (or stronger) digest check before we can ship.
🧰 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, restore TLS and checksum verification for the
Cronos tarball: remove the wget --no-check-certificate usage (use curl -fSL or
wget with default TLS), fetch the official release checksum (or
.sha256/.sha256sum file) from the same GitHub release, verify the downloaded
tarball against the expected SHA256 (e.g., using sha256sum --check or echo
"<expected> file" | sha256sum -c -) and exit/ fail the build if the digest does
not match, then only extract and move the archive; also clean up checksum and
signature files after verification. Ensure commands return non-zero on
verification failure so the image build cannot proceed with an unauthenticated
artifact.
|
|
||
| USER cronos | ||
| WORKDIR /home/cronos | ||
| USER root |
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.
Revert to the non-root runtime user.
Switching the container back to USER root removes the least-privilege protection we previously had. The cronos daemon does not require root inside the container, so this change reintroduces an avoidable security risk. Please keep running as the dedicated cronos user.
🤖 Prompt for AI Agents
In Dockerfile around line 17, the PR changed the runtime user to "root" which
removes least-privilege protection; revert this to the dedicated non-root user
(e.g., USER cronos) and ensure any files or directories the container needs at
runtime are owned by that user and have the correct permissions (chown/chmod
during image build or COPY --chown) so the cronos daemon can run without root
privileges. Ensure the ENTRYPOINT/CMD and any startup scripts are executable by
the cronos user.
Cornos mainnet image bump v1.4.11
https://github.com/crypto-org-chain/cronos/releases/tag/v1.4.11
Summary by CodeRabbit
Chores
Refactor