diff --git a/grype/README.md b/grype/README.md index eeb1731..b0fb9bc 100644 --- a/grype/README.md +++ b/grype/README.md @@ -2,35 +2,44 @@ title: Grype homepage: https://github.com/anchore/grype/ tagline: | - Grype is a vulnerability scanner for container images and filesystems. + Grype is a vulnerability scanner for container images and filesystems. --- -To update or switch versions, run `webi grype@stable` (or `@v0.6`, `@beta`, -etc) +To update or switch versions, run `webi grype@stable` (or `@v0.6`, `@beta`, etc) + +### Files + +```text +~/.config/envman/PATH.env +~/.grype.yaml +~/.local/bin/grype +``` ## Cheat Sheet -> It also helps find vulnerabilites for major operating system and language-specific packages. -> Supports Docker, OCI and Singularity image formats, OpenVEX support for filtering and augmenting scanning results. -> Works with `syft`, a powerful `SBOM` (software bill of materials) tool for container images and filesystems +> It also helps find vulnerabilities for major operating system and +> language-specific packages. Supports Docker, OCI and Singularity image +> formats, OpenVEX support for filtering and augmenting scanning results. Works +> with `syft`, a powerful `SBOM` (software bill of materials) tool for container +> images and file systems -### To scan for vulnerabilities in an image: +### How to for vulnerabilities in an image ```sh grype ``` -### To scan all image layers +### How to scan all image layers ```sh grype --scope all-layers ``` -### To run grype from a Docker container so it can scan a running container +### How to scan a running container ```sh docker run --rm \ ---volume /var/run/docker.sock:/var/run/docker.sock \ ---name Grype anchore/grype:latest \ -$(ImageName):$(ImageTag) + --volume /var/run/docker.sock:/var/run/docker.sock \ + --name Grype anchore/grype:latest \ + my_image_name:my_image_tag ``` diff --git a/grype/install.sh b/grype/install.sh index 6964fe7..3de3317 100644 --- a/grype/install.sh +++ b/grype/install.sh @@ -3,7 +3,7 @@ set -e set -u __init_grype() { - + ################## # Install Grype # ################## @@ -24,15 +24,15 @@ __init_grype() { mkdir -p "$(dirname "${pkg_src_cmd}")" # mv ./grype ~/.local/opt/grype-v0.99.9/bin/grype - mv ./"$pkg_cmd_name"* "$pkg_src" + mv ./"$pkg_cmd_name"* "$pkg_src" } # pkg_get_current_version is recommended, but not required pkg_get_current_version() { # 'grype --version' has output in this format: - # grype 0.99.9 (rev abcdef0123) + # grype 0.70.0 # This trims it down to just the version number: - # 0.99.9 + # 0.70.0 grype --version 2> /dev/null | head -n 1 | cut -d ' ' -f 2