Snyk

注册: https://snyk.io/

Install Snyk CLI

npm install -g snyk
curl https://static.snyk.io/cli/latest/snyk-macos -o snyk
chmod +x ./snyk
mv ./snyk /usr/local/bin/ 

Authenticate your machine

snyk auth

Scan for security issues

snyk test --all-projects
# open-source packages
snyk monitor --all-projects --org=771080d9-f4f9-42f5-b535-bd9bd76d9984
# Containers
snyk container monitor <repository>:<tag> --org=771080d9-f4f9-42f5-b535-bd9bd76d9984

Enable Code Test: https://docs.snyk.io/snyk-cli/scan-and-maintain-projects-using-the-cli/snyk-cli-for-snyk-code

# Source code
snyk code test
snyk code test --org=771080d9-f4f9-42f5-b535-bd9bd76d9984

Snyk Preview

https://jenkins.xxx.com/[project-key]/job/[repo-name]/job/[branch]/1/artifact/snyk-scan-id-sast.html

Snyk Ignore: .snyk

exclude:
 global:
   - packages/shared/config

Snyk CICD: manifest.yaml

staticAnalysis:
  enabled: false
  type: multi
  stages:
    sonar: ...
    snyk:
      enabled: true
      type: snyk
      failBuild: false # disable
      snykIacAnalysis: false
      snykSastAnalysis: true
      snykCredentials: xxx
      gitCredentialsId: sourcecode-bitbucket
Article
Tagcloud
DVA Java Express Architecture Azure CI/CD database ML AWS ETL nest sql AntV Next Deep Learning Flutter TypeScript Angular DevTools Microsoft egg Tableau SAP Token Regexp Unit test Nginx nodeJS sails wechat Jmeter HTML2Canvas Swift Jenkins JS event GTM Algorithm Echarts React-Admin Rest React hook Flux Redux ES6 Route Component Ref AJAX Form JSX Virtual Dom Javascript CSS design pattern