anchore/scan-action is a JavaScript project with 294 stars in the Automation space. Anchore container analysis and scan provided as a GitHub Action
Snapshot summary built from the project's own GitHub metadata — there's no written TopGit review yet. The page will update automatically when a full review is published.
WHY NO REVIEW YET
TopGit writes full reviews for the most-starred, most-requested repositories. This page is a snapshot until then — see the READ ME tab for the original README in full.
:zap: Find threats in files or containers at lightning speed :zap:
This is a GitHub Action for invoking the Grype scanner and returning the vulnerabilities found,
and optionally fail if a vulnerability is found with a configurable severity level.
Use this in your workflows to quickly verify files or containers' content after a build and before pushing, allowing PRs, or deploying updates.
The action invokes the grype command-line tool, with these benefits:
Runs locally, without sending data outbound - no credentials required!
Speedy scan operations
Scans both paths and container images
Easy failure evaluation depending on vulnerability severity
The example workflows have lots of usage examples for scanning both containers and directories.
By default, a scan will produce very detailed output on system packages like an RPM or DEB, but also language-based packages. These are some of the supported packages and libraries:
Supported Linux Distributions:
Alpine
BusyBox
CentOS and RedHat
Debian and Debian-based distros like Ubuntu
Supported packages and libraries:
Ruby Bundles
Python Wheel, Egg, requirements.txt
JavaScript NPM/Yarn
Java JAR/EAR/WAR, Jenkins plugins JPI/HPI
Go modules
[!TIP]
Security best practice: For production workflows, pin actions to a full commit SHA rather than a version tag. You can find the latest SHA for each release on the action's releases page.
Container scanning
The simplest workflow for scanning a localbuild/testimage container:
By default, if any vulnerability at medium or higher is seen, the build fails. To have the build step fail in cases where there are vulnerabilities with a severity level different than the default, set the severity-cutoff field to one of low, high, or critical:
The inputs image, path, and sbom are mutually exclusive to specify the source to scan; all the other keys are optional. These are all the available keys to configure this action, along with the defaults:
Input Name
Description
Default Value
image
The image to scan
N/A
path
The file path to scan
N/A
sbom
The SBOM to scan
N/A
registry-username
The registry username to use when authenticating to an external registry
registry-password
The registry password to use when authenticating to an external registry
fail-build
Fail the build if a vulnerability is found with a higher severity. That severity defaults to medium and can be set with severity-cutoff.
true
output-format
Set the output parameter after successful action execution. Valid choices are json, sarif, cyclonedx-xml, cyclonedx-json, and table; where table output will also display in the logs.
sarif
output-file
File to output the Grype scan results to. Defaults to a file in the system temp directory, available in the action outputs
severity-cutoff
Optionally specify the minimum vulnerability severity to trigger a failure. Valid choices are "negligible", "low", "medium", "high" and "critical". Any vulnerability with a severity less than this value will lead to a "warning" result. Default is "medium".
medium
only-fixed
Specify whether to only report vulnerabilities that have a fix available.
false
add-cpes-if-none
Specify whether to autogenerate missing CPEs.
false
by-cve
Specify whether to orient results by CVE rather than GHSA.
false
vex
Specify a list of VEX documents to consider when producing scanning results.
false
cache-db
Cache the Grype DB in GitHub action cache and restore before checking for updates
false
grype-version
An optional Grype version to download, defaults to the pinned version in GrypeVersion.js.
config
Optional Grype configuration files (newline-separated). Setting this will disable auto-detection of configuration files (e.g. .grype.yaml) - only the specified files will be loaded..
Action Outputs
Output Name
Description
Type
sarif
Path to the SARIF report file, if output-format is sarif
string
json
Path to the report file , if output-format is json
string
cyclonedx-xml
Path to the CycloneDX report file, if output-format is cyclonedx
string
cyclonedx-json
Path to the CycloneDX JSON report file, if output-format is cyclonedx-json
string
Example Workflows
Assuming your repository has a Dockerfile in the root directory:
Same example as above, but with SARIF output format - as is the default, the action will generate a SARIF report, which can be uploaded and then displayed as a Code Scanning Report in the GitHub UI.
:bulb: Code Scanning is a Github service that is currently in Beta. Follow the instructions on how to enable this service for your project.
name: Container Image CI
on: [push]
jobs:
build:
runs-on: ubuntu-latest
# Permissions key is required for CodeQL SARIF Upload, per the docs:
# https://docs.github.com/en/code-security/code-scanning/integrating-with-code-scanning/uploading-a-sarif-file-to-github
permissions:
security-events: write
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Build the Container image
run: docker build . --file Dockerfile --tag localbuild/testimage:latest
- uses: anchore/scan-action@v7
id: scan
with:
image: "localbuild/testimage:latest"
- name: upload Anchore scan SARIF report
uses: github/codeql-action/upload-sarif@v4
with:
sarif_file: ${{ steps.scan.outputs.sarif }}
Optionally, you can add a step to inspect the SARIF report produced:
We love contributions, feedback, and bug reports. For issues with the invocation of this action, file issues in this repository.
For contributing, see Contributing.
More Information
For documentation on Grype itself, including other output capabilities, see the grype project
Connect with the community directly on Discourse.
Diagnostics
This action makes extensive use of GitHub Action debug logging,
which can be enabled as described here
by setting a secret in your repository of ACTIONS_STEP_DEBUG to true.
No homepage URL was recorded for anchore/scan-action in TopGit's last sync. The README tab above frequently contains screenshots and demo links, or check the repository description on GitHub.
How active is development on anchore/scan-action?
The most recent commit recorded on anchore/scan-action was 4 days ago, based on the GitHub push timestamp. The repository has 94 forks — one of the better signals of community interest.
How many stars does anchore/scan-action have?
anchore/scan-action has 294 GitHub stars — refresh the page for the live number, or check github.com/anchore/scan-action. TopGit mirrors GitHub's count but does not claim minute-by-minute accuracy.
What language is anchore/scan-action written in?
anchore/scan-action is written primarily in JavaScript. GitHub's language field is based on the largest share of bytes in the default branch.
What license does anchore/scan-action use?
anchore/scan-action is released under the MIT license. Always verify the LICENSE file directly on GitHub for the authoritative terms — license strings can be edited out of sync with a project's actual stance.
What topics is anchore/scan-action associated with?
GitHub's repository topics for anchore/scan-action: "actions", "anchore-engine", "github-actions", "policy-evaluation", "vulnerabilities", "workflow". TopGit's editorial category is Automation.
Where do I read more about anchore/scan-action?
This TopGit page is a snapshot — the READ ME tab shows the project's own README content (links stripped, images preserved). The GitHub repository at github.com/anchore/scan-action is the definitive source.
Read full README in the tab above.
Want a second opinion on scan-action?
Ask an AI that can read this page — one click and you get its take on scan-action.