This plugin is not officially supported by Snyk. It's simply hitting Snyk's public APIs API Doc. Snyk public APIs require a [paid plan]https://snyk.io/plans/. You can start a trial to kick the tires.
It currently tests jvm based and python based projects. One time test upon command.
It does not monitor projects, does not upload any results in Snyk UI or reporting.
- Drop the snyk folder into your pants build plugins folder.
- Add to your pants.ini the following lines
backend_packages: +[
'snyk'
]
and
pythonpath: +[
"%(buildroot)s/plugins"
]
-
Set the following ENV VARS
SNYK_TOKEN
with your Snyk token (look under account)SNYK_ORG
with your Snyk ORG Id (look under settings) -
(Optional) Set
SNYK_API
env var to point to your private Snyk instance
./pants snyktest <target>
use --snyk-snyktest-json
option to get the raw json response from the API.