MAINT: Updating CLI to use updated estimates - #2572
Draft
Richard Lundeen (rlundeen2) wants to merge 2 commits into
Draft
MAINT: Updating CLI to use updated estimates#2572Richard Lundeen (rlundeen2) wants to merge 2 commits into
Richard Lundeen (rlundeen2) wants to merge 2 commits into
Conversation
The scan progress bar counted techniques completed / total because the server only knew about attacks already persisted, so an attacks-based bar always read 100%. The backend now persists a normalized run plan, so total_attacks is a real planned total. Switch the bar to run.completed_attacks / run.total_attacks, relabel the output from 'techniques:' to 'units:', and delete the total_techniques / scenario_meta plumbing that only existed to compute the old ratio. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
The counts are planned execution units from the persisted run plan, not attack results persisted so far. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
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 changed
The
pyrit_scanprogress bar counted techniques completed. It now uses the backend's execution-unit counts (completed_attacks/total_attacksonScenarioRunSummary) and the label changes fromtechniques:tounits:.Techniques were a proxy. The server could not report a planned total, so an attacks-based bar would always read 100%. Since #2374,
_calculate_progress_countsderives the total from the persisted run plan, so the CLI can just show the real numbers.This also deletes the
total_techniques/scenario_metaplumbing that existed only to compute the old ratio, and removes a mismatch wherepyrit_shellignored aggregate technique expansion and so disagreed withpyrit_scan.The
ScenarioRunSummarycount descriptions still described persisted attack results; they now describe planned execution units.Tests
uv run pytest tests/unit/cli tests/unit/models -q→ 1740 passed.pre-commit run --all-files:Check Memory Migrationsandtyfail identically on a cleanmaincheckout, so they are pre-existing.