-
Notifications
You must be signed in to change notification settings - Fork 2.9k
ci: add Go dependency license check workflow #6334
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
base: master
Are you sure you want to change the base?
Changes from 6 commits
92b37ec
ae199e3
e8c3127
fe1c783
b52a6e8
84dff12
9d1db97
1d2a00d
b831a91
9cb4e75
4d1a3c4
b908ebc
6c20bb9
c7e9960
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| { | ||
| "permissions": { | ||
| "allow": [ | ||
| "Bash(gh pr:*)", | ||
| "Bash(gh api:*)", | ||
| "Bash(git:*)", | ||
| "Bash(gofmt:*)", | ||
| "Bash(sed:*)", | ||
| "Bash(go version:*)", | ||
| "Bash(go build:*)", | ||
| "Bash(go doc:*)", | ||
| "WebFetch(domain:github.com)", | ||
| "Bash(xxd:*)", | ||
| "Bash(python3:*)", | ||
| "Bash(xargs -I{} sh -c \"git show {}:plan/plan.go 2>/dev/null | grep -l \"\"RecordTypeA, endpoint.RecordTypeAAAA, endpoint.RecordTypeCNAME\"\" && echo {}\")", | ||
| "Bash(while read:*)", | ||
| "Bash(do if:*)", | ||
| "Bash(then echo:*)", | ||
| "Bash(go run:*)", | ||
| "Bash(xargs -I{} perl -pi -e 's/\\(?<![\\\\.A-Za-z_]\\)validateEndpoints\\\\\\(/testutils.ValidateEndpoints\\(/g; s/\\(?<![\\\\.A-Za-z_]\\)validateEndpoint\\\\\\(/testutils.ValidateEndpoint\\(/g' {} echo \"done\")", | ||
| "Bash(ls:*)", | ||
| "Bash(go mod:*)", | ||
| "Bash(kwokctl --version)", | ||
| "Bash(go get:*)", | ||
| "Bash(kwokctl get:*)", | ||
| "Bash(kubectl get:*)", | ||
| "Bash(echo \"exit: $?\")", | ||
| "Read(//Users/ik/.kwok/clusters/ext-dns-bench/**)", | ||
| "Read(//Users/ik/.kwok/clusters/ext-dns-bench/logs/**)", | ||
| "Bash(kwokctl delete:*)", | ||
| "Bash(kwokctl create:*)", | ||
| "Bash(kwokctl logs:*)", | ||
| "Bash(kubectl cluster-info:*)", | ||
| "Bash(bash -c 'cd /Users/ik/source/self/workshops/kubernetes-sigs-issues/iac/kwok && go build . 2>&1 | tail -5')", | ||
| "Bash(bash -c 'cd /Users/ik/source/self/workshops/kubernetes-sigs-issues/iac/kwok && go build . 2>&1')", | ||
| "Bash(go list:*)", | ||
| "Bash(go vet:*)", | ||
| "Bash(go tool:*)", | ||
| "WebFetch(domain:patch-diff.githubusercontent.com)", | ||
| "WebFetch(domain:raw.githubusercontent.com)", | ||
| "Bash(~/.gvm/gos/go1.25.8/bin/go test:*)", | ||
| "Bash(make go-lint:*)", | ||
| "Bash(make go-test:*)", | ||
| "Bash(source ~/.gvm/scripts/gvm)", | ||
| "Bash(gvm use:*)", | ||
| "Bash(~/.gvm/gos/go1.25.8/bin/go build:*)", | ||
| "Bash(for f:*)", | ||
| "Bash(do echo:*)", | ||
| "Read(//private/tmp/claude-501/-Users-ik-source-self-go-work-fork-external-dns/a80ddbca-fe31-4b60-8ab8-5515663a14bc/tasks/**)", | ||
| "Bash(done)", | ||
| "Bash(go-licenses report:*)", | ||
| "Bash(license-eye -v debug -c .licenserc.yaml dep check)", | ||
| "Bash(license-eye:*)" | ||
| ] | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| name: License Check | ||
|
|
||
| on: | ||
| pull_request: | ||
| paths: | ||
| - 'go.mod' | ||
| - 'go.sum' | ||
| - 'go.tool.mod' | ||
| - 'go.tool.sum' | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| license-check: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | ||
|
|
||
| # https://github.com/apache/skywalking-eyes | ||
| - name: Check dependency licenses | ||
| uses: apache/skywalking-eyes/dependency@61275cc80d0798a405cb070f7d3a8aaf7cf2c2c1 # v0.8.0 | ||
| with: | ||
| config: .licenserc.yaml | ||
| mode: check | ||
| log: debug | ||
|
ivankatliarchuk marked this conversation as resolved.
Outdated
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| header: | ||
| license: | ||
| # The license scan needs to know the project's own license to run the compatibility matrix. | ||
| spdx-id: Apache-2.0 | ||
|
|
||
| dependency: | ||
| files: | ||
| - go.mod | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Shouldn't there is also the
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I will add go.tool.mod support to the upstream. At the moment it does not support
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| - go.tool.mod | ||
| # MPL-2.0 HashiCorp indirect dependencies — weak-compatible with Apache-2.0 | ||
| # go-cleanhttp, go-retryablehttp: provider/exoscale -> egoscale/v2 -> hashicorp | ||
| # errwrap, go-multierror, go-uuid: provider/rfc2136 -> bodgit/tsig/gss -> hashicorp | ||
| excludes: | ||
| - name: github.com/hashicorp/errwrap | ||
| - name: github.com/hashicorp/go-cleanhttp | ||
| - name: github.com/hashicorp/go-multierror | ||
| - name: github.com/hashicorp/go-retryablehttp | ||
| - name: github.com/hashicorp/go-uuid | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. without this
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. AFAIR, MPL & Apache 2.0 licenses are not “incompatible”. See here for instance. MPL requires adding a third-party file referencing the author of the deps that is used.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm just making things visible. Here is the rule https://github.com/apache/skywalking-eyes/blob/main/assets/compatibility/Apache-2.0.yaml This is an official apache project - it could have bugs, is not that I've decided ;-) Explanation, there is weak compatibility. so I manually excluded them from check.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think weak compatibility is treated as incompatible and require manual exclusions.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think the tool capture correctly weak compability On the same page https://licensecheck.io/licenses
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🤔 Wdyt of using
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Moved to -w. I kinda don't think this is the right approach. Better to make it visible but really no difference. As long is green is fine.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Then please revert and keep the explicit list. I do not have a strong opinion on that.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I spend some time. You are correct. If we exclude, this will not catch licence change. So lets keep -w |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| module sigs.k8s.io/external-dns | ||
|
|
||
| // test | ||
| go 1.26.1 | ||
|
|
||
| require ( | ||
|
|
||



Uh oh!
There was an error while loading. Please reload this page.