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

add :vuln pseudo #65

Merged
merged 2 commits into from Feb 23, 2024
Merged

add :vuln pseudo #65

merged 2 commits into from Feb 23, 2024

Conversation

wraithgar
Copy link
Member

  • chore: namespace tests
  • feat: add :vuln pseudo class

This will allow the query selector to parse and validate the :vuln
pseudo selector, including differentiating between AND and OR operators.
Namely:

:vuln([cwe=400],[cwe=401]) cwe 400 OR 401
:vuln([cwe=400][cwe=401]) cwe 400 AND 401

Currently only severity and cwe are supported. cve could be if that
attribute were ever returned from the registry.

This allows for them to be ran individually if we need via tap -g
@wraithgar wraithgar requested a review from a team as a code owner February 12, 2024 16:58
wraithgar added a commit to npm/cli that referenced this pull request Feb 13, 2024
This will require npm/query#65 before it will
work
Copy link

@hashtagchris hashtagchris left a comment

Choose a reason for hiding this comment

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

Looks good to me

@@ -125,6 +126,14 @@ const checks = [
[':outdated'],
[':outdated(any)'],

// :vuln pseudo
[':vuln'],
[':vuln([cwe])'],

Choose a reason for hiding this comment

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

Do you want to test :vuln([cwe=*]) as well, assuming that's supported?

Copy link
Member Author

Choose a reason for hiding this comment

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

No, that's not supported. That's how it works under the hood but we aren't advertising that.

@wraithgar wraithgar merged commit 5541137 into main Feb 23, 2024
26 checks passed
@wraithgar wraithgar deleted the gar/vuln branch February 23, 2024 15:36
@github-actions github-actions bot mentioned this pull request Dec 7, 2023
wraithgar pushed a commit that referenced this pull request Feb 23, 2024
🤖 I have created a release *beep* *boop*
---


## [3.1.0](v3.0.1...v3.1.0)
(2024-02-23)

### Features

*
[`5541137`](5541137)
[#65](#65) add :vuln pseudo class
(@wraithgar)

### Chores

*
[`e0d574d`](e0d574d)
[#65](#65) namespace tests (@wraithgar)
*
[`8be927d`](8be927d)
[#63](#63) postinstall for dependabot
template-oss PR (@lukekarrys)
*
[`65fffaa`](65fffaa)
[#63](#63) bump @npmcli/template-oss
from 4.21.1 to 4.21.3 (@dependabot[bot])
*
[`ea880df`](ea880df)
[#60](#60) postinstall for dependabot
template-oss PR (@lukekarrys)
*
[`ce05634`](ce05634)
[#60](#60) bump @npmcli/template-oss
from 4.19.0 to 4.21.1 (@dependabot[bot])
*
[`2c037c8`](2c037c8)
[#42](#42) postinstall for dependabot
template-oss PR (@lukekarrys)
*
[`57eb5db`](57eb5db)
[#42](#42) bump @npmcli/template-oss
from 4.18.1 to 4.19.0 (@dependabot[bot])
*
[`653f22f`](653f22f)
[#41](#41) postinstall for dependabot
template-oss PR (@lukekarrys)
*
[`c9d2318`](c9d2318)
[#41](#41) bump @npmcli/template-oss
from 4.18.0 to 4.18.1 (@dependabot[bot])

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants