Hello StackOverflowians.
I'm currently trying to set up Snyk in my GitHub Actions workflow, in a Node project. The idea is to run two jobs:
- A Snyk security gate as per their documentation (found here), such as the first example for keeping it simple.
- A build and push job (that works as intended on its own)
However, when attempting to run the first job, it fails with the following log during the "Run Snyk to check for vulnerabilities" step:
Run snyk/actions/node@master
with:
command: test
json: false
env:
REGISTRY: ghcr.io
IMAGE_NAME: <IMAGENAME>
SNYK_TOKEN: ***
/usr/bin/docker run --name snyksnyknode_3aa871 --label 6a6825 --workdir /github/workspace --rm -e REGISTRY -e IMAGE_NAME -e SNYK_TOKEN -e INPUT_ARGS -e INPUT_COMMAND -e INPUT_JSON -e SNYK_INTEGRATION_NAME -e SNYK_INTEGRATION_VERSION -e HOME -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RETENTION_DAYS -e GITHUB_RUN_ATTEMPT -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_SERVER_URL -e GITHUB_API_URL -e GITHUB_GRAPHQL_URL -e GITHUB_REF_NAME -e GITHUB_REF_PROTECTED -e GITHUB_REF_TYPE -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e GITHUB_ACTION_REPOSITORY -e GITHUB_ACTION_REF -e GITHUB_PATH -e GITHUB_ENV -e RUNNER_OS -e RUNNER_ARCH -e RUNNER_NAME -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e ACTIONS_CACHE_URL -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/work/digitaliseringsradarn-frontend/digitaliseringsradarn-frontend":"/github/workspace" snyk/snyk:node "snyk" "test" "--severity-threshold=high --fail-on=upgradable"
Dependency bindings was not found in undefined. Your package.json and undefined are probably out of sync. Please run "undefined" and try again.
The last part Dependency bindings was not found in undefined. Your package.json and undefined are probably out of sync. Please run "undefined" and try again.
is that which I do not understand how it helps me debug.
Is this a known problem with a known solution? If not, how can I go about finding what undefined is referring to?
Thank you in advance, Raoul
CodePudding user response:
Currently, it seems as though deleting node_modules/
as well as package-lock.json
and regenerating them with npm install
remedies this issue.
<in root>
rm -rf node_modules/
rm package-lock.json
npm install