[New job] - snyk_test_node
Objective
Snyk Open Source is used to find vulnerabilities in the open source libraries used by your application. It supports many languages .
Use cases
Scenarios
package.json
file is present
Scenario 1 : At least - Given: A node project with a
package.json
file - When: the job is running on a pipeline coming from any branch
- Then: the job run the command
snyk test
- Then: an artefact is produced if at least one output format file is set.
Scenario 2 : No file related to the package manager is provided
- Given: A node project without a
package.json
and package manager lock files - When: the job is running on a pipeline coming from any branch
- Then: the job aborts
- Then: no artifact is produced
Parameters
Name | Description | Default | Mandatory ? |
---|---|---|---|
SNYK_OPTIONS |
Snyk additional options | |
No |
SARIF_FILE_OUTPUT |
File where to save test output in SARIF format | |
No |
JSON_FILE_OUTPUT |
File where to save test output as a JSON data structure | |
No |
IMAGE_TAG |
The default tag for the docker image | 19-buster |
No |
SNYK_TOKEN |
Secret token | |
Yes |
Artifacts & Return status
- Always if a
JSON_FILE_OUTPUT
and/orSARIF_FILE_OUTPUT
filled.
Possible stages or labels for this job
- tests
Project sample to test this job
Edited by DJOUNANG NANA Guy Rostan