@actions/artifact checks the expected hash against the response but not the file on the disk
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 5.9k
- Forks
- 1.8k
- PR merge metrics
- No merged PRs in 30d
Description
Thank you 🙇♀ for wanting to create an issue in this repository. Before you do, please ensure you are filing the issue in the right place. Issues should only be opened on if the issue relates to code in this repository.
- If you have found a security issue please submit it here
- If you have questions about writing workflows or action files, then please visit the GitHub Community Forum's Actions Board
- If you are having an issue or question about GitHub Actions then please contact customer support
If your issue is relevant to this repository, please include the information below:
Describe the bug
We had a transient issue which meant that a file was only partially downloaded.
This code succedded, where I think it whould have failed.
It looks like you check the expected digest against the response but you don't check it against the file on the disk.
You print the digest fo the file on the disk.
To Reproduce
sorry i don't know how you could reproduce this realiably.
Expected behavior
I would expect the expectedDigest to be checked agaisnt the extractResponse.sha256Digest AND the "SHA256 digest of downloaded artifact"
Screenshots
This screen shot shows the list of artifacts and includes the expected digest
This screen shot shows the "successes" which don't include a matching hashset
On other runs of this the action the hashsets match
Desktop (please complete the following information):
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
Smartphone (please complete the following information):
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
Additional context
Add any other context about the problem here.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in the @actions/artifact download and verification flow, following how extractResponse.sha256Digest and the expectedDigest are compared and where the downloaded file's SHA256 digest is reported. Reproduce or add coverage for a partially downloaded artifact, then ensure the expected digest is checked against both the response and the file on disk.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github-actions, typescript
- Domain
- devops
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100