>> <i>The only commands that will change the go.mod (and therefore the build) are go get and go mod tidy. These commands are not expected to be run automatically or in CI, so changes to dependency trees must be made deliberately and have the opportunity to go through code review.</i><p>GO doesn't do jack shit to mitigate supply chain attacks. Version pinning with checksum and that is it. But what could go do? Solve supply chain attacks as a language feature? That doesn't even make sense.<p>Application developers using Go must prevent supply chain attacks against their applications. So go get some SAST for your pipeline.<p>Sure there is truth in saying: always verify your dependencies (and their dependencies) yourself with a code review on every update. But you should not do that alone, so let's talk about collaborative vulnerability management. <i>(there is more to sast than vulnerability assessment, but we have to start somewhere)</i><p>Let's say repositories that publishe go modules should also publish a curated list of known vulnerabilities <i>(including known supply chain attacks)</i> for the modules they publish. This curation is work: reports must be verified before being included in the list and they must be verified quickly. This work scales with the number of packages published. And worse, modules could be published in more than one repository, module publishing repositories can be different from the modules source code repository, and vulnerability lists can exist independent from these repositories - so reports should be synced between different list providers. Different implementations and lack of common standards make this a hard problem. And implicit trust for bulk imports could open the door for takedown attacks.<p>There is an argument that vulnerability listing should be split from source and module publishing: each focusing on their core responsibility. For supply chain attacks this split in responsibilities also makes it harder for an attacker to both attack suppliers and suppress reports. But for all other issues it increase distance as reports must travel upstream. And it creates perverse incentives, like trying to keep reports exclusive to paying customers.<p>To pile on the insanity: reports can be wrong. And there are unfixed CVEs that are many years old <i>(well ok maybe not for go... yet)</i>. Downstream there are "mitigated" and "wont-fix" classifications for reports about dependencies and many SAST tooling can't parse that for transitive dependencies.<p>Really, supply chain attacks are the easy case in vulnerability management, because they are so obviously a "must-fix" when detected. <i>(and to please the never update crowd: for a downstream project "fix" can mean not updating a dependency into an attacked version. you are welcome)</i><p>Long story short: go get some SAST in your pipelines to defend against supply chain attacks. Don't pretend pinning the version and half-assing a code review when you update them is actually solving supply chain attacks. Don't tell me everyone who uses go can find a sophisticated data bomb or intentional rce in some transitive dependency of some lib they update to a new feature release. And don't give me some "well if its transitive then the lib dev should have." Should have doesn't solve shit.<p>Examples for Vulnerability Assessment in GO dependency graphs are GitLabs Gemnasium ( <a href="https://gitlab.com/gitlab-org/security-products/gemnasium-db/-/tree/master/go" rel="nofollow">https://gitlab.com/gitlab-org/security-products/gemnasium-db...</a> ) or GitHubs Dependabot ( <a href="https://github.com/advisories?query=type%3Areviewed+ecosystem%3Ago" rel="nofollow">https://github.com/advisories?query=type%3Areviewed+ecosyste...</a> ) among many, many others. Not recommendations, just examples!<p>Tools like these help you sort out supply chain attacks that other people have already found, before you update into them and push them downstream. Collaboration is useful. Sure you are still left with reading the source changes of all dependency update, because who knows, you may be the first one to spot one, but hey, good for you.