mirror of
https://github.com/aquasecurity/trivy.git
synced 2026-01-31 13:53:14 +08:00
fix(cli): disable --skip-dir and --skip-files flags for sbom command (#8886)
This commit is contained in:
@@ -98,8 +98,6 @@ trivy sbom [flags] SBOM_PATH
|
||||
(default [UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL])
|
||||
--show-suppressed [EXPERIMENTAL] show suppressed vulnerabilities
|
||||
--skip-db-update skip updating vulnerability database
|
||||
--skip-dirs strings specify the directories or glob patterns to skip
|
||||
--skip-files strings specify the files or glob patterns to skip
|
||||
--skip-java-db-update skip updating Java index database
|
||||
--skip-vex-repo-update [EXPERIMENTAL] Skip VEX Repository update
|
||||
--table-mode strings [EXPERIMENTAL] tables that will be displayed in 'table' format (allowed values: summary,detailed) (default [summary,detailed])
|
||||
|
||||
@@ -1169,6 +1169,8 @@ func NewSBOMCommand(globalFlags *flag.GlobalFlagGroup) *cobra.Command {
|
||||
scanFlagGroup := flag.NewScanFlagGroup()
|
||||
scanFlagGroup.Scanners = scanners // allow only 'vuln' and 'license' options for '--scanners'
|
||||
scanFlagGroup.Parallel = nil // disable '--parallel'
|
||||
scanFlagGroup.SkipFiles = nil // disable `--skip-files` since `sbom` command only supports scanning one file.
|
||||
scanFlagGroup.SkipDirs = nil // disable `--skip-dirs` since `sbom` command only supports scanning one file.
|
||||
|
||||
licenseFlagGroup := flag.NewLicenseFlagGroup()
|
||||
// License full-scan and confidence-level are for file content only
|
||||
|
||||
Reference in New Issue
Block a user