Files
cheatsheet-tldr/tldr/grype
2026-03-07 00:26:46 +00:00

42 lines
973 B
Plaintext

---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# grype
> Vulnerability scanner for container images and filesystems.
> More information: <https://oss.anchore.com/docs/reference/grype/cli>.
- Scan a container image:
`grype {{image:tag}}`
- Scan an image and display results in a specific format:
`grype {{image:tag}} {{[-o|--output]}} {{json|table|cyclonedx|cyclonedx-json|sarif|template}}`
- Scan an image, ignoring unfixed vulnerabilities:
`grype {{image:tag}} --only-fixed`
- Scan an image and fail on vulnerabilities with a severity at or above the given level:
`grype {{image:tag}} {{[-f|--fail-on]}} {{negligible|low|medium|high|critical}}`
- Scan a local directory and save the report to a file:
`grype {{path/to/directory}} --file {{path/to/report}}`
- Update the vulnerability database:
`grype db update`
- Display the current database status:
`grype db status`
- Display help:
`grype {{[-h|--help]}}`