-
Notifications
You must be signed in to change notification settings - Fork 566
🐛 do not include asName when creating digest of FROM name as asName #4683
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: Adam Korczynski <[email protected]>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4683 +/- ##
==========================================
+ Coverage 66.80% 67.88% +1.07%
==========================================
Files 230 249 +19
Lines 16602 19081 +2479
==========================================
+ Hits 11091 12953 +1862
- Misses 4808 5268 +460
- Partials 703 860 +157 🚀 New features to boost your workflow:
|
This pull request has been marked stale because it has been open for 10 days with no activity |
Please reopen |
This pull request has been marked stale because it has been open for 10 days with no activity |
This pull request has been marked stale because it has been open for 10 days with no activity |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/scdiff generate Pinned-Dependencies
/scdiff generate Pinned-Dependencies |
What kind of change does this PR introduce?
(Is it a bug fix, feature, docs update, something else?)
bug fix
What is the current behavior?
When calculating the digest in remediation, Scorecard would do that from
python:3.7:build
when the line wasFROM python:3.7 as build
. This would lead to issues such as #2906.We are creating the digest on the following lines:
scorecard/remediation/remediations.go
Lines 105 to 113 in f96f4f4
From the PR, it should be clear that
d.PinnedAt
is assigned the wrong value; it gets assignedasPointer(asName)
which is the root cause of the bug.digester.Digest(name)
throws an error like:parsing reference "python:3.7:build": could not parse reference: python:3.7:build
because of this.What is the new behavior (if this is a feature change)?**
With this change, we create the digest from
python:3.7
in the same line as above.Which issue(s) this PR fixes
Fixes #2906
Special notes for your reviewer
Does this PR introduce a user-facing change?
NONE