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
We recently added an alias for the --scanners option in #5558. While the alias works as expected when used with a CLI flag, it does not function properly when set through environment variables or configuration files.
CLI flag
Using the CLI flag --scanners, the alias works correctly:
$ trivy fs --scanners config .
2023-12-18T21:08:49.136+0400 WARN '--scanner config' is deprecated. Use '--scanner misconfig' instead. See https://github.com/aquasecurity/trivy/discussions/5586 for the detail.
2023-12-18T21:08:49.145+0400 INFO Misconfiguration scanning is enabled
Environment Variable
However, when setting the scanners through an environment variable, the aliases are not recognized:
$ TRIVY_SCANNERS=config trivy fs .
2023-12-18T21:09:06.379+0400 INFO To collect the license information of packages in "pkg/fanal/analyzer/language/nodejs/npm/testdata/no-node_modules/package-lock.json", "npm install" needs to be performed beforehand
It is crucial for the alias to be consistently recognized across all methods of setting it (CLI flags, environment variables, and configuration files) for a seamless user experience. Any assistance in resolving this inconsistency would be greatly appreciated.
The text was updated successfully, but these errors were encountered:
Description
We recently added an alias for the --scanners option in #5558. While the alias works as expected when used with a CLI flag, it does not function properly when set through environment variables or configuration files.
CLI flag
Using the CLI flag
--scanners
, the alias works correctly:Environment Variable
However, when setting the scanners through an environment variable, the aliases are not recognized:
The text was updated successfully, but these errors were encountered: