Skip to content

Instantly share code, notes, and snippets.

@deangrant
Created August 30, 2023 18:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save deangrant/45cffbc6f2a0da5eaf3000ae29d6ab06 to your computer and use it in GitHub Desktop.
Save deangrant/45cffbc6f2a0da5eaf3000ae29d6ab06 to your computer and use it in GitHub Desktop.
Alias to return matching instances of a vulnerability type using the Snyk CLI
# $ snykchecktype "SQL Injection"
snykchecktype() {
local type="$1"
local output=$(snyk code test .)
echo "$output" | grep -A2 "$type"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment