snyk-tech-services / snyk-delta

Other
19 stars 21 forks source link

Snyk logo


Known Vulnerabilities CircleCI Inactively Maintained

This repository is in maintenance mode, no new features are being developed. Bug & security fixes will continue to be delivered. Open source contributions are welcome for small features & fixes (no breaking changes)

Snyk snyk-delta

Fail the Snyk CLI scans during CI/CD only if there are new issues introduced (similar to Snyk PR checks). Gets the delta between 2 Snyk project snapshots before failing the scan. Particularly useful when running Snyk CLI scans in your local environment, git hooks, CI/CD etc.

Compares 2 Snyk project snapshots to provide details on:

Prerequisites

Supported Snyk products

Product Supported
Open Source
Container
IaC
Code

Installation

npm i -g snyk-delta or grab a binary from the release page

Usage

Mode: Standalone

Usage as module

import { getDelta } from 'snyk-delta'

const jsonResultsFromSnykTest = Read from file or pipe snyk test command

const result = await getDelta(jsonResultsFromSnykTest);

Actual issue(s) details will be listed on stdout.

Help

snyk-delta -h to see help documentation.

Exit codes

snyk test --all-projects support

Snyk-delta doesn't currently support the --all-projects option, but you can try to use snyk_delta_all_projects.sh as an example of how to work around this.

Technical notes

Check out the docs folder.