fix: Add missing version check flags (#8951)

Signed-off-by: Owen Rumney <owen.rumney@aquasec.com>
This commit is contained in:
Owen Rumney
2025-06-02 08:45:34 +01:00
committed by GitHub
parent 48258a701a
commit ef5f8de8da
2 changed files with 9 additions and 4 deletions

View File

@@ -18,6 +18,7 @@ trivy config [flags] DIR
--config-check strings specify the paths to the Rego check files or to the directories containing them, applying config files
--config-data strings specify paths from which data for the Rego checks will be recursively loaded
--config-file-schemas strings specify paths to JSON configuration file schemas to determine that a file matches some configuration and pass the schema to Rego checks for type checking
--disable-telemetry disable sending anonymous usage data to Aqua
--enable-modules strings [EXPERIMENTAL] module names to enable
--exit-code int specify exit code when any security issues are found
--file-patterns strings specify config file patterns
@@ -70,6 +71,7 @@ trivy config [flags] DIR
--skip-check-update skip fetching rego check updates
--skip-dirs strings specify the directories or glob patterns to skip
--skip-files strings specify the files or glob patterns to skip
--skip-version-check suppress notices about version updates and Trivy announcements
--table-mode strings [EXPERIMENTAL] tables that will be displayed in 'table' format (allowed values: summary,detailed) (default [summary,detailed])
-t, --template string output template
--tf-exclude-downloaded-modules exclude misconfigurations for downloaded terraform modules

View File

@@ -687,10 +687,13 @@ func NewServerCommand(globalFlags *flag.GlobalFlagGroup) *cobra.Command {
func NewConfigCommand(globalFlags *flag.GlobalFlagGroup) *cobra.Command {
scanFlags := &flag.ScanFlagGroup{
// Enable only '--skip-dirs' and '--skip-files' and disable other flags
SkipDirs: flag.SkipDirsFlag.Clone(),
SkipFiles: flag.SkipFilesFlag.Clone(),
FilePatterns: flag.FilePatternsFlag.Clone(),
// Enable only '--skip-dirs', '--skip-files', `--skip-version-check`
// and `--disable-telemetry`, disable other scan flags
SkipDirs: flag.SkipDirsFlag.Clone(),
SkipFiles: flag.SkipFilesFlag.Clone(),
FilePatterns: flag.FilePatternsFlag.Clone(),
SkipVersionCheck: flag.SkipVersionCheckFlag.Clone(),
DisableTelemetry: flag.DisableTelemetryFlag.Clone(),
}
reportFlagGroup := flag.NewReportFlagGroup()