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
--license-full eagerly look for licenses in source code headers and license files
81
81
--list-all-pkgs output all packages in the JSON report regardless of vulnerability
82
+
--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
82
83
--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])
83
84
--module-dir string specify directory to the wasm modules that will be loaded (default "$HOME/.trivy/modules")
Use the `--max-image-size` flag to avoid scanning images that exceed a specified size. The size is specified in a human-readable format (e.g., `100MB`, `10GB`). If the compressed image size exceeds the specified threshold, an error is returned immediately. Otherwise, all layers are pulled, stored in a temporary folder, and their uncompressed size is verified before scanning. Temporary layers are always cleaned up, even after a successful scan.
524
+
525
+
!!! warning "EXPERIMENTAL"
526
+
This feature might change without preserving backwards compatibility.
527
+
528
+
529
+
Example Usage:
530
+
```bash
531
+
# Limit uncompressed image size to 10GB
532
+
$ trivy image --max-image-size=10GB myapp:latest
533
+
```
534
+
535
+
Error Output:
536
+
```bash
537
+
Error: uncompressed image size (15GB) exceeds maximum allowed size (10GB)
0 commit comments