Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add osv-vulnerabilities and vulnerability service #14567

Merged
merged 3 commits into from
Apr 12, 2022
Merged

Conversation

JamieMagee
Copy link
Contributor

Changes

Adds a Vulnerabilities class which uses @jamiemagee/osv-offline to fetch OSV1 databases and parse them offline. This is the first part of #6562, and still needs much work

Context

Initial part of #6562

Documentation (please check one with an [x])

  • I have updated the documentation, or
  • No documentation update is required

How I've tested my work (please tick one)

I have verified these changes via:

  • Code inspection only, or
  • Newly added/modified unit tests, or
  • No unit tests but ran on a real repository, or
  • Both unit tests + ran on a real repository

Footnotes

  1. https://osv.dev/

lib/workers/repository/process/vulnerabilities.ts Outdated Show resolved Hide resolved
lib/workers/repository/process/vulnerabilities.ts Outdated Show resolved Hide resolved
lib/workers/repository/process/vulnerabilities.ts Outdated Show resolved Hide resolved
lib/workers/repository/process/vulnerabilities.ts Outdated Show resolved Hide resolved
Copy link
Collaborator

@astellingwerf astellingwerf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're deliberately not (yet) adding invocation to this service?

lib/workers/repository/process/vulnerabilities.ts Outdated Show resolved Hide resolved
@JamieMagee
Copy link
Contributor Author

You're deliberately not (yet) adding invocation to this service?

Yep! I need to do some more testing and nail down a rollout plan. I think it will likely be something like:

  1. Undocumented config flag to enable the feature
  2. Documented config flag to enable the feature
  3. Enabled by default for all platforms except GitHub (Renovate already provides security advisories via GitHub's API)
  4. Enabled by default for all platforms

@JamieMagee JamieMagee force-pushed the feat/osv branch 3 times, most recently from 564501d to acda78b Compare March 16, 2022 03:52
@JamieMagee
Copy link
Contributor Author

@viceice I'm seeing null check errors for files I haven't edited. Any ideas why?

@viceice
Copy link
Member

viceice commented Mar 16, 2022

@viceice I'm seeing null check errors for files I haven't edited. Any ideas why?

You need to exclude lib/workers/repository/process/vulnerabilities.spec.ts from strict checks, the transitive imports are causing the issue. 😉

@JamieMagee
Copy link
Contributor Author

All tests are already excluded?

"**/*.spec.ts",

@viceice
Copy link
Member

viceice commented Mar 21, 2022

All tests are already excluded?

"**/*.spec.ts",

Currently yes

@JamieMagee
Copy link
Contributor Author

@viceice Can you review this please? Thanks!

Copy link
Member

@viceice viceice left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

otherwise LGTM

@JamieMagee
Copy link
Contributor Author

@viceice Can I get an approval please 🙏

tsconfig.strict.json Show resolved Hide resolved
@JamieMagee JamieMagee merged commit 48cb88e into main Apr 12, 2022
@JamieMagee JamieMagee deleted the feat/osv branch April 12, 2022 16:13
@renovate-release
Copy link
Collaborator

🎉 This PR is included in version 32.20.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 13, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants