Skip to content

Commit 1f2e91b

Browse files
authored
fix(sbom): add options for DBs in private registries (#7660)
Signed-off-by: knqyf263 <[email protected]>
1 parent 55b5a7e commit 1f2e91b

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

docs/docs/references/configuration/cli/trivy_sbom.md

+3
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,14 @@ trivy sbom [flags] SBOM_PATH
4747
--offline-scan do not issue API requests to identify dependencies
4848
-o, --output string output file name
4949
--output-plugin-arg string [EXPERIMENTAL] output plugin arguments
50+
--password strings password. Comma-separated passwords allowed. TRIVY_PASSWORD should be used for security reasons.
5051
--pkg-relationships strings list of package relationships (unknown,root,direct,indirect) (default [unknown,root,direct,indirect])
5152
--pkg-types strings list of package types (os,library) (default [os,library])
5253
--redis-ca string redis ca file location, if using redis as cache backend
5354
--redis-cert string redis certificate file location, if using redis as cache backend
5455
--redis-key string redis key file location, if using redis as cache backend
5556
--redis-tls enable redis TLS with public certificates, if using redis as cache backend
57+
--registry-token string registry token
5658
--rekor-url string [EXPERIMENTAL] address of rekor STL server (default "https://rekor.sigstore.dev")
5759
--sbom-sources strings [EXPERIMENTAL] try to retrieve SBOM from the specified sources (oci,rekor)
5860
--scanners strings comma-separated list of what security issues to detect (vuln,license) (default [vuln])
@@ -67,6 +69,7 @@ trivy sbom [flags] SBOM_PATH
6769
-t, --template string output template
6870
--token string for authentication in client/server mode
6971
--token-header string specify a header name for token in client/server mode (default "Trivy-Token")
72+
--username strings username. Comma-separated usernames allowed.
7073
--vex strings [EXPERIMENTAL] VEX sources ("repo", "oci" or file path)
7174
```
7275

pkg/commands/app.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -1143,7 +1143,8 @@ func NewSBOMCommand(globalFlags *flag.GlobalFlagGroup) *cobra.Command {
11431143
CacheFlagGroup: flag.NewCacheFlagGroup(),
11441144
DBFlagGroup: flag.NewDBFlagGroup(),
11451145
PackageFlagGroup: flag.NewPackageFlagGroup(),
1146-
RemoteFlagGroup: flag.NewClientFlags(), // for client/server mode
1146+
RemoteFlagGroup: flag.NewClientFlags(), // for client/server mode
1147+
RegistryFlagGroup: flag.NewRegistryFlagGroup(), // for DBs in private registries
11471148
ReportFlagGroup: reportFlagGroup,
11481149
ScanFlagGroup: scanFlagGroup,
11491150
VulnerabilityFlagGroup: flag.NewVulnerabilityFlagGroup(),

0 commit comments

Comments
 (0)