Skip to content
Open
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
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM debian:stable-slim

RUN apt-get update -y && apt-get install wget curl procps net-tools htop -y
RUN wget --no-check-certificate https://github.com/bnb-chain/bsc/releases/download/v1.5.13/geth_linux && chmod 744 geth_linux && mv geth_linux /usr/local/bin/geth
RUN wget --no-check-certificate https://github.com/bnb-chain/bsc/releases/download/v1.5.16/geth_linux && chmod 744 geth_linux && mv geth_linux /usr/local/bin/geth
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

⚠️ Potential issue

Enable TLS certificate validation for wget
The --no-check-certificate flag disables server certificate verification, leaving the build susceptible to man-in-the-middle attacks. Remove this flag and ensure ca-certificates is installed in an earlier step so that downloads remain secure.

Example patch:

-RUN wget --no-check-certificate https://github.com/bnb-chain/bsc/releases/download/v1.5.16/geth_linux && chmod 744 geth_linux && mv geth_linux /usr/local/bin/geth
+RUN wget https://github.com/bnb-chain/bsc/releases/download/v1.5.16/geth_linux && chmod 744 geth_linux && mv geth_linux /usr/local/bin/geth

Make sure your prior apt-get install includes ca-certificates.

🧰 Tools
🪛 Checkov (3.2.334)

[HIGH] 4-4: Ensure that certificate validation isn't disabled with wget

(CKV2_DOCKER_3)

🤖 Prompt for AI Agents
In Dockerfile at line 4, remove the `--no-check-certificate` flag from the wget
command to enable TLS certificate validation. Before this line, ensure that the
`ca-certificates` package is installed by adding it to the `apt-get install`
command in an earlier step. This will allow wget to verify server certificates
securely during the download.


ENTRYPOINT ["geth"]