Open naveensrinivasan opened 3 years ago
https://twitter.com/peter_szilagyi/status/1437646118700175360
A recent supply chain attack.
I am working on a PR for this.
This is definitely something we should fix! Even though this is currently only used for integration tests, other users of the repo might rely on this script so we should make it safer to use.
https://github.com/lightningnetwork/lnd/blob/777abe5ff00707fbce0c58a4536cffebd055db25/scripts/install_bitcoind.sh#L5
The
ruimarinho/bitcoin-core:0.20.1
is pinned by atag
. Tags can be moved and are also susceptible for supply chain attacks. It is recommended to pin bysha
More information on https://github.com/ossf/scorecard/blob/main/docs/checks.md#pinned-dependencies
For example, the above can be pinned by SHA using something like https://github.com/google/go-containerregistry/blob/main/cmd/crane/doc/crane_digest.md
Here is an example of using the SHA instead of tag https://github.com/ossf/scorecard/blob/4c4fb61d5106e39988dce8c277a8575d939a83e7/cron/worker/Dockerfile#L15