Use the Snyk orb to easily incorporate Snyk into your CircleCI Workflows. By utilizing this orb in your project workflow, it is possible to use Snyk to test, fix and monitor your project for vulnerabilities in the app dependencies and Docker images, all with a single command. You can set thresholds for vulnerability tolerance in your app or Docker image (and fail the workflows when threshold is exceeded), apply proprietary Snyk patches, and save dependency snapshots on snyk.io for continuous monitoring and alerting.
In fact, it is very easy to start using the Orb. All you need to do is:
- Follow the instructions at the Orb Quick Start Guide to enable usage of Orbs in your project workflow
- Set up an environment variable (
SNYK_TOKEN) with your Snyk API token, which you can get from your account in your Snyk instance- Optionally, you can set your API endpoint with
SNYK_APIif it differs from the default (https://snyk.io/)
- Optionally, you can set your API endpoint with
- In the app build job, call the
snyk/scan - Optionally, supply parameters to customize orb behaviour
version: 2.1
orbs:
snyk: snyk/snyk@x.y.z
jobs:
build:
docker:
- image: circleci/node:4.8.2
steps:
- checkout
- run: npm install -q
- snyk/scanversion: 2.1
orbs:
snyk: snyk/snyk@x.y.z
jobs:
build:
environment:
IMAGE_NAME: myrepo/myapp
docker:
- image: circleci/buildpack-deps:stretch
steps:
- checkout
- setup_remote_docker
- run:
name: Build Docker image
command: docker build -t $IMAGE_NAME:latest .
- snyk/scan:
token-variable: SNYK_TOKEN
docker-image-name: $IMAGE_NAME:latest
target-file: "Dockerfile"version: 2.1
orbs:
snyk: snyk/snyk@x.y.z
jobs:
build:
docker:
- image: circleci/node:4.8.2
steps:
- checkout
- run:
command: npm install -q
- snyk/scan:
token-variable: CICD_SNYK_TOKEN # use is api token stored in an env variable named other than SNYK_TOKEN
severity-threshold: high # only fail if detected high-severity vulnerabilities
fail-on-issues: false # don't fail even if issues detected (not recommended!)
monitor-on-build: true # create a snapshot of apps dependencies on snyk.io, for continoues monitoring (recommended!)
project: ${CIRCLE_PROJECT_REPONAME}/${CIRCLE_BRANCH}-app # use this to save the snapshot under specific names.
organization: ${SNYK_CICD_ORGANIZATION} # save reports under a specific Snyk organization
no-output-timeout: 20m # set timeout without output to 20 minsFull reference docs https://circleci.com/orbs/registry/orb/snyk/snyk
To ensure the long-term stability and quality of this project, we are moving to a closed-contribution model effective August 2025. This change allows our core team to focus on a centralized development roadmap and rigorous quality assurance, which is essential for a component with such extensive usage.
All of our development will remain public for transparency. We thank the community for its support and valuable contributions.
GitHub issues have been disabled on this repository as part of our move to a closed-contribution model. The Snyk support team does not actively monitor GitHub issues on any Snyk development project.
For help with Snyk products, please use the Snyk support page, which is the fastest way to get assistance.



