actions / actions/toolkit

@actions/artifact checks the expected hash against the response but not the file on the disk

Open
#2,180 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
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 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
Image

This screen shot shows the "successes" which don't include a matching hashset
Image

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.