-
Notifications
You must be signed in to change notification settings - Fork 125
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
Update workflow policy to scan all branches for dangerous workflows #569 #622
base: main
Are you sure you want to change the base?
Conversation
all branches. Signed-off-by: Samuel Erb <serb@google.com>
Signed-off-by: Samuel Erb <serb@google.com>
Signed-off-by: Samuel Erb <serb@google.com>
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
@raghavkaul can you review as well? Thanks. |
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.
Thanks for this push, looks good with minor feedback.
if err != nil { | ||
return "", nil, err | ||
} | ||
return dir, repo, nil | ||
} | ||
|
||
// Function Close will close the scorecard clients. This cleans up the | ||
// downloaded tarball. | ||
func Close(fullRepo string) { |
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.
@jeffmendoza do we need to defer
this func somewhere?
Msg(msg) | ||
return &policydef.Result{ | ||
Enabled: enabled, | ||
Pass: true, |
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.
Pass: true, | |
Pass: false, |
Msg(msg) | ||
return &policydef.Result{ | ||
Enabled: enabled, | ||
Pass: true, |
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.
Pass: true, | |
Pass: false, |
Msg(msg) | ||
return &policydef.Result{ | ||
Enabled: enabled, | ||
Pass: true, |
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.
Pass: true, | |
Pass: false, |
This PR addresses #569 and introduces 2 changes:
Tested locally using https://github.com/serb-google/allstar, with a branch
insecure_test
which contains a fake unsafe workflow rule. Verified this triggered the alert which included outputVulnerable Branch: refs/remotes/origin/insecure_test
.This is my first contribution to this repo, please review carefully :)