feat: evaluate and scan endpoints by status + surface scan API errors - #8
Open
L3vari wants to merge 1 commit into
Open
feat: evaluate and scan endpoints by status + surface scan API errors#8L3vari wants to merge 1 commit into
L3vari wants to merge 1 commit into
Conversation
Add the ability to evaluate and scan entry points by their status: - New "es" (Evaluate by Status) menu action prompts for a comma-separated subset of new/changed/vulnerable/tested and evaluates only those buckets. - "en" (Evaluate New) now targets new endpoints only; "ea" still evaluates all statuses. Also make scan submission failures visible: - POST /api/v1/scans now checks the HTTP status; rejections print "scan rejected (HTTP <code>): <body>" instead of always reporting success (the error was previously only shown in unreachable debug mode). - The launch summary reports actual accepted scans (N/M rejected).
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.
What
Adds the ability to evaluate and scan entry points by their status, and makes scan-submission failures visible instead of silently reporting success.
Status-based evaluation
es— Evaluate by Status menu action. Prompts for a comma-separated subset ofnew,changed,vulnerable,testedand evaluates only those buckets (whichsthen scans).en— Evaluate New now targetsnewendpoints only (previouslynew + changed).ea— Evaluate All unchanged (all statuses).STATUSESconstant and a status→bucket map, so evaluate now takes an explicit list of statuses rather than a boolean.Surface scan API errors
Previously
POST /api/v1/scansignored the HTTP status and always printed<type> scan submitted, so a rejected scan (e.g. unauthorized without a repeater) looked identical to success — the real error was only reachable via a debug mode with no CLI flag to enable it.request(returns the full response) andget(unchanged body wrapper).scan_requestnow checksresponse.success?and prints<type> scan rejected (HTTP <code>): <body>on failure.scan_request/start_scanreturn a real success boolean; the launch summary reportsN/M scan(s) launched — K rejectedinstead of always green.rescuefromJSON::ParseExceptiontoExceptionso network errors surface too.Notes