cameronterry / dark-matter

A highly opinionated domain mapping plugin for WordPress Networks
Other
12 stars 2 forks source link

Add Snyk scans and checks for security #76

Closed cameronterry closed 2 years ago

cameronterry commented 2 years ago

Please note: this does not alter nor impact the operation of Dark Matter and is purely for contributors (optional) and maintainers (mandatory).

This PR adds Snyk to Dark Matter to better improve security of the Dark Matter plugin during development by adding code security scans and dependency checking1. Whilst Dark Matter has not been compromised through a rogue dependency in either Composer or NPM, this will provide additional checking layer to mitigate the potential in the future.

Testing the codebase as it can be achieved by running npm run test which will then engage Snyk to scan the code and check the dependencies for an issue such as ua-parser-js2.

Also included is a Github Action for scanning Composer and NPM dependencies through Snyk.

References:

  1. 78% of vulnerabilities are found in indirect dependencies, making remediation complex - Snyk
  2. If you're using this hijacked NPM library anywhere in your software stack, read this