aws-amplify / aws-amplify/amplify-cli
Verify integrity of downloaded amplify-cli binaries
- Dominant language
- TypeScript
- Stars
- 2.9k
- Forks
- 825
- Avg merge
- 11d 23h
- Merged PRs (30d)
- 2
Description
### Is this feature request related to a new or existing Amplify category?
No
### Is this related to another service?
No
### Describe the feature you'd like to request
Hey,
My name is Maciej Mensfeld and I do supply chain security research at WhiteSource.
I've noticed, that this library downloads external binaries and uses them. While it's a totally common pattern, what is lacking here is integrity verification.
This is described as [CWE-494](https://cwe.mitre.org/data/definitions/494.html).
You could verify the integrity of the downloaded file before using it by comparing the file hash to a hardcoded, expected file hash.
This is essentially what package managers do to verify the integrity of downloaded packages.
Doing this would prevent attack scenarios in which the binaries downloaded [here](https://my.diffend.io/npm/@aws-amplify/cli/7.6.26/7.6.27-alpha.11/page/2#d2h-399933-1420) are manipulated.
If the verification happens elsewhere sorry in advance and I would love it if you could point me to the location, so I can tune up my scanning engine.
Have a great day :)
### Describe the solution you'd like
I would like to see, that the downloaded binaries are checksummed and that their integrity is verified.
### Describe alternatives you've considered
The only alternative I know of, is not doing anything but that poses a security risk.
### Additional context
N/A
### Is this something that you'd be interested in working on?
- [ ] 👋 I may be able to implement this feature request
### Would this feature include a breaking change?
- [ ] ⚠️ This feature might incur a breaking change
Contributor guide
Research direction
Start by tracing the binary download path referenced in the linked package diff and identify where downloaded files are used. Define how expected checksums are sourced and maintained, then verify each binary before use and add coverage for altered or mismatched downloads.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- cli, security
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100