Snyk Vulnerability Scanning Hands On
In this hands on activity we are going to integrate Snyk vulnerability scanning into our build pipeline.
- Use your GitHub account to create an account on Snyk.io
- Install Snyk.io globally on your local machine
npm install -g snyk
- Navigate to the Vue-Client folder and run
snyk auth
to login and thensnyk test
to scan your repo. - Add a job into your build pipeline to scan for vulnerabilities, this job does not need the app to be built to run.
- Add a secret variable to your build pipeline to store your Snyk Authentication token
- https://snyk.io/docs/cli-authentication/
- Install snyk on the pipeline.
- Run
snyk test
invue-client
andexpress-api
. - Run the test.
- Ignore the issue that are found by adding them to your build script
- https://snyk.io/docs/cli-ignore/
- please note at the moment there is a bit of a bug in this hands on so we’ll just remove the test for now. :(
- Run your test again
- job: scan_secrets
pool:
vmImage: 'Ubuntu-16.04'
steps:
- script: echo "I do nothing"