Skip to content
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

Dockerfile: mitigate certain supply chain attacks using sha256sums #99

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ynezz
Copy link

@ynezz ynezz commented Jan 6, 2025

Currently, the Dockerfile downloads various tools and SDKs from external sources without verifying their integrity. This poses a potential security risk as the downloaded files could be tampered with during transit or at the source (supply chain attack).

This change introduces SHA256 checksums for all downloaded artifacts and verifies them before installation. This ensures that the files we receive match exactly what we expect, mitigating the risk of supply chain attacks where malicious actors might try to inject compromised versions of these tools.

Currently, the Dockerfile downloads various tools and SDKs from external sources
without verifying their integrity. This poses a potential security risk as the
downloaded files could be tampered with during transit or at the source (supply
chain attack).

This change introduces SHA256 checksums for all downloaded artifacts and
verifies them before installation. This ensures that the files we receive
match exactly what we expect, mitigating the risk of supply chain attacks
where malicious actors might try to inject compromised versions of these
tools.

Signed-off-by: Petr Štetiar <[email protected]>
@puddly
Copy link
Collaborator

puddly commented Jan 6, 2025

Silicon Labs unfortunately doesn't provide stable URLs to their software so the checksums will just constantly change as they release new versions. The checksum for slc-cli is now a231690468273272427ea7c094429d86099d99a2511622d18f6d0b928e23767f.

@ynezz
Copy link
Author

ynezz commented Jan 6, 2025

So there is no way to check the integrity of the tarballs?

@puddly
Copy link
Collaborator

puddly commented Jan 6, 2025

Not without making the Docker container builds fail at some point in the future. All of the https://www.silabs.com/documents/login/software/* URLs point to constantly-updating ZIP releases so the Dockerfile will just stop working when they change it. So if the container needs to be rebuilt, it's possible that the hashes will be out-of-date.

The other URLs, however, are stable.

@ynezz
Copy link
Author

ynezz commented Jan 7, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants