-
Notifications
You must be signed in to change notification settings - Fork 4
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
add :vuln pseudo #65
Conversation
This allows for them to be ran individually if we need via tap -g
This will require npm/query#65 before it will work
There was a problem hiding this 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])'], |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
🤖 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>
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 401Currently only severity and cwe are supported. cve could be if that
attribute were ever returned from the registry.