https://github.com/anchore/grype

A vulnerability scanner for container images and filesystems

https://github.com/anchore/grype

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (9.6%) to scientific vocabulary

Keywords

container-image containers cyclonedx docker go golang hacktoberfest oci openvex security static-analysis tool vex vulnerabilities vulnerability

Keywords from Contributors

embeddings distributed orchestration system packaging docker-compose mesh devops-tools uml-diagram vector-database
Last synced: 5 months ago · JSON representation

Repository

A vulnerability scanner for container images and filesystems

Basic Info
  • Host: GitHub
  • Owner: anchore
  • License: apache-2.0
  • Language: Go
  • Default Branch: main
  • Homepage:
  • Size: 7.88 MB
Statistics
  • Stars: 10,577
  • Watchers: 80
  • Forks: 682
  • Open Issues: 332
  • Releases: 0
Topics
container-image containers cyclonedx docker go golang hacktoberfest oci openvex security static-analysis tool vex vulnerabilities vulnerability
Created over 5 years ago · Last pushed 6 months ago
Metadata Files
Readme Contributing License Code of conduct Security

README.md

Grype logo

 Static Analysis + Unit + Integration   Validations   Go Report Card   GitHub release   GitHub go.mod Go version 
 License: Apache-2.0   Join our Discourse   Follow on Mastodon   OpenSSF Scorecard   OpenSSF Best Practices 

A vulnerability scanner for container images and filesystems. Easily [install the binary](#installation) to try it out. Works with [Syft](https://github.com/anchore/syft), the powerful SBOM (software bill of materials) tool for container images and filesystems. ### Join our community meetings! - Calendar: https://calendar.google.com/calendar/u/0/r?cid=Y182OTM4dGt0MjRtajI0NnNzOThiaGtnM29qNEBncm91cC5jYWxlbmRhci5nb29nbGUuY29t - Agenda: https://docs.google.com/document/d/1ZtSAa6fj2a6KRWviTn3WoJm09edvrNUp4Iz_dOjjyY8/edit?usp=sharing (join [this group](https://groups.google.com/g/anchore-oss-community) for write access) - All are welcome! For commercial support options with Syft or Grype, please [contact Anchore](https://get.anchore.com/contact/). ![grype-demo](https://user-images.githubusercontent.com/590471/90276236-9868f300-de31-11ea-8068-4268b6b68529.gif) ## Features - Scan the contents of a container image or filesystem to find known vulnerabilities. - Find vulnerabilities for major operating system packages: - Alpine - Amazon Linux - Azure Linux (previously CBL-Mariner) - BusyBox - CentOS - Debian - Echo - Distroless - MinimOS - Oracle Linux - Red Hat (RHEL) - Ubuntu - Wolfi - Find vulnerabilities for language-specific packages: - Ruby (Gems) - Java (JAR, WAR, EAR, JPI, HPI) - JavaScript (NPM, Yarn) - Python (Egg, Wheel, Poetry, requirements.txt/setup.py files) - Dotnet (deps.json) - Golang (go.mod) - PHP (Composer) - Rust (Cargo) - Supports Docker, OCI and [Singularity](https://github.com/sylabs/singularity) image formats. - [OpenVEX](https://github.com/openvex) support for filtering and augmenting scanning results. If you encounter an issue, please [let us know using the issue tracker](https://github.com/anchore/grype/issues). ## Installation ### Recommended ```bash curl -sSfL https://get.anchore.io/grype | sudo sh -s -- -b /usr/local/bin ``` Install script options: - `-b`: Specify a custom installation directory (defaults to `./bin`) - `-d`: More verbose logging levels (`-d` for debug, `-dd` for trace) - `-v`: Verify the signature of the downloaded artifact before installation (requires [`cosign`](https://github.com/sigstore/cosign) to be installed) ### Chocolatey The chocolatey distribution of grype is community-maintained and not distributed by the anchore team. ```bash choco install grype -y ``` ### Homebrew ```bash brew tap anchore/grype brew install grype ``` ### MacPorts On macOS, Grype can additionally be installed from the [community-maintained port](https://ports.macports.org/port/grype/) via MacPorts: ```bash sudo port install grype ``` **Note**: Currently, Grype is built only for macOS and Linux. ### From source See [DEVELOPING.md](DEVELOPING.md#native-development) for instructions to build and run from source. ### GitHub Actions If you're using GitHub Actions, you can use our [Grype-based action](https://github.com/marketplace/actions/anchore-container-scan) to run vulnerability scans on your code or container images during your CI workflows. ## Verifying the artifacts Checksums are applied to all artifacts, and the resulting checksum file is signed using cosign. You need the following tool to verify signature: - [Cosign](https://docs.sigstore.dev/cosign/system_config/installation/) Verification steps are as follow: 1. Download the files you want, and the checksums.txt, checksums.txt.pem and checksums.txt.sig files from the [releases](https://github.com/anchore/grype/releases) page: 2. Verify the signature: ```shell cosign verify-blob \ --certificate \ --signature \ --certificate-identity-regexp 'https://github\.com/anchore/grype/\.github/workflows/.+' \ --certificate-oidc-issuer "https://token.actions.githubusercontent.com" ``` 3. Once the signature is confirmed as valid, you can proceed to validate that the SHA256 sums align with the downloaded artifact: ```shell sha256sum --ignore-missing -c checksums.txt ``` ## Getting started [Install the binary](#installation), and make sure that `grype` is available in your path. To scan for vulnerabilities in an image: ``` grype ``` The above command scans for vulnerabilities visible in the container (i.e., the squashed representation of the image). To include software from all image layers in the vulnerability scan, regardless of its presence in the final image, provide `--scope all-layers`: ``` grype --scope all-layers ``` To run grype from a Docker container so it can scan a running container, use the following command: ```yml docker run --rm \ --volume /var/run/docker.sock:/var/run/docker.sock \ --name Grype anchore/grype:latest \ $(ImageName):$(ImageTag) ``` ## Supported sources Grype can scan a variety of sources beyond those found in Docker. ``` # scan a container image archive (from the result of `docker image save ...`, `podman save ...`, or `skopeo copy` commands) grype path/to/image.tar # scan a Singularity Image Format (SIF) container grype path/to/image.sif # scan a directory grype dir:path/to/dir ``` Sources can be explicitly provided with a scheme: ``` podman:yourrepo/yourimage:tag use images from the Podman daemon docker:yourrepo/yourimage:tag use images from the Docker daemon docker-archive:path/to/yourimage.tar use a tarball from disk for archives created from "docker save" oci-archive:path/to/yourimage.tar use a tarball from disk for OCI archives (from Skopeo or otherwise) oci-dir:path/to/yourimage read directly from a path on disk for OCI layout directories (from Skopeo or otherwise) singularity:path/to/yourimage.sif read directly from a Singularity Image Format (SIF) container on disk dir:path/to/yourproject read directly from a path on disk (any directory) file:path/to/yourfile read directly from a file on disk sbom:path/to/syft.json read Syft JSON from path on disk registry:yourrepo/yourimage:tag pull image directly from a registry (no container runtime required) ``` If an image source is not provided and cannot be detected from the given reference it is assumed the image should be pulled from the Docker daemon. If docker is not present, then the Podman daemon is attempted next, followed by reaching out directly to the image registry last. This default behavior can be overridden with the `default-image-pull-source` configuration option (See [Configuration](https://github.com/anchore/grype#configuration) for more details). Use SBOMs for even faster vulnerability scanning in Grype: ``` # Then scan for new vulnerabilities as frequently as needed grype sbom:./sbom.json # (You can also pipe the SBOM into Grype) cat ./sbom.json | grype ``` Grype supports input of [Syft](https://github.com/anchore/syft), [SPDX](https://spdx.dev/), and [CycloneDX](https://cyclonedx.org/) SBOM formats. If Syft has generated any of these file types, they should have the appropriate information to work properly with Grype. It is also possible to use SBOMs generated by other tools with varying degrees of success. Two things that make Grype matching more successful are the inclusion of CPE and Linux distribution information. If an SBOM does not include any CPE information, it is possible to generate these based on package information using the `--add-cpes-if-none` flag. To specify a distribution, use the `--distro :` flag. A full example is: ``` grype --add-cpes-if-none --distro alpine:3.10 sbom:some-alpine-3.10.spdx.json ``` ## Threat & Risk Prioritization This section explains the columns and UI cues that help prioritize remediation efforts: - **Severity**: String severity based on CVSS scores and indicate the significance of a vulnerability in levels. This balances concerns such as ease of exploitability, and the potential to affect confidentiality, integrity, and availability of software and services. - **EPSS**: [Exploit Prediction Scoring System](https://www.first.org/epss/model) is a metric expressing the likelihood that a vulnerability will be exploited in the wild over the next 30 days (on a 0–1 scale); higher values signal a greater likelihood of exploitation. The table output shows the EPSS percentile, a one-way transform of the EPSS score showing the proportion of all scored vulnerabilities with an equal or lower probability. Percentiles linearize a heavily skewed distribution, making threshold choice (e.g. “only CVEs above the 90th percentile”) straightforward. - **KEV Indicator**: Flags entries from CISA’s [Known Exploited Vulnerabilities Catalog](https://www.cisa.gov/known-exploited-vulnerabilities-catalog) --an authoritative list of flaws observed being exploited in the wild. - **Risk Score**: A composite 0–100 metric calculated as: ```markdown risk = min(1, threat * average(severity)) * 100 ``` Where: - `severity` is the average of all CVSS scores and string severity for a vulnerability (scaled between 0–1). - `threat` is the EPSS score (between 0–1). If the vulnerability is on the KEV list then `threat` is `1.05`, or `1.1` if the vulnerability is associated with a ransomware campaign. This metric is one way to combine EPSS and CVSS suggested in the [EPSS user guide](https://www.first.org/epss/user-guide). - **Suggested Fixes**: All possible fixes for a package are listed, however, when multiple fixes are available, we de-emphasize all upgrade paths except for the minimal upgrade path (which highlights the smallest, safest version bump). Results default to sorting by Risk Score and can be overridden with `--sort-by `: - `severity`: sort by severity - `epss`: sort by EPSS percentile (aka, "threat") - `risk`: sort by risk score - `kev`: just like risk, except that KEV entries are always above non-KEV entries - `package`: sort by package name, version, type - `vulnerability`: sort by vulnerability ID ### Supported versions Software updates are always applied to the latest version of Grype; fixes are not backported to any previous versions of Grype. In terms of database updates, any version of Grype before v0.51.0 (Oct 2022, before schema v5) will not receive vulnerability database updates. You can still build vulnerability databases for unsupported Grype releases by using previous releases of [vunnel](https://github.com/anchore/vunnel) to gather the upstream data and [grype-db](https://github.com/anchore/grype-db) to build databases for unsupported schemas. Only the latest database schema is considered to be supported. When a new database schema is introduced then the one it replaces is marked as deprecated. Deprecated schemas will continue to receive updates for at least one year after they are marked as deprecated at which point they will no longer be supported. ### Working with attestations Grype supports scanning SBOMs as input via stdin. Users can use [cosign](https://github.com/sigstore/cosign) to verify attestations with an SBOM as its content to scan an image for vulnerabilities: ``` COSIGN_EXPERIMENTAL=1 cosign verify-attestation caphill4/java-spdx-tools:latest \ | jq -r .payload \ | base64 --decode \ | jq -r .predicate.Data \ | grype ``` ### Vulnerability Summary #### Basic Grype Vulnerability Data Shape ```json { "vulnerability": { ... }, "relatedVulnerabilities": [ ... ], "matchDetails": [ ... ], "artifact": { ... } } ``` - **Vulnerability**: All information on the specific vulnerability that was directly matched on (e.g. ID, severity, CVSS score, fix information, links for more information) - **RelatedVulnerabilities**: Information pertaining to vulnerabilities found to be related to the main reported vulnerability. Maybe the vulnerability we matched on was a GitHub Security Advisory, which has an upstream CVE (in the authoritative national vulnerability database). In these cases we list the upstream vulnerabilities here. - **MatchDetails**: This section tries to explain what we searched for while looking for a match and exactly what details on the package and vulnerability that lead to a match. - **Artifact**: This is a subset of the information that we know about the package (when compared to the [Syft](https://github.com/anchore/syft) json output, we summarize the metadata section). This has information about where within the container image or directory we found the package, what kind of package it is, licensing info, pURLs, CPEs, etc. ### Excluding file paths Grype can exclude files and paths from being scanned within a source by using glob expressions with one or more `--exclude` parameters: ``` grype --exclude './out/**/*.json' --exclude /etc ``` **Note:** in the case of _image scanning_, since the entire filesystem is scanned it is possible to use absolute paths like `/etc` or `/usr/**/*.txt` whereas _directory scans_ exclude files _relative to the specified directory_. For example: scanning `/usr/foo` with `--exclude ./package.json` would exclude `/usr/foo/package.json` and `--exclude '**/package.json'` would exclude all `package.json` files under `/usr/foo`. For _directory scans_, it is required to begin path expressions with `./`, `*/`, or `**/`, all of which will be resolved _relative to the specified scan directory_. Keep in mind, your shell may attempt to expand wildcards, so put those parameters in single quotes, like: `'**/*.json'`. ### External Sources Grype can be configured to incorporate external data sources for added fidelity in vulnerability matching. This feature is currently disabled by default. To enable this feature add the following to the grype config: ```yaml external-sources: enable: true maven: search-upstream-by-sha1: true base-url: https://search.maven.org/solrsearch/select rate-limit: 300ms # Time between Maven API requests ``` You can also configure the base-url if you're using another registry as your maven endpoint. The rate at which Maven API requests are made can be configured to match your environment's requirements. The default is 300ms between requests. ### Output formats The output format for Grype is configurable as well: ``` grype -o ``` Where the formats available are: - `table`: A columnar summary (default). - `cyclonedx`: An XML report conforming to the [CycloneDX 1.6 specification](https://cyclonedx.org/specification/overview/). - `cyclonedx-json`: A JSON report conforming to the [CycloneDX 1.6 specification](https://cyclonedx.org/specification/overview/). - `json`: Use this to get as much information out of Grype as possible! - `sarif`: Use this option to get a [SARIF](https://docs.oasis-open.org/sarif/sarif/v2.1.0/sarif-v2.1.0.html) report (Static Analysis Results Interchange Format) - `template`: Lets the user specify the output format. See ["Using templates"](#using-templates) below. ### Using templates Grype lets you define custom output formats, using [Go templates](https://golang.org/pkg/text/template/). Here's how it works: - Define your format as a Go template, and save this template as a file. - Set the output format to "template" (`-o template`). - Specify the path to the template file (`-t ./path/to/custom.template`). - Grype's template processing uses the same data models as the `json` output format — so if you're wondering what data is available as you author a template, you can use the output from `grype -o json` as a reference. **Please note:** Templates can access information about the system they are running on, such as environment variables. You should never run untrusted templates. There are several example templates in the [templates](https://github.com/anchore/grype/tree/main/templates) directory in the Grype source which can serve as a starting point for a custom output format. For example, [csv.tmpl](https://github.com/anchore/grype/blob/main/templates/csv.tmpl) produces a vulnerability report in CSV (comma separated value) format: ```text "Package","Version Installed","Vulnerability ID","Severity" "coreutils","8.30-3ubuntu2","CVE-2016-2781","Low" "libc-bin","2.31-0ubuntu9","CVE-2016-10228","Negligible" "libc-bin","2.31-0ubuntu9","CVE-2020-6096","Low" ... ``` You can also find the template for the default "table" output format in the same place. Grype also includes a vast array of utility templating functions from [sprig](http://masterminds.github.io/sprig/) apart from the default golang [text/template](https://pkg.go.dev/text/template#hdr-Functions) to allow users to customize the output from Grype. ### Gating on severity of vulnerabilities You can have Grype exit with an error if any vulnerabilities are reported at or above the specified severity level. This comes in handy when using Grype within a script or CI pipeline. To do this, use the `--fail-on ` CLI flag. For example, here's how you could trigger a CI pipeline failure if any vulnerabilities are found in the `ubuntu:latest` image with a severity of "medium" or higher: ``` grype ubuntu:latest --fail-on medium ``` **Note:** Grype returns exit code `2` on vulnerability errors. ### Specifying matches to ignore If you're seeing Grype report **false positives** or any other vulnerability matches that you just don't want to see, you can tell Grype to **ignore** matches by specifying one or more _"ignore rules"_ in your Grype configuration file (e.g. `~/.grype.yaml`). This causes Grype not to report any vulnerability matches that meet the criteria specified by any of your ignore rules. Each rule can specify any combination of the following criteria: - vulnerability ID (e.g. `"CVE-2008-4318"`) - namespace (e.g. `"nvd"`) - fix state (allowed values: `"fixed"`, `"not-fixed"`, `"wont-fix"`, or `"unknown"`) - package name (e.g. `"libcurl"`) - package version (e.g. `"1.5.1"`) - package language (e.g. `"python"`; these values are defined [here](https://github.com/anchore/syft/blob/main/syft/pkg/language.go#L14-L23)) - package type (e.g. `"npm"`; these values are defined [here](https://github.com/anchore/syft/blob/main/syft/pkg/type.go#L10-L24)) - package location (e.g. `"/usr/local/lib/node_modules/**"`; supports glob patterns) Here's an example `~/.grype.yaml` that demonstrates the expected format for ignore rules: ```yaml ignore: # This is the full set of supported rule fields: - vulnerability: CVE-2008-4318 fix-state: unknown # VEX fields apply when Grype reads vex data: vex-status: not_affected vex-justification: vulnerable_code_not_present package: name: libcurl version: 1.5.1 type: npm location: "/usr/local/lib/node_modules/**" # We can make rules to match just by vulnerability ID: - vulnerability: CVE-2014-54321 # ...or just by a single package field: - package: type: gem ``` Vulnerability matches will be ignored if **any** rules apply to the match. A rule is considered to apply to a given vulnerability match only if **all** fields specified in the rule apply to the vulnerability match. When you run Grype while specifying ignore rules, the following happens to the vulnerability matches that are "ignored": - Ignored matches are **completely hidden** from Grype's output, except for when using the `json` or `template` output formats; however, in these two formats, the ignored matches are **removed** from the existing `matches` array field, and they are placed in a new `ignoredMatches` array field. Each listed ignored match also has an additional field, `appliedIgnoreRules`, which is an array of any rules that caused Grype to ignore this vulnerability match. - Ignored matches **do not** factor into Grype's exit status decision when using `--fail-on `. For instance, if a user specifies `--fail-on critical`, and all of the vulnerability matches found with a "critical" severity have been _ignored_, Grype will exit zero. **Note:** Please continue to **[report](https://github.com/anchore/grype/issues/new/choose)** any false positives you see! Even if you can reliably filter out false positives using ignore rules, it's very helpful to the Grype community if we have as much knowledge about Grype's false positives as possible. This helps us continuously improve Grype! ### Showing only "fixed" vulnerabilities If you only want Grype to report vulnerabilities **that have a confirmed fix**, you can use the `--only-fixed` flag. (This automatically adds [ignore rules](#specifying-matches-to-ignore) into Grype's configuration, such that vulnerabilities that aren't fixed will be ignored.) For example, here's a scan of Alpine 3.10: ``` NAME INSTALLED FIXED-IN VULNERABILITY SEVERITY apk-tools 2.10.6-r0 2.10.7-r0 CVE-2021-36159 Critical libcrypto1.1 1.1.1k-r0 CVE-2021-3711 Critical libcrypto1.1 1.1.1k-r0 CVE-2021-3712 High libssl1.1 1.1.1k-r0 CVE-2021-3712 High libssl1.1 1.1.1k-r0 CVE-2021-3711 Critical ``` ...and here's the same scan, but adding the flag `--only-fixed`: ``` NAME INSTALLED FIXED-IN VULNERABILITY SEVERITY apk-tools 2.10.6-r0 2.10.7-r0 CVE-2021-36159 Critical ``` If you want Grype to only report vulnerabilities **that do not have a confirmed fix**, you can use the `--only-notfixed` flag. Alternatively, you can use the `--ignore-states` flag to filter results for vulnerabilities with specific states such as `wont-fix` (see `--help` for a list of valid fix states). These flags automatically add [ignore rules](#specifying-matches-to-ignore) into Grype's configuration, such that vulnerabilities which are fixed, or will not be fixed, will be ignored. ## VEX Support Grype can use VEX (Vulnerability Exploitability Exchange) data to filter false positives or provide additional context, augmenting matches. When scanning a container image, you can use the `--vex` flag to point to one or more [OpenVEX](https://github.com/openvex) documents. VEX statements relate a product (a container image), a vulnerability, and a VEX status to express an assertion of the vulnerability's impact. There are four [VEX statuses](https://github.com/openvex/spec/blob/main/OPENVEX-SPEC.md#status-labels): `not_affected`, `affected`, `fixed` and `under_investigation`. Here is an example of a simple OpenVEX document. (tip: use [`vexctl`](https://github.com/openvex/vexctl) to generate your own documents). ```json { "@context": "https://openvex.dev/ns/v0.2.0", "@id": "https://openvex.dev/docs/public/vex-d4e9020b6d0d26f131d535e055902dd6ccf3e2088bce3079a8cd3588a4b14c78", "author": "A Grype User ", "timestamp": "2023-07-17T18:28:47.696004345-06:00", "version": 1, "statements": [ { "vulnerability": { "name": "CVE-2023-1255" }, "products": [ { "@id": "pkg:oci/alpine@sha256%3A124c7d2707904eea7431fffe91522a01e5a861a624ee31d03372cc1d138a3126", "subcomponents": [ { "@id": "pkg:apk/alpine/libssl3@3.0.8-r3" }, { "@id": "pkg:apk/alpine/libcrypto3@3.0.8-r3" } ] } ], "status": "fixed" } ] } ``` By default, Grype will use any statements in specified VEX documents with a status of `not_affected` or `fixed` to move matches to the ignore set. Any matches ignored as a result of VEX statements are flagged when using `--show-suppressed`: ``` libcrypto3 3.0.8-r3 3.0.8-r4 apk CVE-2023-1255 Medium (suppressed by VEX) ``` Statements with an `affected` or `under_investigation` status will only be considered to augment the result set when specifically requested using the `GRYPE_VEX_ADD` environment variable or in a configuration file. ### VEX Ignore Rules Ignore rules can be written to control how Grype honors VEX statements. For example, to configure Grype to only act on VEX statements when the justification is `vulnerable_code_not_present`, you can write a rule like this: ```yaml --- ignore: - vex-status: not_affected vex-justification: vulnerable_code_not_present ``` See the [list of justifications](https://github.com/openvex/spec/blob/main/OPENVEX-SPEC.md#status-justifications) for details. You can mix `vex-status` and `vex-justification` with other ignore rule parameters. ## Grype's database When Grype performs a scan for vulnerabilities, it does so using a vulnerability database that's stored on your local filesystem, which is constructed by pulling data from a variety of publicly available vulnerability data sources. These sources include: - Alpine Linux SecDB: https://secdb.alpinelinux.org/ - Amazon Linux ALAS: https://alas.aws.amazon.com/AL2/alas.rss - Chainguard SecDB: https://packages.cgr.dev/chainguard/security.json - Debian Linux CVE Tracker: https://security-tracker.debian.org/tracker/data/json - Echo Security Advisories: https://advisory.echohq.com/data.json - GitHub Security Advisories (GHSAs): https://github.com/advisories - MinimOS SecDB: https://packages.mini.dev/advisories/secdb/security.json - National Vulnerability Database (NVD): https://nvd.nist.gov/vuln/data-feeds - Oracle Linux OVAL: https://linux.oracle.com/security/oval/ - RedHat Linux Security Data: https://access.redhat.com/hydra/rest/securitydata/ - RedHat RHSAs: https://www.redhat.com/security/data/oval/ - SUSE Linux OVAL: https://ftp.suse.com/pub/projects/security/oval/ - Ubuntu Linux Security: https://people.canonical.com/~ubuntu-security/ - Wolfi SecDB: https://packages.wolfi.dev/os/security.json By default, Grype automatically manages this database for you. Grype checks for new updates to the vulnerability database to make sure that every scan uses up-to-date vulnerability information. This behavior is configurable. For more information, see the [Managing Grype's database](#managing-grypes-database) section. ### How database updates work Grype's vulnerability database is a SQLite file, named `vulnerability.db`. Updates to the database are atomic: the entire database is replaced and then treated as "readonly" by Grype. Grype's first step in a database update is discovering databases that are available for retrieval. Grype does this by requesting a "latest database file" from a public endpoint: https://grype.anchore.io/databases/v6/latest.json The latest database file contains an entry for the most recent database available for download. Here's an example of an entry in the latest database file: ```json { "status": "active", "schemaVersion": "6.0.0", "built": "2025-02-11T04:06:41Z", "path": "vulnerability-db_v6.0.0_2025-02-11T01:30:51Z_1739246801.tar.zst", "checksum": "sha256:79bfa04265c5a32d21773ad0da1bda13c31e932fa1e1422db635c8d714038868" } ``` With this information, Grype can find the most recently built database with the current schema version, download the database, and verify the database's integrity using the `checksum` value. ### Managing Grype's database > **Note:** During normal usage, _there is no need for users to manage Grype's database!_ Grype manages its database behind the scenes. However, for users that need more control, Grype provides options to manage the database more explicitly. #### Local database cache directory By default, the database is cached on the local filesystem in the directory `$XDG_CACHE_HOME/grype/db//`. For example, on macOS, the database would be stored in `~/Library/Caches/grype/db/6/`. (For more information on XDG paths, refer to the [XDG Base Directory Specification](https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html).) You can set the cache directory path using the environment variable `GRYPE_DB_CACHE_DIR`. If setting that variable alone does not work, then the `TMPDIR` environment variable might also need to be set. #### Data staleness Grype needs up-to-date vulnerability information to provide accurate matches. By default, it will fail execution if the local database was not built in the last 5 days. The data staleness check is configurable via the environment variable `GRYPE_DB_MAX_ALLOWED_BUILT_AGE` and `GRYPE_DB_VALIDATE_AGE` or the field `max-allowed-built-age` and `validate-age`, under `db`. It uses [golang's time duration syntax](https://pkg.go.dev/time#ParseDuration). Set `GRYPE_DB_VALIDATE_AGE` or `validate-age` to `false` to disable staleness check. #### Offline and air-gapped environments By default, Grype checks for a new database on every run, by making a network request over the internet. You can tell Grype not to perform this check by setting the environment variable `GRYPE_DB_AUTO_UPDATE` to `false`. As long as you place Grype's `vulnerability.db` and `import.json` files in the cache directory for the expected schema version, Grype has no need to access the network. Additionally, you can get a reference to the latest database archive for download from the `grype db list` command in an online environment, download the database archive, transfer it to your offline environment, and use `grype db import ` to use the given database in an offline capacity. If you would like to distribute your own Grype databases internally without needing to use `db import` manually you can leverage Grype's DB update mechanism. To do this you can craft your own `latest.json` file similar to the public "latest database file" and change the download URL to point to an internal endpoint (e.g. a private S3 bucket, an internal file server, etc.). Any internal installation of Grype can receive database updates automatically by configuring the `db.update-url` (same as the `GRYPE_DB_UPDATE_URL` environment variable) to point to the hosted `latest.json` file you've crafted. #### CLI commands for database management Grype provides database-specific CLI commands for users that want to control the database from the command line. Here are some of the useful commands provided: `grype db status` — report the current status of Grype's database (such as its location, build date, and checksum) `grype db check` — see if updates are available for the database `grype db update` — ensure the latest database has been downloaded to the cache directory (Grype performs this operation at the beginning of every scan by default) `grype db list` — download the latest database file configured at `db.update-url` and show the database available for download `grype db import` — provide grype with a database archive to explicitly use (useful for offline DB updates) `grype db providers` - provides a detailed list of database providers Find complete information on Grype's database commands by running `grype db --help`. ## Shell completion Grype supplies shell completion through its CLI implementation ([cobra](https://github.com/spf13/cobra/blob/master/shell_completions.md)). Generate the completion code for your shell by running one of the following commands: - `grype completion ` - `go run ./cmd/grype completion ` This will output a shell script to STDOUT, which can then be used as a completion script for Grype. Running one of the above commands with the `-h` or `--help` flags will provide instructions on how to do that for your chosen shell. ## Private Registry Authentication ### Local Docker Credentials When a container runtime is not present, grype can still utilize credentials configured in common credential sources (such as `~/.docker/config.json`). It will pull images from private registries using these credentials. The config file is where your credentials are stored when authenticating with private registries via some command like `docker login`. For more information see the `go-containerregistry` [documentation](https://github.com/google/go-containerregistry/tree/main/pkg/authn). An example `config.json` looks something like this: ``` // config.json { "auths": { "registry.example.com": { "username": "AzureDiamond", "password": "hunter2" } } } ``` You can run the following command as an example. It details the mount/environment configuration a container needs to access a private registry: `docker run -v ./config.json:/config/config.json -e "DOCKER_CONFIG=/config" anchore/grype:latest ` ### Docker Credentials in Kubernetes The below section shows a simple workflow on how to mount this config file as a secret into a container on kubernetes. 1. Create a secret. The value of `config.json` is important. It refers to the specification detailed [here](https://github.com/google/go-containerregistry/tree/main/pkg/authn#the-config-file). Below this section is the `secret.yaml` file that the pod configuration will consume as a volume. The key `config.json` is important. It will end up being the name of the file when mounted into the pod. ``` # secret.yaml apiVersion: v1 kind: Secret metadata: name: registry-config namespace: grype data: config.json: ``` `kubectl apply -f secret.yaml` 2. Create your pod running grype. The env `DOCKER_CONFIG` is important because it advertises where to look for the credential file. In the below example, setting `DOCKER_CONFIG=/config` informs grype that credentials can be found at `/config/config.json`. This is why we used `config.json` as the key for our secret. When mounted into containers the secrets' key is used as the filename. The `volumeMounts` section mounts our secret to `/config`. The `volumes` section names our volume and leverages the secret we created in step one. ``` # pod.yaml apiVersion: v1 kind: Pod spec: containers: - image: anchore/grype:latest name: grype-private-registry-demo env: - name: DOCKER_CONFIG value: /config volumeMounts: - mountPath: /config name: registry-config readOnly: true args: - volumes: - name: registry-config secret: secretName: registry-config ``` `kubectl apply -f pod.yaml` 3. The user can now run `kubectl logs grype-private-registry-demo`. The logs should show the grype analysis for the `` provided in the pod configuration. Using the above information, users should be able to configure private registry access without having to do so in the `grype` or `syft` configuration files. They will also not be dependent on a docker daemon, (or some other runtime software) for registry configuration and access. ## Configuration Default configuration search paths (see all with `grype config locations`): - `.grype.yaml` - `.grype/config.yaml` - `~/.grype.yaml` - `/grype/config.yaml` Use `grype config` to print a sample config file to stdout. Use `grype config --load` to print the current config after loading all values to stdout. You can specify files directly using the `--config` / `-c` flags (or environment variable `GRYPE_CONFIG`) to provide your own configuration files/paths: ```shell # Using the flag grype -c /path/to/config.yaml # Or using the environment variable GRYPE_CONFIG=/path/to/config.yaml grype ``` Configuration options (example values are the default): ```yaml # the output format of the vulnerability report (options: table, template, json, cyclonedx) # when using template as the output type, you must also provide a value for 'output-template-file' (env: GRYPE_OUTPUT) output: 'table' # if using template output, you must provide a path to a Go template file # see https://github.com/anchore/grype#using-templates for more information on template output # the default path to the template file is the current working directory # output-template-file: .grype/html.tmpl # # write output report to a file (default is to write to stdout) (env: GRYPE_FILE) file: '' # pretty-print JSON output (env: GRYPE_PRETTY) pretty: false # distro to match against in the format: : (env: GRYPE_DISTRO) distro: '' # generate CPEs for packages with no CPE data (env: GRYPE_ADD_CPES_IF_NONE) add-cpes-if-none: false # specify the path to a Go template file (requires 'template' output to be selected) (env: GRYPE_OUTPUT_TEMPLATE_FILE) output-template-file: '' # enable/disable checking for application updates on startup (env: GRYPE_CHECK_FOR_APP_UPDATE) check-for-app-update: true # ignore matches for vulnerabilities that are not fixed (env: GRYPE_ONLY_FIXED) only-fixed: false # ignore matches for vulnerabilities that are fixed (env: GRYPE_ONLY_NOTFIXED) only-notfixed: false # ignore matches for vulnerabilities with specified comma separated fix states, options=[fixed not-fixed unknown wont-fix] (env: GRYPE_IGNORE_WONTFIX) ignore-wontfix: '' # an optional platform specifier for container image sources (e.g. 'linux/arm64', 'linux/arm64/v8', 'arm64', 'linux') (env: GRYPE_PLATFORM) platform: '' # upon scanning, if a severity is found at or above the given severity then the return code will be 1 # default is unset which will skip this validation (options: negligible, low, medium, high, critical) (env: GRYPE_FAIL_ON_SEVERITY) fail-on-severity: '' # show suppressed/ignored vulnerabilities in the output (only supported with table output format) (env: GRYPE_SHOW_SUPPRESSED) show-suppressed: false # orient results by CVE instead of the original vulnerability ID when possible (env: GRYPE_BY_CVE) by-cve: false # sort the match results with the given strategy, options=[package severity epss risk kev vulnerability] (env: GRYPE_SORT_BY) sort-by: 'risk' # same as --name; set the name of the target being analyzed (env: GRYPE_NAME) name: '' # allows users to specify which image source should be used to generate the sbom # valid values are: registry, docker, podman (env: GRYPE_DEFAULT_IMAGE_PULL_SOURCE) default-image-pull-source: '' search: # selection of layers to analyze, options=[squashed all-layers] (env: GRYPE_SEARCH_SCOPE) scope: 'squashed' # search within archives that do not contain a file index to search against (tar, tar.gz, tar.bz2, etc) # note: enabling this may result in a performance impact since all discovered compressed tars will be decompressed # note: for now this only applies to the java package cataloger (env: GRYPE_SEARCH_UNINDEXED_ARCHIVES) unindexed-archives: false # search within archives that do contain a file index to search against (zip) # note: for now this only applies to the java package cataloger (env: GRYPE_SEARCH_INDEXED_ARCHIVES) indexed-archives: true # A list of vulnerability ignore rules, one or more property may be specified and all matching vulnerabilities will be ignored. # This is the full set of supported rule fields: # - vulnerability: CVE-2008-4318 # fix-state: unknown # package: # name: libcurl # version: 1.5.1 # type: npm # location: "/usr/local/lib/node_modules/**" # # VEX fields apply when Grype reads vex data: # - vex-status: not_affected # vex-justification: vulnerable_code_not_present ignore: [] # a list of globs to exclude from scanning, for example: # - '/etc/**' # - './out/**/*.json' # same as --exclude (env: GRYPE_EXCLUDE) exclude: [] external-sources: # enable Grype searching network source for additional information (env: GRYPE_EXTERNAL_SOURCES_ENABLE) enable: false maven: # search for Maven artifacts by SHA1 (env: GRYPE_EXTERNAL_SOURCES_MAVEN_SEARCH_MAVEN_UPSTREAM) search-maven-upstream: true # base URL of the Maven repository to search (env: GRYPE_EXTERNAL_SOURCES_MAVEN_BASE_URL) base-url: 'https://search.maven.org/solrsearch/select' # (env: GRYPE_EXTERNAL_SOURCES_MAVEN_RATE_LIMIT) rate-limit: 300ms match: java: # use CPE matching to find vulnerabilities (env: GRYPE_MATCH_JAVA_USING_CPES) using-cpes: false jvm: # (env: GRYPE_MATCH_JVM_USING_CPES) using-cpes: true dotnet: # use CPE matching to find vulnerabilities (env: GRYPE_MATCH_DOTNET_USING_CPES) using-cpes: false golang: # use CPE matching to find vulnerabilities (env: GRYPE_MATCH_GOLANG_USING_CPES) using-cpes: false # use CPE matching to find vulnerabilities for the Go standard library (env: GRYPE_MATCH_GOLANG_ALWAYS_USE_CPE_FOR_STDLIB) always-use-cpe-for-stdlib: true # allow comparison between main module pseudo-versions (e.g. v0.0.0-20240413-2b432cf643...) (env: GRYPE_MATCH_GOLANG_ALLOW_MAIN_MODULE_PSEUDO_VERSION_COMPARISON) allow-main-module-pseudo-version-comparison: false javascript: # use CPE matching to find vulnerabilities (env: GRYPE_MATCH_JAVASCRIPT_USING_CPES) using-cpes: false python: # use CPE matching to find vulnerabilities (env: GRYPE_MATCH_PYTHON_USING_CPES) using-cpes: false ruby: # use CPE matching to find vulnerabilities (env: GRYPE_MATCH_RUBY_USING_CPES) using-cpes: false rust: # use CPE matching to find vulnerabilities (env: GRYPE_MATCH_RUST_USING_CPES) using-cpes: false stock: # use CPE matching to find vulnerabilities (env: GRYPE_MATCH_STOCK_USING_CPES) using-cpes: true registry: # skip TLS verification when communicating with the registry (env: GRYPE_REGISTRY_INSECURE_SKIP_TLS_VERIFY) insecure-skip-tls-verify: false # use http instead of https when connecting to the registry (env: GRYPE_REGISTRY_INSECURE_USE_HTTP) insecure-use-http: false # Authentication credentials for specific registries. Each entry describes authentication for a specific authority: # - authority: the registry authority URL the URL to the registry (e.g. "docker.io", "localhost:5000", etc.) (env: SYFT_REGISTRY_AUTH_AUTHORITY) # username: a username if using basic credentials (env: SYFT_REGISTRY_AUTH_USERNAME) # password: a corresponding password (env: SYFT_REGISTRY_AUTH_PASSWORD) # token: a token if using token-based authentication, mutually exclusive with username/password (env: SYFT_REGISTRY_AUTH_TOKEN) # tls-cert: filepath to the client certificate used for TLS authentication to the registry (env: SYFT_REGISTRY_AUTH_TLS_CERT) # tls-key: filepath to the client key used for TLS authentication to the registry (env: SYFT_REGISTRY_AUTH_TLS_KEY) auth: [] # filepath to a CA certificate (or directory containing *.crt, *.cert, *.pem) used to generate the client certificate (env: GRYPE_REGISTRY_CA_CERT) ca-cert: '' # a list of VEX documents to consider when producing scanning results (env: GRYPE_VEX_DOCUMENTS) vex-documents: [] # VEX statuses to consider as ignored rules (env: GRYPE_VEX_ADD) vex-add: [] # match kernel-header packages with upstream kernel as kernel vulnerabilities (env: GRYPE_MATCH_UPSTREAM_KERNEL_HEADERS) match-upstream-kernel-headers: false db: # location to write the vulnerability database cache (env: GRYPE_DB_CACHE_DIR) cache-dir: '~/Library/Caches/grype/db' # URL of the vulnerability database (env: GRYPE_DB_UPDATE_URL) update-url: 'https://grype.anchore.io/databases' # certificate to trust download the database and listing file (env: GRYPE_DB_CA_CERT) ca-cert: '' # check for database updates on execution (env: GRYPE_DB_AUTO_UPDATE) auto-update: true # validate the database matches the known hash each execution (env: GRYPE_DB_VALIDATE_BY_HASH_ON_START) validate-by-hash-on-start: true # ensure db build is no older than the max-allowed-built-age (env: GRYPE_DB_VALIDATE_AGE) validate-age: true # Max allowed age for vulnerability database, # age being the time since it was built # Default max age is 120h (or five days) (env: GRYPE_DB_MAX_ALLOWED_BUILT_AGE) max-allowed-built-age: 120h0m0s # fail the scan if unable to check for database updates (env: GRYPE_DB_REQUIRE_UPDATE_CHECK) require-update-check: false # Timeout for downloading GRYPE_DB_UPDATE_URL to see if the database needs to be downloaded # This file is ~156KiB as of 2024-04-17 so the download should be quick; adjust as needed (env: GRYPE_DB_UPDATE_AVAILABLE_TIMEOUT) update-available-timeout: 30s # Timeout for downloading actual vulnerability DB # The DB is ~156MB as of 2024-04-17 so slower connections may exceed the default timeout; adjust as needed (env: GRYPE_DB_UPDATE_DOWNLOAD_TIMEOUT) update-download-timeout: 5m0s # Maximum frequency to check for vulnerability database updates (env: GRYPE_DB_MAX_UPDATE_CHECK_FREQUENCY) max-update-check-frequency: 2h0m0s log: # suppress all logging output (env: GRYPE_LOG_QUIET) quiet: false # explicitly set the logging level (available: [error warn info debug trace]) (env: GRYPE_LOG_LEVEL) level: 'warn' # file path to write logs to (env: GRYPE_LOG_FILE) file: '' dev: # capture resource profiling data (available: [cpu, mem]) (env: GRYPE_DEV_PROFILE) profile: '' db: # show sql queries in trace logging (requires -vv) (env: GRYPE_DEV_DB_DEBUG) debug: false # include a timestamp (env: GRYPE_TIMESTAMP) timestamp: true ``` ## Future plans The following areas of potential development are currently being investigated: - Support for allowlist, package mapping ## Grype Logo

Grype Logo by Anchore is licensed under CC BY 4.0

Owner

  • Name: Anchore, Inc.
  • Login: anchore
  • Kind: organization
  • Email: info@anchore.com

Committers

Last synced: 9 months ago

All Time
  • Total Commits: 1,661
  • Total Committers: 109
  • Avg Commits per committer: 15.239
  • Development Distribution Score (DDS): 0.743
Past Year
  • Commits: 502
  • Committers: 37
  • Avg Commits per committer: 13.568
  • Development Distribution Score (DDS): 0.578
Top Committers
Name Email Commits
dependabot[bot] 4****] 427
Alex Goodman w****n 381
anchore-actions-token-generator[bot] 1****] 204
Christopher Angelo Phillips 3****s 101
Dan Luhring l****g 87
Alfredo Deza a****a@a****m 83
Keith Zantow k****w@g****m 83
Weston Steimel w****l@a****m 63
William Murphy w****y@a****m 48
cpendery 3****y 16
Jonas Xavier j****x@g****m 11
Alan Pope a****e@a****m 6
Vijay Pillai v****i@a****m 6
Samuel Dacanay s****y@a****m 5
guangwu g****g@g****m 5
James Neate J****e@g****m 4
Zach Hill z****h@a****m 4
Joyce j****m@g****m 3
Adam Hughes 9****m 3
Bar Nuri b****i@h****m 3
Conor Nosal c****l@v****m 3
GGMU 4****n 3
Seiya 2****b 3
briankoe741 1****1 3
Arvind Somya a****a@a****m 2
Abhijeet Kasurde a****e@r****m 2
Michael de Senna d****a 2
Puerco p****o 2
Ross Turk r****s@r****m 2
Shane Dell 3****l 2
and 79 more...

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 631
  • Total pull requests: 1,807
  • Average time to close issues: 7 months
  • Average time to close pull requests: 6 days
  • Total issue authors: 336
  • Total pull request authors: 82
  • Average comments per issue: 2.45
  • Average comments per pull request: 0.31
  • Merged pull requests: 1,425
  • Bot issues: 9
  • Bot pull requests: 1,071
Past Year
  • Issues: 223
  • Pull requests: 989
  • Average time to close issues: 10 days
  • Average time to close pull requests: 3 days
  • Issue authors: 129
  • Pull request authors: 47
  • Average comments per issue: 1.02
  • Average comments per pull request: 0.24
  • Merged pull requests: 751
  • Bot issues: 6
  • Bot pull requests: 558
Top Authors
Issue Authors
  • sekveaja (67)
  • wagoodman (46)
  • willmurphyscode (21)
  • luhring (18)
  • tomersein (14)
  • kzantow (13)
  • chovanecadam (8)
  • metametadata (8)
  • TimBrown1611 (8)
  • tomerse-sg (7)
  • dbrugman (6)
  • karthickm512 (5)
  • Dentrax (5)
  • anchore-actions-token-generator[bot] (5)
  • mirekphd (4)
Pull Request Authors
  • dependabot[bot] (767)
  • anchore-actions-token-generator[bot] (304)
  • wagoodman (241)
  • willmurphyscode (94)
  • kzantow (92)
  • spiffcs (49)
  • westonsteimel (48)
  • luhring (18)
  • popey (12)
  • tomersein (9)
  • testwill (9)
  • zhill (8)
  • seiyab (5)
  • OnceUponALoop (5)
  • patrickjburke245 (5)
Top Labels
Issue Labels
bug (403) enhancement (166) changelog-ignore (96) false-positive (70) false-positive:cpe (30) ecosystem:java (18) good-first-issue (17) needs-investigation (16) false-negative (12) false positive (12) good first issue (10) dependencies (9) question (9) I/O (7) database (6) documentation (5) needs-discussion (4) breaking-change (4) go (3) vulnerability-data-source (3) ecosystem:ruby (3) false negative (3) ecosystem:rust (3) planning (2) missing-vulnerability-data (2) blocked (2) new-data-source (2) ecosystem:javascript (2) test (1) package-repo-source (1)
Pull Request Labels
dependencies (1,032) go (395) github_actions (341) changelog-ignore (222) bug (91) enhancement (51) pre-release (36) test (30) documentation (19) github-actions (10) blocked (5) database (3) breaking-change (3) security (2) performance (2) release (1)

Dependencies

.github/workflows/codeql-analysis.yml actions
  • actions/cache 9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 composite
  • actions/checkout 93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 composite
  • actions/setup-go c4a742cab115ed795e34d4513e2cf7d472deb55f composite
  • github/codeql-action/analyze c3b6fce4ee2ca25bc1066aa3bf73962fda0e8898 composite
  • github/codeql-action/init c3b6fce4ee2ca25bc1066aa3bf73962fda0e8898 composite
.github/workflows/release.yaml actions
  • 8398a7/action-slack a189acbf0b7ea434558662ae25a0de71df69a435 composite
  • actions/cache 9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 composite
  • actions/checkout e2f20e631ae6d7dd3b768f56a5d2af784dd54791 composite
  • actions/setup-go c4a742cab115ed795e34d4513e2cf7d472deb55f composite
  • actions/upload-artifact 83fd05a356d7e2593de66fc9913b3002723633cb composite
  • anchore/sbom-action 06e109483e6aa305a2b2395eabae554e51530e1d composite
  • docker/login-action f4ef78c080cd8ba55a85445d5b36e214a81df20a composite
  • fountainhead/action-wait-for-check 297be350cf8393728ea4d4b39435c7d7ae167c93 composite
.github/workflows/scorecards.yml actions
  • actions/checkout a12a3943b4bdde767164f792f33f40b04645d846 composite
  • github/codeql-action/upload-sarif 5f532563584d71fdef14ee64d17bafb34f751ce5 composite
  • ossf/scorecard-action 99c53751e09b9529366343771cc321ec74e9bd3d composite
.github/workflows/update-bootstrap-tools.yml actions
  • actions/checkout e2f20e631ae6d7dd3b768f56a5d2af784dd54791 composite
  • actions/setup-go c4a742cab115ed795e34d4513e2cf7d472deb55f composite
  • peter-evans/create-pull-request b4d51739f96fca8047ad065eccef63442d8e99f7 composite
  • tibdex/github-app-token 021a2405c7f990db57f5eae5397423dcc554159c composite
.github/workflows/update-syft-release.yml actions
  • actions/checkout e2f20e631ae6d7dd3b768f56a5d2af784dd54791 composite
  • actions/setup-go c4a742cab115ed795e34d4513e2cf7d472deb55f composite
  • peter-evans/create-pull-request b4d51739f96fca8047ad065eccef63442d8e99f7 composite
  • tibdex/github-app-token 021a2405c7f990db57f5eae5397423dcc554159c composite
Dockerfile docker
  • gcr.io/distroless/static-debian11@sha256 5759d194607e472ff80fff5833442d3991dd89b219c96552837a2c8f74058617 build
  • scratch latest build
.github/workflows/validations.yaml actions
  • actions/cache 9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 composite
  • actions/checkout e2f20e631ae6d7dd3b768f56a5d2af784dd54791 composite
  • actions/download-artifact 9782bd6a9848b53b110e712e20e42d89988822b7 composite
  • actions/setup-go c4a742cab115ed795e34d4513e2cf7d472deb55f composite
  • actions/setup-python 13ae5bb136fac2878aff31522b9efb785519f984 composite
  • actions/upload-artifact 83fd05a356d7e2593de66fc9913b3002723633cb composite
  • docker/setup-qemu-action e81a89b1732b9c48d79cd809d8d81d79c4647a18 composite
grype/pkg/test-fixtures/image-simple/Dockerfile docker
  • scratch latest build
grype/presenter/json/test-fixtures/image-simple/Dockerfile docker
  • scratch latest build
grype/presenter/sarif/test-fixtures/image-simple/Dockerfile docker
  • scratch latest build
test/cli/test-fixtures/image-bare/Dockerfile docker
  • scratch latest build
test/cli/test-fixtures/image-java-subprocess/Dockerfile docker
  • openjdk 15-slim-buster build
test/cli/test-fixtures/image-node-subprocess/Dockerfile docker
  • node 16-stretch build
test/integration/test-fixtures/image-alpine-match-coverage/Dockerfile docker
  • scratch latest build
test/integration/test-fixtures/image-arch-match-coverage/Dockerfile docker
  • docker.io/archlinux 20191105@sha256 build
test/integration/test-fixtures/image-centos-match-coverage/Dockerfile docker
  • scratch latest build
test/integration/test-fixtures/image-debian-match-coverage/Dockerfile docker
  • docker.io/golang 1.16@sha256 build
  • scratch latest build
test/integration/test-fixtures/image-portage-match-coverage/Dockerfile docker
  • scratch latest build
test/integration/test-fixtures/image-sles-match-coverage/Dockerfile docker
  • scratch latest build
go.mod go
  • bitbucket.org/creachadair/shell v0.0.7
  • cloud.google.com/go v0.104.0
  • cloud.google.com/go/compute v1.10.0
  • cloud.google.com/go/iam v0.5.0
  • cloud.google.com/go/storage v1.23.0
  • github.com/Azure/go-autorest v14.2.0+incompatible
  • github.com/Azure/go-autorest/autorest v0.11.28
  • github.com/Azure/go-autorest/autorest/adal v0.9.21
  • github.com/Azure/go-autorest/autorest/date v0.3.0
  • github.com/Azure/go-autorest/logger v0.2.1
  • github.com/Azure/go-autorest/tracing v0.6.0
  • github.com/CycloneDX/cyclonedx-go v0.7.1-0.20221222100750-41a1ac565cce
  • github.com/DataDog/zstd v1.4.5
  • github.com/Masterminds/goutils v1.1.1
  • github.com/Masterminds/semver/v3 v3.1.1
  • github.com/Masterminds/sprig/v3 v3.2.2
  • github.com/Microsoft/go-winio v0.5.2
  • github.com/ThalesIgnite/crypto11 v1.2.5
  • github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d
  • github.com/acobaugh/osrelease v0.1.0
  • github.com/adrg/xdg v0.3.3
  • github.com/anchore/go-logger v0.0.0-20220728155337-03b66a5207d8
  • github.com/anchore/go-macholibre v0.0.0-20220308212642-53e6d0aaf6fb
  • github.com/anchore/go-testutils v0.0.0-20200925183923-d5f45b0d3c04
  • github.com/anchore/go-version v1.2.2-0.20210903204242-51efa5b487c4
  • github.com/anchore/packageurl-go v0.1.1-0.20220428202044-a072fa3cb6d7
  • github.com/anchore/sqlite v1.4.6-0.20220607210448-bcc6ee5c4963
  • github.com/anchore/stereoscope v0.0.0-20221208011002-c5ff155d72f1
  • github.com/anchore/syft v0.65.0
  • github.com/andybalholm/brotli v1.0.4
  • github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d
  • github.com/aws/aws-sdk-go v1.44.114
  • github.com/benbjohnson/clock v1.1.0
  • github.com/beorn7/perks v1.0.1
  • github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d
  • github.com/bgentry/speakeasy v0.1.0
  • github.com/blang/semver v3.5.1+incompatible
  • github.com/bmatcuk/doublestar/v2 v2.0.4
  • github.com/bmatcuk/doublestar/v4 v4.0.2
  • github.com/cenkalti/backoff/v4 v4.1.3
  • github.com/census-instrumentation/opencensus-proto v0.3.0
  • github.com/cespare/xxhash/v2 v2.1.2
  • github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4
  • github.com/cncf/xds/go v0.0.0-20211130200136-a8f946100490
  • github.com/containerd/containerd v1.6.12
  • github.com/containerd/stargz-snapshotter/estargz v0.12.0
  • github.com/coreos/go-semver v0.3.0
  • github.com/coreos/go-systemd/v22 v22.3.2
  • github.com/cpuguy83/go-md2man/v2 v2.0.2
  • github.com/cyberphone/json-canonicalization v0.0.0-20210823021906-dc406ceaf94b
  • github.com/davecgh/go-spew v1.1.1
  • github.com/docker/cli v20.10.17+incompatible
  • github.com/docker/distribution v2.8.1+incompatible
  • github.com/docker/docker v20.10.17+incompatible
  • github.com/docker/docker-credential-helpers v0.6.4
  • github.com/docker/go-connections v0.4.0
  • github.com/docker/go-units v0.4.0
  • github.com/dsnet/compress v0.0.2-0.20210315054119-f66993602bf5
  • github.com/dustin/go-humanize v1.0.0
  • github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1
  • github.com/envoyproxy/protoc-gen-validate v0.6.2
  • github.com/facebookincubator/nvdtools v0.1.4
  • github.com/fsnotify/fsnotify v1.5.4
  • github.com/fullstorydev/grpcurl v1.8.7
  • github.com/gabriel-vasile/mimetype v1.4.0
  • github.com/go-chi/chi v4.1.2+incompatible
  • github.com/go-logr/logr v1.2.3
  • github.com/go-logr/stdr v1.2.2
  • github.com/go-openapi/analysis v0.21.4
  • github.com/go-openapi/errors v0.20.3
  • github.com/go-openapi/jsonpointer v0.19.5
  • github.com/go-openapi/jsonreference v0.20.0
  • github.com/go-openapi/loads v0.21.2
  • github.com/go-openapi/runtime v0.24.2
  • github.com/go-openapi/spec v0.20.7
  • github.com/go-openapi/strfmt v0.21.3
  • github.com/go-openapi/swag v0.22.3
  • github.com/go-openapi/validate v0.22.0
  • github.com/go-playground/locales v0.14.0
  • github.com/go-playground/universal-translator v0.18.0
  • github.com/go-playground/validator/v10 v10.11.0
  • github.com/go-restruct/restruct v1.2.0-alpha
  • github.com/go-test/deep v1.0.8
  • github.com/gogo/protobuf v1.3.2
  • github.com/golang-jwt/jwt v3.2.2+incompatible
  • github.com/golang-jwt/jwt/v4 v4.4.2
  • github.com/golang/glog v1.0.0
  • github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da
  • github.com/golang/mock v1.6.0
  • github.com/golang/protobuf v1.5.2
  • github.com/golang/snappy v0.0.4
  • github.com/google/btree v1.1.2
  • github.com/google/certificate-transparency-go v1.1.3
  • github.com/google/go-cmp v0.5.9
  • github.com/google/go-containerregistry v0.11.0
  • github.com/google/go-github/v45 v45.2.0
  • github.com/google/go-querystring v1.1.0
  • github.com/google/gofuzz v1.2.0
  • github.com/google/trillian v1.5.0
  • github.com/google/uuid v1.3.0
  • github.com/googleapis/enterprise-certificate-proxy v0.2.0
  • github.com/googleapis/gax-go/v2 v2.5.1
  • github.com/googleapis/gnostic v0.5.5
  • github.com/googleapis/go-type-adapters v1.0.0
  • github.com/gookit/color v1.4.2
  • github.com/gorilla/websocket v1.4.2
  • github.com/grpc-ecosystem/go-grpc-middleware v1.3.0
  • github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0
  • github.com/grpc-ecosystem/grpc-gateway v1.16.0
  • github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.3
  • github.com/hako/durafmt v0.0.0-20210608085754-5c1018a4e16b
  • github.com/hashicorp/errwrap v1.1.0
  • github.com/hashicorp/go-cleanhttp v0.5.2
  • github.com/hashicorp/go-getter v1.6.1
  • github.com/hashicorp/go-multierror v1.1.1
  • github.com/hashicorp/go-retryablehttp v0.7.1
  • github.com/hashicorp/go-safetemp v1.0.0
  • github.com/hashicorp/go-version v1.6.0
  • github.com/hashicorp/hcl v1.0.0
  • github.com/huandu/xstrings v1.3.2
  • github.com/imdario/mergo v0.3.12
  • github.com/in-toto/in-toto-golang v0.4.1-0.20221018183522-731d0640b65f
  • github.com/inconshreveable/mousetrap v1.0.1
  • github.com/jedisct1/go-minisign v0.0.0-20211028175153-1c139d1cc84b
  • github.com/jhump/protoreflect v1.13.0
  • github.com/jinzhu/copier v0.3.2
  • github.com/jinzhu/inflection v1.0.0
  • github.com/jinzhu/now v1.1.4
  • github.com/jmespath/go-jmespath v0.4.0
  • github.com/jonboulle/clockwork v0.3.0
  • github.com/josharian/intern v1.0.0
  • github.com/json-iterator/go v1.1.12
  • github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51
  • github.com/klauspost/compress v1.15.9
  • github.com/klauspost/pgzip v1.2.5
  • github.com/knqyf263/go-apk-version v0.0.0-20200609155635-041fdbb8563f
  • github.com/knqyf263/go-deb-version v0.0.0-20190517075300-09fca494f03d
  • github.com/knqyf263/go-rpmdb v0.0.0-20221030135625-4082a22221ce
  • github.com/leodido/go-urn v1.2.1
  • github.com/letsencrypt/boulder v0.0.0-20220929215747-76583552c2be
  • github.com/logrusorgru/aurora v0.0.0-20200102142835-e9ef32dff381
  • github.com/magiconair/properties v1.8.6
  • github.com/mailru/easyjson v0.7.7
  • github.com/mattn/go-colorable v0.1.13
  • github.com/mattn/go-isatty v0.0.16
  • github.com/mattn/go-runewidth v0.0.13
  • github.com/matttproud/golang_protobuf_extensions v1.0.4
  • github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d
  • github.com/mholt/archiver/v3 v3.5.1
  • github.com/microsoft/go-rustaudit v0.0.0-20220730194248-4b17361d90a5
  • github.com/miekg/pkcs11 v1.1.1
  • github.com/mitchellh/copystructure v1.2.0
  • github.com/mitchellh/go-homedir v1.1.0
  • github.com/mitchellh/go-testing-interface v1.14.1
  • github.com/mitchellh/hashstructure/v2 v2.0.2
  • github.com/mitchellh/mapstructure v1.5.0
  • github.com/mitchellh/reflectwalk v1.0.2
  • github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6
  • github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd
  • github.com/modern-go/reflect2 v1.0.2
  • github.com/nwaples/rardecode v1.1.0
  • github.com/oklog/ulid v1.3.1
  • github.com/olekukonko/tablewriter v0.0.5
  • github.com/opencontainers/go-digest v1.0.0
  • github.com/opencontainers/image-spec v1.0.3-0.20220114050600-8b9d41f48198
  • github.com/opentracing/opentracing-go v1.2.0
  • github.com/owenrumney/go-sarif v1.1.1
  • github.com/pelletier/go-toml v1.9.5
  • github.com/pelletier/go-toml/v2 v2.0.5
  • github.com/pierrec/lz4/v4 v4.1.15
  • github.com/pkg/errors v0.9.1
  • github.com/pkg/profile v1.6.0
  • github.com/pmezard/go-difflib v1.0.0
  • github.com/prometheus/client_golang v1.13.0
  • github.com/prometheus/client_model v0.2.0
  • github.com/prometheus/common v0.37.0
  • github.com/prometheus/procfs v0.8.0
  • github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0
  • github.com/rivo/uniseg v0.2.0
  • github.com/russross/blackfriday/v2 v2.1.0
  • github.com/sassoftware/go-rpmutils v0.2.0
  • github.com/sassoftware/relic v0.0.0-20210427151427-dfb082b79b74
  • github.com/scylladb/go-set v1.0.3-0.20200225121959-cc7b2070d91e
  • github.com/secure-systems-lab/go-securesystemslib v0.4.0
  • github.com/sergi/go-diff v1.2.0
  • github.com/shibumi/go-pathspec v1.3.0
  • github.com/shopspring/decimal v1.2.0
  • github.com/sigstore/cosign v1.13.1
  • github.com/sigstore/rekor v0.12.1-0.20220915152154-4bb6f441c1b2
  • github.com/sigstore/sigstore v1.4.4
  • github.com/sirupsen/logrus v1.9.0
  • github.com/soheilhy/cmux v0.1.5
  • github.com/spdx/tools-golang v0.3.1-0.20221108182156-8a01147e6342
  • github.com/spf13/afero v1.8.2
  • github.com/spf13/cast v1.5.0
  • github.com/spf13/cobra v1.6.0
  • github.com/spf13/jwalterweatherman v1.1.0
  • github.com/spf13/pflag v1.0.5
  • github.com/spf13/viper v1.13.0
  • github.com/stretchr/objx v0.5.0
  • github.com/stretchr/testify v1.8.1
  • github.com/subosito/gotenv v1.4.1
  • github.com/sylabs/sif/v2 v2.8.1
  • github.com/sylabs/squashfs v0.6.1
  • github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d
  • github.com/tent/canonical-json-go v0.0.0-20130607151641-96e4ba3a7613
  • github.com/thales-e-security/pool v0.0.2
  • github.com/therootcompany/xz v1.0.1
  • github.com/theupdateframework/go-tuf v0.5.2-0.20220930112810-3890c1e7ace4
  • github.com/titanous/rocacheck v0.0.0-20171023193734-afe73141d399
  • github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802
  • github.com/transparency-dev/merkle v0.0.1
  • github.com/ulikunitz/xz v0.5.10
  • github.com/urfave/cli v1.22.7
  • github.com/vbatts/go-mtree v0.5.0
  • github.com/vbatts/tar-split v0.11.2
  • github.com/vifraa/gopom v0.1.0
  • github.com/wagoodman/go-partybus v0.0.0-20210627031916-db1f5573bbc5
  • github.com/wagoodman/go-progress v0.0.0-20200807221327-51d465df1451
  • github.com/wagoodman/jotframe v0.0.0-20211129225309-56b0d0a4aebb
  • github.com/x-cray/logrus-prefixed-formatter v0.5.2
  • github.com/xanzy/go-gitlab v0.73.1
  • github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8
  • github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2
  • github.com/xo/terminfo v0.0.0-20210125001918-ca9a967f8778
  • github.com/zclconf/go-cty v1.10.0
  • go.etcd.io/bbolt v1.3.6
  • go.etcd.io/etcd/api/v3 v3.6.0-alpha.0
  • go.etcd.io/etcd/client/pkg/v3 v3.6.0-alpha.0
  • go.etcd.io/etcd/client/v2 v2.306.0-alpha.0
  • go.etcd.io/etcd/client/v3 v3.6.0-alpha.0
  • go.etcd.io/etcd/etcdctl/v3 v3.6.0-alpha.0
  • go.etcd.io/etcd/etcdutl/v3 v3.6.0-alpha.0
  • go.etcd.io/etcd/pkg/v3 v3.6.0-alpha.0
  • go.etcd.io/etcd/raft/v3 v3.6.0-alpha.0
  • go.etcd.io/etcd/server/v3 v3.6.0-alpha.0
  • go.etcd.io/etcd/tests/v3 v3.6.0-alpha.0
  • go.etcd.io/etcd/v3 v3.6.0-alpha.0
  • go.mongodb.org/mongo-driver v1.10.0
  • go.opencensus.io v0.23.0
  • go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.28.0
  • go.opentelemetry.io/otel v1.7.0
  • go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.7.0
  • go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.7.0
  • go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.7.0
  • go.opentelemetry.io/otel/sdk v1.7.0
  • go.opentelemetry.io/otel/trace v1.7.0
  • go.opentelemetry.io/proto/otlp v0.16.0
  • go.uber.org/atomic v1.10.0
  • go.uber.org/multierr v1.8.0
  • go.uber.org/zap v1.23.0
  • golang.org/x/crypto v0.0.0-20220926161630-eccd6366d1be
  • golang.org/x/exp v0.0.0-20220823124025-807a23277127
  • golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4
  • golang.org/x/net v0.0.0-20221012135044-0b7e1fb9d458
  • golang.org/x/oauth2 v0.0.0-20221006150949-b44042a4b9c1
  • golang.org/x/sync v0.1.0
  • golang.org/x/sys v0.0.0-20220928140112-f11e5e49a4ec
  • golang.org/x/term v0.0.0-20220919170432-7a66f970e087
  • golang.org/x/text v0.3.8-0.20211004125949-5bd84dd9b33b
  • golang.org/x/time v0.0.0-20220922220347-f3bd1da661af
  • golang.org/x/tools v0.1.12
  • golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2
  • google.golang.org/api v0.99.0
  • google.golang.org/appengine v1.6.7
  • google.golang.org/genproto v0.0.0-20221010155953-15ba04fc1c0e
  • google.golang.org/grpc v1.50.1
  • google.golang.org/protobuf v1.28.1
  • gopkg.in/cheggaaa/pb.v1 v1.0.28
  • gopkg.in/inf.v0 v0.9.1
  • gopkg.in/ini.v1 v1.67.0
  • gopkg.in/natefinch/lumberjack.v2 v2.0.0
  • gopkg.in/square/go-jose.v2 v2.6.0
  • gopkg.in/yaml.v2 v2.4.0
  • gopkg.in/yaml.v3 v3.0.1
  • gorm.io/gorm v1.23.5
  • k8s.io/api v0.23.5
  • k8s.io/apimachinery v0.23.5
  • k8s.io/client-go v0.23.5
  • k8s.io/klog/v2 v2.60.1-0.20220317184644-43cc75f9ae89
  • k8s.io/kube-openapi v0.0.0-20220124234850-424119656bbf
  • k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9
  • lukechampine.com/uint128 v1.1.1
  • modernc.org/cc/v3 v3.36.0
  • modernc.org/ccgo/v3 v3.16.6
  • modernc.org/libc v1.16.8
  • modernc.org/mathutil v1.4.1
  • modernc.org/memory v1.1.1
  • modernc.org/opt v0.1.1
  • modernc.org/sqlite v1.17.3
  • modernc.org/strutil v1.1.1
  • modernc.org/token v1.0.0
  • sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2
  • sigs.k8s.io/structured-merge-diff/v4 v4.2.1
  • sigs.k8s.io/yaml v1.3.0
go.sum go
  • 2758 dependencies
test/integration/test-fixtures/image-debian-match-coverage/golang/go.mod go
  • github.com/google/uuid v1.3.0
test/integration/test-fixtures/image-debian-match-coverage/golang/go.sum go
  • github.com/google/uuid v1.3.0
grype/pkg/test-fixtures/image-simple/package.json npm
  • left-pad 1.3.0
grype/pkg/test-fixtures/image-simple/target/nested/package.json npm
  • lodash 4.17.21
test/integration/test-fixtures/image-debian-match-coverage/javascript/pkg-json/package.json npm
  • deep-equal ^1.0.1 development
  • get-stream ^4.1.0 development
  • licensee ^7.0.3 development
  • marked ^0.6.3 development
  • marked-man ^0.6.0 development
  • npm-registry-couchapp ^2.7.4 development
  • npm-registry-mock ^1.3.1 development
  • require-inject ^1.4.4 development
  • sprintf-js ^1.1.2 development
  • standard ^11.0.1 development
  • tacks ^1.3.0 development
  • tap ^12.7.0 development
  • tar-stream ^2.1.0 development
  • JSONStream ^1.3.5
  • abbrev ~1.1.1
  • ansicolors ~0.3.2
  • write-file-atomic ^2.4.3
test/quality/requirements.txt pypi
  • tabulate ==0.8.10 test
test/integration/test-fixtures/image-debian-match-coverage/ruby/Gemfile.lock rubygems
  • rails 4.1.1