Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #748 +/- ##
=========================================
- Coverage 10.99% 7.66% -3.33%
=========================================
Files 173 272 +99
Lines 8671 13406 +4735
=========================================
+ Hits 953 1027 +74
- Misses 7612 12266 +4654
- Partials 106 113 +7 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Signed-off-by: Sypher845 <suyashpatil845@gmail.com>
Signed-off-by: Sypher845 <suyashpatil845@gmail.com>
Signed-off-by: Sypher845 <suyashpatil845@gmail.com>
2dc9c47 to
7b28626
Compare
Signed-off-by: Sypher845 <suyashpatil845@gmail.com>
7b28626 to
a744965
Compare
|
@NucleoFusion Please take a look |
NucleoFusion
left a comment
There was a problem hiding this comment.
Instead of --page-size 0 I think a special flag would be better, since its not that user friendly and hard to describe in the help
|
|
|
Yep |
Signed-off-by: Sypher845 <suyashpatil845@gmail.com>
3fd8703 to
86b2cf3
Compare
|
@NucleoFusion Ptal :) |
|
@NucleoFusion any update on this? |
Yeah I will have a look at it. |
|
No worries, get well soon! |
NucleoFusion
left a comment
There was a problem hiding this comment.
this look good, but waiting for some clarifications
| flags := cmd.Flags() | ||
| flags.Int64VarP(&opts.Page, "page", "", 1, "Page number") | ||
| flags.Int64VarP(&opts.PageSize, "page-size", "", 10, "Size of per page") | ||
| flags.StringVarP(&opts.Q, "query", "q", "", "Filter vulnerabilities with a ',' separated query string like exact k=v and range k=[min~max]") | ||
| flags.StringVarP(&opts.CVEID, "cve-id", "", "", "Filter by exact CVE ID") | ||
| flags.StringVarP(&opts.CVSSScore, "cvss-score", "", "", "Filter by CVSS v3 score range (e.g. 7.0~10.0) or exact score (e.g. 7.0)") | ||
| flags.StringVarP(&opts.Severity, "severity", "", "", "Filter by severity level") | ||
| flags.StringVarP(&opts.Repository, "repository", "", "", "Filter by exact repository name") | ||
| flags.StringVarP(&opts.ProjectName, "project-name", "", "", "Filter by exact project name") | ||
| flags.StringVarP(&opts.Package, "package", "", "", "Filter by exact package name") | ||
| flags.StringVarP(&opts.Tag, "tag", "", "", "Filter by exact artifact tag") | ||
| flags.StringVarP(&opts.Digest, "digest", "", "", "Filter by exact artifact digest") |
There was a problem hiding this comment.
@bupd @qcserestipy
Should we have this many flags? would it be better to just have the Q param?
And since I am planning a PR on adding validKeys and usage to the query param about how it works in #731 .
Cause managing the current BuildQuery function takes the flags and just creates the full query, so integrating these two would be a little unintuitive.
And then also another problem is the individual flags are rigid, no support for exact/fuzzy switch, and there are also the Q params rigidity, like the params dont allow/follow 2 exact matching, they only do one. Using the Q would also allow or and and.
There was a problem hiding this comment.
one thing to note, the SecurityHub API doesn't actually suport the fuzzy match, union and intersection for vuln fields.
Signed-off-by: Sypher845 <suyashpatil845@gmail.com>
|
@NucleoFusion removed the query flag, PTAL |
NucleoFusion
left a comment
There was a problem hiding this comment.
minor changes, works well
Signed-off-by: Sypher845 <suyashpatil845@gmail.com>
Description
The PR adds the new
harbor vuln listcommand. A command that displays the list of vulnerabilities along with filtering from the Security Hub.Command usage
harbor vuln list(No filters)The CVE-IDs are hyperlinked to aquasec website (provided by the api)
harbor vuln list --query "k=v , , , k=[min~max]": Using query flag based filteringharbor vuln list (flags based filtering): Using flags for filteringharbor vuln list --fixable: Show only fixable vulnerabilities (cli side)harbor vuln list --exclude: woks oppposite of query flag (cli side)Type of Change