1. Resources
  2. /
  3. Plugins
  4. /
  5. snyk-buildkite-plugin

Snyk Buildkite Plugin Build status

A Buildkite plugin that runs Snyk tests in your Buildkite pipelines. The plugin requires a few dependencies install on your agents in order to function:

Snyk CLI snyk-to-html

Refer to the documentation for these tools to ensure they are installed on your agents before running the plugin. If you are using the Buildkite Elastic CI Stack for AWS, you will need to customise the bootstrap script used by the stack.

Options

These are all the options available to configure this plugin’s behaviour.

Required

scan (string)

The type of scan that the plugin will perform. Currently supported options are oss, code, container. (default: oss)

Optional

token-env (string)

The environment variable the plugin will reference to set SNYK_TOKEN. (default: SNYK_TOKEN)

org (string)

Your Snyk Organization slug, sets SNYK_CFG_ORG.

image (string)

The image and tag (example: alpine:latest) to pass to the container scan tool.

annotate (bool)

Annotate the build according to the scan results. If set to false, no annotation will be created even if vulnerabilities are detected. (default: false)

block (bool)

Optionally block the build on vulnerability detection.

Examples

Here are a few examples of using the plugin to scan within your Buildkite pipeline:

steps:
  - label: "🔎 Scanning with Snyk"
    command: "test.sh"
    plugins:
      - snyk#v0.2.0:
          scan: 'oss'
          annotate: true

And with other options as well:

steps:
  - label: "🔎 Scanning code with Snyk"
    command: "test.sh"
    plugins:
      - snyk#v0.2.0:
          scan: 'code'
          annotate: true

Scanning a docker container image by image name and tag:

steps:
  - label: "🔎 Scanning container image with Snyk"
    command: "build.sh"
    plugins:
      - snyk#v0.2.0:
          scan: 'container'
          annotate: true
          image: 'alpine:latest'

Block a build when a vulnerability is detected:

steps:
  - label: "🔎 Blocking snyk scan"
    command: "test.sh"
    plugins:
      - snyk#v0.2.0:
          scan: 'oss'
          annotate: true
          block: true

⚒ Developing

Tests

Run the tests using docker compose run --rm tests

Running the pipeline

You can use the bk cli to run the pipeline locally:

bk local run

📜 License

The package is available as open source under the terms of the MIT License.

The plugins listed on this webpage are provided for informational purposes only. They have not undergone any formal security review or assessment. While we strive to provide useful resources, we cannot guarantee the safety, reliability, or integrity of these plugins. Users are strongly advised to conduct their own security evaluations before downloading, installing, or using any plugin. By using these plugins, you acknowledge and accept any risks associated with their use. We disclaim any liability for any harm or damages arising from the use of the plugins listed.

Start turning complexity into an advantage

Create an account to get started for free.

Buildkite Pipelines

Platform

  1. Pipelines
  2. Public pipelines
  3. Test Engine
  4. Package Registries
  5. Mobile Delivery Cloud
  6. Pricing

Hosting options

  1. Self-hosted agents
  2. Mac hosted agents
  3. Linux hosted agents

Resources

  1. Docs
  2. Blog
  3. Changelog
  4. Example pipelines
  5. Plugins
  6. Webinars
  7. Case studies
  8. Events
  9. Migration Services
  10. Comparisons
  11. CI/CD perspectives

Company

  1. About
  2. Careers
  3. Press
  4. Security
  5. Brand assets
  6. Contact

Solutions

  1. Replace Jenkins
  2. Workflows for AI/ML
  3. Testing at scale
  4. Monorepo mojo
  5. Bazel orchestration

Legal

  1. Terms of Service
  2. Acceptable Use Policy
  3. Privacy Policy
  4. Subprocessors
  5. Service Level Agreement

Support

  1. System status
  2. Forum
© Buildkite Pty Ltd 2025