Skip to content

feat: evaluate and scan endpoints by status + surface scan API errors - #8

Open
L3vari wants to merge 1 commit into
NeuraLegion:mainfrom
L3vari:feature/evaluate-scan-by-status
Open

feat: evaluate and scan endpoints by status + surface scan API errors#8
L3vari wants to merge 1 commit into
NeuraLegion:mainfrom
L3vari:feature/evaluate-scan-by-status

Conversation

@L3vari

@L3vari L3vari commented Jul 13, 2026

Copy link
Copy Markdown

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

  • New es — Evaluate by Status menu action. Prompts for a comma-separated subset of new,changed,vulnerable,tested and evaluates only those buckets (which s then scans).
  • en — Evaluate New now targets new endpoints only (previously new + changed).
  • ea — Evaluate All unchanged (all statuses).
  • Backed by a single STATUSES constant 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/scans ignored 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.

  • Split the HTTP helper into request (returns the full response) and get (unchanged body wrapper).
  • scan_request now checks response.success? and prints <type> scan rejected (HTTP <code>): <body> on failure.
  • scan_request/start_scan return a real success boolean; the launch summary reports N/M scan(s) launched — K rejected instead of always green.
  • Widened the rescue from JSON::ParseException to Exception so network errors surface too.

Notes

  • The scan request payload is unchanged — only response handling, success reporting, and status selection changed.
  • README updated with the new menu and an "Evaluating by status" section.

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).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant