You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
CI: improve the OSV scanner to reduce the maintenance burden #4945
Recursive scan is only done for vulnerabilities scan. For license scan only root go.mod is scanned since we don't care about licenses of dev packages.
I wonder if we also need recursive vulnerabilities scan. I added it back then to prevent supply chain attacks, but on the other the scan also fails because of CVEs like this one which is only relevant for packages that are compiled with the released binary, not for packages used in dev / CI/CD.
Regarding the maintenance effort - we can omit the version field in PackageOverrides sections with the risk of package relicensing on version upgrade.
package relicensing can occur both on minor release(i.e. terraform) or major release(i.e. grafana).
Currently call analysis doesn't work so there are many false positives in vulnerability scan since we use a newer go version than the one installed in osv-scanner-action image. One of osv-scanner maintainers [GitHub Action] Call analysis doesn't work for go projects with go version > 1.22.8 google/osv-scanner#1453 (comment) that it's a good idea to support running osv-scanner on host, thus allowing the consumer to pre-install its desired go version. Once it's supported we will have no false positives which will make the maintenance easier.
The issue in deps.dev has been resolved. The current license violation state:
All of the violations(except github.com/go-sql-driver/mysql which has CNCF exception) are related to tool dependencies(github.com/golangci/golangci-lint/v2 and github.com/norwoodj/helm-docs).
The problem is that osv-scanner can't tell if a given indirect dependency is related to a tool.
I suggest to create a separate go.mod for tools - e.g. tools/go.mod. Then we can run the tools with go tool -modfile=tools/go.mod.
This approach will also help to avoid cases like (2) here. @zhaohuabing WDYT?
Activity
zhaohuabing commentedon Dec 18, 2024
@shahar-h Let's continue the discussion here.
shahar-h commentedon Dec 24, 2024
See google/deps.dev#147
shahar-h commentedon Aug 12, 2025
The issue in deps.dev has been resolved. The current license violation state:
All of the violations(except
github.com/go-sql-driver/mysqlwhich has CNCF exception) are related to tool dependencies(github.com/golangci/golangci-lint/v2andgithub.com/norwoodj/helm-docs).The problem is that
osv-scannercan't tell if a given indirect dependency is related to a tool.I suggest to create a separate
go.modfor tools - e.g.tools/go.mod. Then we can run the tools withgo tool -modfile=tools/go.mod.This approach will also help to avoid cases like (2) here.
@zhaohuabing WDYT?
shahar-h commentedon Aug 12, 2025
CC @zirain
zirain commentedon Aug 12, 2025
sounds good
shahar-h commentedon Aug 20, 2025
See #6824.
Will open a followup PR to cleanup osv-scanner license scan config, add exclusions if needed and make it blocking again.