-
Notifications
You must be signed in to change notification settings - Fork 600
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
Reject pull requests that change imported licenses #3996
Conversation
df009c0
to
7a3ee69
Compare
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. |
c7e4383
to
a19c89a
Compare
We import dependencies that use a handful of open-source licenses. We want to be intentional about any change to these licenses, so this automation flags pull requests that do so. Go modules are immutable, so checking during pull requests and pushes should suffice. Issue: PGO-1556
77802e6
to
5b11d1f
Compare
Here's what it looks like when a license is not in the configured list: https://github.com/CrunchyData/postgres-operator/actions/runs/10914660621/job/30293145553?pr=3996 |
# | ||
# https://aquasecurity.github.io/trivy/latest/docs/scanner/license/ | ||
license: | ||
ignored: |
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.
So right now we're telling Trivy to ignore these licenses; if another license shows up that's not in this list, we'll get an alert because the job is configured with --exit-code=1
: any license at any level -- Forbidden
, Restricted
, Unencumbered
, et al. -- will alert if it is not ignored, right?
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.
Right. Every license that Trivy recognizes has a severity, and this job alerts on all severities.
We'll also be alerted if Trivy can't detect the license. Those get a severity of UNKNOWN
.
We import dependencies that use a handful of open-source licenses. We want to be intentional about any change to these licenses, so this automation flags pull requests that do so.
Go modules are immutable, so checking during pull requests and pushes should suffice.
Checklist:
Type of Changes:
Other Information:
Issue: PGO-1556