-
Notifications
You must be signed in to change notification settings - Fork 380
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
Github action #420
Github action #420
Conversation
Signed-off-by: Rex P <[email protected]>
Signed-off-by: Rex P <[email protected]>
This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation. |
4902ea8
to
1f921d3
Compare
|
.github/workflows/osv-scanner.yml
Outdated
results-file: results.sarif | ||
to-scan: |- | ||
./ | ||
./cmd/osv-scanner/fixtures/locks-many/ |
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.
is the second arg still necessary if we're doing recursive scans?
# The branches below must be a subset of the branches above | ||
branches: [ main ] | ||
merge_group: | ||
branches: [ main ] |
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.
Should we make this a reusable workflow to let users easily use this? https://github.blog/2022-02-10-using-reusable-workflows-github-actions/
Disclaimer: I haven't looked too deeply into this. There's also composite actions which is something different.
This PR features:
action.yaml
and it's specialized dockerfileaction.dockerfile
. This docker image runs a bash script wrapping osv-scanner, first by preprocessing the input so the last argument will be split by new line, allowing the workflow user to pass in multiple directories/files they wish to scan. The script also changes exit codes 127 and 128 to 0 as they contain errors that the user can't really do anything about.Example of what workflow sarif output looks like:
