-
-
Notifications
You must be signed in to change notification settings - Fork 237
Open
Labels
Description
The selections file only contains version numbers. However, a malicious library author could repoint a tag to a different version, wreaking havoc amongst users.
For example:
- I add a new dependency on foo 1.0 to dub.json.
- I run a DUB command that causes the dependency to be downloaded, and dub.selections.json to be created.
- The library author includes malware in a new commit, and changes the 1.0 tag to this new commit.
- I clear the DUB cache and run the DUB command again, which will again download the dependency.
- I now have different code than I had before.
By verifying the checksum as part of the second download, this issue is mitigated: the library user needs to audit the dependency only the first time they download it.
Zardoz89, ljmf00 and nordlow