Skip to content

Commit 7b663d8

Browse files
authored
feat(cli): change --list-all-pkgs default to true (#9510)
1 parent 404abb3 commit 7b663d8

23 files changed

+38
-28
lines changed

docs/docs/configuration/reporting.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -617,19 +617,15 @@ For more details, please check [here](../plugin/user-guide.md#output-mode-suppor
617617
To generate multiple reports, you can generate the JSON report first and convert it to other formats with the `convert` subcommand.
618618

619619
```shell
620-
$ trivy image --format json -o result.json --list-all-pkgs debian:11
620+
$ trivy image --format json -o result.json debian:11
621621
$ trivy convert --format cyclonedx --output result.cdx result.json
622622
```
623623

624-
!!! note
625-
Please note that if you want to convert to a format that requires a list of packages,
626-
such as SBOM, you need to add the `--list-all-pkgs` flag when outputting in JSON.
627-
628624
[Filtering options](./filtering.md) such as `--severity` are also available with `convert`.
629625

630626
```shell
631627
# Output all severities in JSON
632-
$ trivy image --format json -o result.json --list-all-pkgs debian:11
628+
$ trivy image --format json -o result.json debian:11
633629

634630
# Output only critical issues in table format
635631
$ trivy convert --format table --severity CRITICAL result.json

docs/docs/references/configuration/cli/trivy_convert.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ trivy convert [flags] RESULT_JSON
1010

1111
```
1212
# report conversion
13-
$ trivy image --format json --output result.json --list-all-pkgs debian:11
13+
$ trivy image --format json --output result.json debian:11
1414
$ trivy convert --format cyclonedx --output result.cdx result.json
1515
1616
```
@@ -37,7 +37,7 @@ trivy convert [flags] RESULT_JSON
3737
-h, --help help for convert
3838
--ignore-policy string specify the Rego file path to evaluate each vulnerability
3939
--ignorefile string specify .trivyignore file (default ".trivyignore")
40-
--list-all-pkgs output all packages in the JSON report regardless of vulnerability
40+
--list-all-pkgs output all packages in the JSON report regardless of vulnerability (default true)
4141
-o, --output string output file name
4242
--output-plugin-arg string [EXPERIMENTAL] output plugin arguments
4343
--report string specify a report format for the output (allowed values: all,summary) (default "all")

docs/docs/references/configuration/cli/trivy_filesystem.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ trivy filesystem [flags] PATH
8181
--java-db-repository strings OCI repository(ies) to retrieve trivy-java-db in order of priority (default [mirror.gcr.io/aquasec/trivy-java-db:1,ghcr.io/aquasecurity/trivy-java-db:1])
8282
--license-confidence-level float specify license classifier's confidence level (default 0.9)
8383
--license-full eagerly look for licenses in source code headers and license files
84-
--list-all-pkgs output all packages in the JSON report regardless of vulnerability
84+
--list-all-pkgs output all packages in the JSON report regardless of vulnerability (default true)
8585
--misconfig-scanners strings comma-separated list of misconfig scanners to use for misconfiguration scanning (default [azure-arm,cloudformation,dockerfile,helm,kubernetes,terraform,terraformplan-json,terraformplan-snapshot])
8686
--module-dir string specify directory to the wasm modules that will be loaded (default "$HOME/.trivy/modules")
8787
--no-progress suppress progress bar

docs/docs/references/configuration/cli/trivy_image.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ trivy image [flags] IMAGE_NAME
9999
--java-db-repository strings OCI repository(ies) to retrieve trivy-java-db in order of priority (default [mirror.gcr.io/aquasec/trivy-java-db:1,ghcr.io/aquasecurity/trivy-java-db:1])
100100
--license-confidence-level float specify license classifier's confidence level (default 0.9)
101101
--license-full eagerly look for licenses in source code headers and license files
102-
--list-all-pkgs output all packages in the JSON report regardless of vulnerability
102+
--list-all-pkgs output all packages in the JSON report regardless of vulnerability (default true)
103103
--max-image-size string [EXPERIMENTAL] maximum image size to process, specified in a human-readable format (e.g., '44kB', '17MB'); an error will be returned if the image exceeds this size
104104
--misconfig-scanners strings comma-separated list of misconfig scanners to use for misconfiguration scanning (default [azure-arm,cloudformation,dockerfile,helm,kubernetes,terraform,terraformplan-json,terraformplan-snapshot])
105105
--module-dir string specify directory to the wasm modules that will be loaded (default "$HOME/.trivy/modules")

docs/docs/references/configuration/cli/trivy_kubernetes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ trivy kubernetes [flags] [CONTEXT]
9191
--java-db-repository strings OCI repository(ies) to retrieve trivy-java-db in order of priority (default [mirror.gcr.io/aquasec/trivy-java-db:1,ghcr.io/aquasecurity/trivy-java-db:1])
9292
--k8s-version string specify k8s version to validate outdated api by it (example: 1.21.0)
9393
--kubeconfig string specify the kubeconfig file path to use
94-
--list-all-pkgs output all packages in the JSON report regardless of vulnerability
94+
--list-all-pkgs output all packages in the JSON report regardless of vulnerability (default true)
9595
--misconfig-scanners strings comma-separated list of misconfig scanners to use for misconfiguration scanning (default [azure-arm,cloudformation,dockerfile,helm,kubernetes,terraform,terraformplan-json,terraformplan-snapshot])
9696
--no-progress suppress progress bar
9797
--node-collector-imageref string indicate the image reference for the node-collector scan job (default "ghcr.io/aquasecurity/node-collector:0.3.1")

docs/docs/references/configuration/cli/trivy_repository.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ trivy repository [flags] (REPO_PATH | REPO_URL)
8080
--java-db-repository strings OCI repository(ies) to retrieve trivy-java-db in order of priority (default [mirror.gcr.io/aquasec/trivy-java-db:1,ghcr.io/aquasecurity/trivy-java-db:1])
8181
--license-confidence-level float specify license classifier's confidence level (default 0.9)
8282
--license-full eagerly look for licenses in source code headers and license files
83-
--list-all-pkgs output all packages in the JSON report regardless of vulnerability
83+
--list-all-pkgs output all packages in the JSON report regardless of vulnerability (default true)
8484
--misconfig-scanners strings comma-separated list of misconfig scanners to use for misconfiguration scanning (default [azure-arm,cloudformation,dockerfile,helm,kubernetes,terraform,terraformplan-json,terraformplan-snapshot])
8585
--module-dir string specify directory to the wasm modules that will be loaded (default "$HOME/.trivy/modules")
8686
--no-progress suppress progress bar

docs/docs/references/configuration/cli/trivy_rootfs.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ trivy rootfs [flags] ROOTDIR
8383
--java-db-repository strings OCI repository(ies) to retrieve trivy-java-db in order of priority (default [mirror.gcr.io/aquasec/trivy-java-db:1,ghcr.io/aquasecurity/trivy-java-db:1])
8484
--license-confidence-level float specify license classifier's confidence level (default 0.9)
8585
--license-full eagerly look for licenses in source code headers and license files
86-
--list-all-pkgs output all packages in the JSON report regardless of vulnerability
86+
--list-all-pkgs output all packages in the JSON report regardless of vulnerability (default true)
8787
--misconfig-scanners strings comma-separated list of misconfig scanners to use for misconfiguration scanning (default [azure-arm,cloudformation,dockerfile,helm,kubernetes,terraform,terraformplan-json,terraformplan-snapshot])
8888
--module-dir string specify directory to the wasm modules that will be loaded (default "$HOME/.trivy/modules")
8989
--no-progress suppress progress bar

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ trivy sbom [flags] SBOM_PATH
6464
--ignored-licenses strings specify a list of license to ignore
6565
--ignorefile string specify .trivyignore file (default ".trivyignore")
6666
--java-db-repository strings OCI repository(ies) to retrieve trivy-java-db in order of priority (default [mirror.gcr.io/aquasec/trivy-java-db:1,ghcr.io/aquasecurity/trivy-java-db:1])
67-
--list-all-pkgs output all packages in the JSON report regardless of vulnerability
67+
--list-all-pkgs output all packages in the JSON report regardless of vulnerability (default true)
6868
--no-progress suppress progress bar
6969
--offline-scan do not issue API requests to identify dependencies
7070
-o, --output string output file name

docs/docs/references/configuration/cli/trivy_vm.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ trivy vm [flags] VM_IMAGE
7575
--ignorefile string specify .trivyignore file (default ".trivyignore")
7676
--include-non-failures include successes, available with '--scanners misconfig'
7777
--java-db-repository strings OCI repository(ies) to retrieve trivy-java-db in order of priority (default [mirror.gcr.io/aquasec/trivy-java-db:1,ghcr.io/aquasecurity/trivy-java-db:1])
78-
--list-all-pkgs output all packages in the JSON report regardless of vulnerability
78+
--list-all-pkgs output all packages in the JSON report regardless of vulnerability (default true)
7979
--misconfig-scanners strings comma-separated list of misconfig scanners to use for misconfiguration scanning (default [azure-arm,cloudformation,dockerfile,helm,kubernetes,terraform,terraformplan-json,terraformplan-snapshot])
8080
--module-dir string specify directory to the wasm modules that will be loaded (default "$HOME/.trivy/modules")
8181
--no-progress suppress progress bar

docs/docs/references/configuration/config-file.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,7 @@ ignore-policy: ""
530530
ignorefile: ".trivyignore"
531531

532532
# Same as '--list-all-pkgs'
533-
list-all-pkgs: false
533+
list-all-pkgs: true
534534

535535
# Same as '--output'
536536
output: ""

0 commit comments

Comments
 (0)