Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR adds native --status filtering to
python -m conviso.app vulns list, aligned with the Conviso PlatformIssueStatusLabelenum (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
Check that the flag exists:
Run
python -m conviso.app vulns list --helpConfirm
--statusis listed among the options.Validate error handling for invalid values:
Run
python -m conviso.app vulns list --company-id <ID> --status BAD --per-page 1Expected behavior: the command should fail fast with a message listing the allowed status values.
Verify correct server-side filtering:
Run
python -m conviso.app vulns list --company-id <ID> --status CREATED --allExpected behavior: returned vulnerabilities should only have status
CREATED.Verify multi-status filtering:
Run
python -m conviso.app vulns list --company-id <ID> --status CREATED,RISK_ACCEPTED --allExpected behavior: returned vulnerabilities should only have status
CREATEDorRISK_ACCEPTED.