Skip to content
Merged
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
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ RUN mkdir -p /home/cronos/data && mkdir -p /home/cronos/config
RUN apt-get update -y && apt-get install wget curl procps net-tools jq lz4 -y

# Download and verify tarball
RUN cd /tmp && wget --no-check-certificate https://github.com/crypto-org-chain/cronos/releases/download/v1.5.4/cronos_1.5.4-testnet_Linux_x86_64.tar.gz && tar -xvf cronos_1.5.4-testnet_Linux_x86_64.tar.gz \
&& rm cronos_1.5.4-testnet_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.4/cronos_1.5.4_Linux_x86_64.tar.gz && tar -xvf cronos_1.5.4_Linux_x86_64.tar.gz \
&& rm cronos_1.5.4_Linux_x86_64.tar.gz && mv ./* /home/cronos/
Comment on lines +11 to +12
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Remove insecure --no-check-certificate flag from wget.

Disabling certificate validation with --no-check-certificate creates a security vulnerability to man-in-the-middle attacks during the tarball download. Debian bullseye-slim includes up-to-date CA certificates by default.

Apply this diff to remove the insecure flag:

-RUN cd /tmp && wget --no-check-certificate https://github.com/crypto-org-chain/cronos/releases/download/v1.5.4/cronos_1.5.4_Linux_x86_64.tar.gz && tar -xvf cronos_1.5.4_Linux_x86_64.tar.gz \
+RUN cd /tmp && wget https://github.com/crypto-org-chain/cronos/releases/download/v1.5.4/cronos_1.5.4_Linux_x86_64.tar.gz && tar -xvf cronos_1.5.4_Linux_x86_64.tar.gz \
      && rm cronos_1.5.4_Linux_x86_64.tar.gz && mv ./* /home/cronos/

If certificate validation fails, the root cause should be investigated and fixed separately.

📝 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
RUN cd /tmp && wget --no-check-certificate https://github.com/crypto-org-chain/cronos/releases/download/v1.5.4/cronos_1.5.4_Linux_x86_64.tar.gz && tar -xvf cronos_1.5.4_Linux_x86_64.tar.gz \
&& rm cronos_1.5.4_Linux_x86_64.tar.gz && mv ./* /home/cronos/
RUN cd /tmp && wget https://github.com/crypto-org-chain/cronos/releases/download/v1.5.4/cronos_1.5.4_Linux_x86_64.tar.gz && tar -xvf cronos_1.5.4_Linux_x86_64.tar.gz \
&& rm cronos_1.5.4_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, remove the insecure --no-check-certificate
flag from the wget invocation and download the release tarball using normal
certificate-validated HTTPS; ensure the image has ca-certificates installed
(apt-get update && apt-get install -y ca-certificates) before running wget so
TLS validation succeeds, and keep the existing tar, rm and mv steps; if TLS
still fails, investigate/fix the root cause (DNS, proxy, or missing CA) rather
than disabling certificate checks.


# Set permissions
RUN chown -R cronos:cronos /home/cronos && chmod 1777 /tmp
Expand Down