Conversation
Signed-off-by: Sypher845 <suyashpatil845@gmail.com>
Signed-off-by: Sypher845 <suyashpatil845@gmail.com>
Signed-off-by: Sypher845 <suyashpatil845@gmail.com>
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #748 +/- ##
=========================================
- Coverage 10.99% 7.39% -3.60%
=========================================
Files 173 267 +94
Lines 8671 13315 +4644
=========================================
+ Hits 953 985 +32
- Misses 7612 12219 +4607
- Partials 106 111 +5 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| if opts.CVSSScore != "" { | ||
| queries = append(queries, fmt.Sprintf("cvss_score_v3=%s", opts.CVSSScore)) | ||
| } |
There was a problem hiding this comment.
CVSS Score is a range match, not an exact match as per the docs
cve_id(exact match)
cvss_score_v3(range condition)
severity(exact match)
status(exact match)
repository_name(exact match)
project_id(exact match)
package(exact match)
tag(exact match)
digest(exact match)
This is the format k3=[min~max]
There was a problem hiding this comment.
so if the users inputs just a particular number , we convret it to [val~val], is this the thing wanted?
There was a problem hiding this comment.
No, I would find out a way to make a range. maybe have the flag be a string and tell in the help that the format is min:max or you can think of something better.
If we can have range, we should have range
There was a problem hiding this comment.
Currently i have implemented the string one , [min~max], will look for something better
| if opts.Severity != "" { | ||
| queries = append(queries, fmt.Sprintf("severity=%s", opts.Severity)) | ||
| } |
There was a problem hiding this comment.
Check if severity is right or not, because severity can only be a handful of strings.
And harbor wont return an error, it will just return empty array.
| if opts.Q != "" { | ||
| queries = append(queries, opts.Q) | ||
| } |
There was a problem hiding this comment.
Add a FIXME here,
And reference this in my draft PR #731.
This needs to be in the standard query format, but I plan to make changes to that, so you need not do it rn. But make a reference in the codebase (a FIXME comment saying what) and in the PR
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