When trying to run a snyk docker container an error comes up in the output:
docker run --rm -v C:\project\src:/project -e SNYK_TOKEN=<<token>> snyk/snyk-cli:nuget test
Output will be something like (note the first line):
parse error: Invalid numeric literal at line 2, column 8
Package manager: nuget
Target file: obj/project.assets.json
Project name: project
Open source: no
Project path: /project
✓ Tested 0 dependencies for known issues, no vulnerable paths found.
- Run `snyk monitor` to be notified about new related vulnerabilities.
- Run `snyk test` as part of your CI/test.
Docker containers were originally created for the Jenkins CI pipeline which uses JSON output to create a set of results files including a JSON file in the host volume folder.
The entrypoint shell script in the docker container requires the snyk output to be in JSON format and is parsed by
jq in the image.
Typically, the command that is run in a Jenkins pipeline also uses the
This error can be ignored but if problems arise, the solution is to add the
--json argument to the command line.