Commit 5335018
authored
feat(vulns): add --status filtering (#19)
# Description
This PR adds native --status filtering to `python -m conviso.app vulns
list`, aligned with the Conviso Platform `IssueStatusLabel` enum
(CREATED, DRAFT, IDENTIFIED, IN_PROGRESS, AWAITING_VALIDATION,
FIX_ACCEPTED, RISK_ACCEPTED, FALSE_POSITIVE, SUPPRESSED).
The CLI validates the input (case-insensitive, comma-separated) and
forwards it to the GraphQL layer so the filtering is performed
server-side. README and VERSION were also updated to reflect the new
option.
# How to Test
1. Check that the flag exists:
Run `python -m conviso.app vulns list --help`
Confirm `--status` is listed among the options.
2. Validate error handling for invalid values:
Run `python -m conviso.app vulns list --company-id <ID> --status BAD
--per-page 1`
Expected behavior: the command should fail fast with a message listing
the allowed status values.
3. Verify correct server-side filtering:
Run `python -m conviso.app vulns list --company-id <ID> --status CREATED
--all`
Expected behavior: returned vulnerabilities should only have status
`CREATED`.
4. Verify multi-status filtering:
Run `python -m conviso.app vulns list --company-id <ID> --status
CREATED,RISK_ACCEPTED --all`
Expected behavior: returned vulnerabilities should only have status
`CREATED` or `RISK_ACCEPTED`.3 files changed
Lines changed: 23 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
| 99 | + | |
99 | 100 | | |
100 | 101 | | |
101 | 102 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
| |||
77 | 78 | | |
78 | 79 | | |
79 | 80 | | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
80 | 92 | | |
81 | 93 | | |
82 | 94 | | |
| |||
418 | 430 | | |
419 | 431 | | |
420 | 432 | | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
421 | 440 | | |
422 | 441 | | |
423 | 442 | | |
| |||
468 | 487 | | |
469 | 488 | | |
470 | 489 | | |
| 490 | + | |
| 491 | + | |
471 | 492 | | |
472 | 493 | | |
473 | 494 | | |
| |||
0 commit comments