Skip to content
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

Return an error if both license scanning and local/offline scanning is enabled simultaneously #703

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions pkg/osvscanner/osvscanner.go
Original file line number Diff line number Diff line change
Expand Up @@ -706,6 +706,10 @@ func DoScan(actions ScannerActions, r reporter.Reporter) (models.VulnerabilityRe

if actions.CompareLocally {
actions.SkipGit = true

if len(actions.ScanLicensesAllowlist) > 0 || actions.ScanLicensesSummary {
return models.VulnerabilityResults{}, fmt.Errorf("cannot retrieve licenses locally")
}
}

configManager := config.ConfigManager{
Expand Down