Skip to content

Compare two Snyk Code scans that have been exported as JSON files

License

Notifications You must be signed in to change notification settings

hezro/snyk-code-pr-diff

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Snyk Code PR Diff

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

Compares two Snyk Code JSON files to provide details on:

  • New vulnerabilities not found in the baseline scan

Prerequisites

  • Must provide two Snyk Code JSON files: one baseline scan and one scan where code changes have occurred

Supported Snyk products

Product Supported
Code
Open Source
Container
IaC

Usage

  • Run a Snyk Code scan and output a JSON file as the baseline.
  • Run another Snyk Code scan that has code changes and output a JSON file.
  • Usage: snyk-code-pr-diff <baseline_scan.json> <pr_scan.json>
  • Example: snyk-code-pr-diff-amd64-linux /home/runner/work/goof/goof/snyk_code_baseline.json /home/runner/work/goof/goof/snyk_code_pr.json

Examples

GitHub Action Screenshot

image

About

Compare two Snyk Code scans that have been exported as JSON files

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages