Can we find a vulnerability scanner that works with pnpm? #449
Replies: 3 comments
-
This is linked to from the Google security blog as an example of osv scanner thats ready to use in GitHub: https://securityscorecards.dev/ |
Beta Was this translation helpful? Give feedback.
-
Tested Mend Bolt on a personal repo which showed the following:
|
Beta Was this translation helpful? Give feedback.
-
From a discusion with @kenoir Robert Kenny: There seem to be a couple of formats for SBOMs, but if you can generate one for your pnpm project (https://www.npmjs.com/package/pnpm-cdx) and then upload that to the Snyk API, you might be able to get Snyk to understand the projects vulnerabilities. This is entirely based on googling about a bit, and I have not tested this idea at all. Joe Cowton: Quick brain dump:
I was starting to look at creating a GH action in csnx then realised the vast majority of snyk logic is here in the sbt-node-snyk action (https://github.com/guardian/.github/blob/main/.github/workflows/sbt-node-snyk.yml) - long term would it make sense to add an option here for pnpm that generates the sbom and passes that to snyk? Obvs need to work out how to do that first. Robert Kenny:
I wouldn't take it as a done deal that their API actually supports this, especially that it's assignable to a Snyk project (aka repo). I think they are making noise about it because it lets them sell things to the US Government, but everything i've come across is about creating SBOMs from your projects to export.
If you can find where in the Snyk API to do that, then yes. If not the workflow could also pass the SBOM to another service to generate a list of vulnerabilities (you may even be able to use the Snyk API for that) which ends up being reported somewhere else. There are some interesting examples here: https://github.com/garethr/snyk-sbom-examples This one in particular takes a CycloneDX format SBOM and uses the Snyk API to generate a list of vulnerabilities: https://github.com/garethr/snyk-sbom-examples/blob/main/purl-cyclonedx/cyclone-to-vuln.py But note it's not pushing the whole document at the API, which is what i'd expect. |
Beta Was this translation helpful? Give feedback.
-
Currently across the Guardian we use Snyk to check for dependency vulnerabilities, and Dependabot to check for dependency updates.
Neither of these works with pnpm, which we use here in csnx.
We currently use Renovate to update dependencies, we're awaiting full approval from the tech council for wider use, but as a test it seems to be working well.
We'd like to find a vulnerability scanner to suggest for approval by Infosec. There was talk at the recent Dev X / Infosec catchup that it would be good to think holistically about a department wide solution to dependency vulnerability, perhaps we can use csnx as a testbed for this.
Suggestions so far have been:
Please add any thoughts below.
Beta Was this translation helpful? Give feedback.
All reactions