-
Notifications
You must be signed in to change notification settings - Fork 504
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
🐛 Handle pinning by Docker URLs for GitHub actions workflows #2594
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #2594 +/- ##
==========================================
+ Coverage 40.40% 40.45% +0.05%
==========================================
Files 122 122
Lines 9908 9917 +9
==========================================
+ Hits 4003 4012 +9
Misses 5624 5624
Partials 281 281 |
Integration tests success for |
5e8d3b6
to
c83f69d
Compare
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.
Long regexes can get tricky. Would it be simpler to use the current one but add a fall back or an ?
group for the cases that start with @sha256:
?
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.
LGTM with some additional tests and length verification to the right size.
Thanks!
Thanks for the review, I'll revisit/simplify the regex and add some tests. |
Signed-off-by: Raghav Kaul <raghavkaul@google.com>
6d0ea60
to
af1504c
Compare
Integration tests success for |
Integration tests success for |
Integration tests success for |
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.
Looks good thanks
Integration tests success for |
Signed-off-by: Raghav Kaul <raghavkaul@google.com> Signed-off-by: Raghav Kaul <raghavkaul@google.com> Co-authored-by: laurentsimon <64505099+laurentsimon@users.noreply.github.com>
Signed-off-by: Raghav Kaul <raghavkaul@google.com> Signed-off-by: Raghav Kaul <raghavkaul@google.com> Co-authored-by: laurentsimon <64505099+laurentsimon@users.noreply.github.com> Signed-off-by: Shofiya2003 <shofiyabootwala@gmail.com>
Signed-off-by: Raghav Kaul <raghavkaul@google.com> Signed-off-by: Raghav Kaul <raghavkaul@google.com> Co-authored-by: laurentsimon <64505099+laurentsimon@users.noreply.github.com> Signed-off-by: Shofiya2003 <shofiyabootwala@gmail.com>
Signed-off-by: Raghav Kaul <raghavkaul@google.com> Signed-off-by: Raghav Kaul <raghavkaul@google.com> Co-authored-by: laurentsimon <64505099+laurentsimon@users.noreply.github.com>
What kind of change does this PR introduce?
Handle Docker/other container registry URLs for GitHub actions workflows.
[jobs.<job_id>.steps[*].uses](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsuses)
in GitHub actions can take GitHub repos, docker containers, and local filepaths. This change supports repos and containers but not local filepaths.What is the current behavior?
Only public action pinning was detected.
What is the new behavior (if this is a feature change)?**
Handle Docker image pinning. Stricter regex.
Which issue(s) this PR fixes
Fixes #2580.
Does this PR introduce a user-facing change?