Add Scenario catalog and launch - #2373
Conversation
b0d54a6 to
2c63cfd
Compare
2c63cfd to
eb6a344
Compare
eb6a344 to
e33b175
Compare
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 5d02c2d5-b499-4f78-a04d-03bffa750817
e33b175 to
467504c
Compare
| <div className={styles.header}> | ||
| <div className={styles.headerText}> | ||
| <Text id="scenario-catalog-title" as="h1" size={600} weight="semibold"> | ||
| Scenarios |
There was a problem hiding this comment.
Can we name this "Scanner"? Also wonder if it'd be useful to link to our docs
| labels, | ||
| }: BuildRunRequestInput): BuildRunRequestResult { | ||
| if (!targetName) { | ||
| return { ok: false, error: 'Select a target.' } |
There was a problem hiding this comment.
(GHCP Generated): This target validation also blocks the estimate request. For example, airt.leakage can calculate its run size from the selected techniques and datasets without a target, and the backend makes ScenarioRunSizeEstimateRequest.target_name optional. Please separate estimate validation from launch validation so a target is required only when the user launches the run. A selected target can still be included for scenarios whose estimates depend on target capabilities.
|
|
||
| return ( | ||
| <Text size={200} weight="semibold"> | ||
| {datasets |
There was a problem hiding this comment.
(GHCP Generated): Please rename this column to Default datasets and use the same two-line summary for every scenario. The first line should show the total selected default count across all datasets (for example, 18 objectives). The second line should list only the dataset names. This will make multi-dataset rows such as adaptive.text_adaptive look like airt.cyber instead of repeating a count beside every dataset.
| || estimate.minimum != null | ||
| || estimate.maximum != null | ||
| return hasPlannedAttackBound | ||
| ? `${attemptSummary} · ${formatProgressUnitSummary(estimate)}` |
There was a problem hiding this comment.
(GHCP Generated): Please keep the Default run size column uniform across scenarios. When the estimate is uncertain, show only the minimum-to-maximum attack range, such as 12-20 attacks. Do not expose adaptive implementation terms such as attack attempts and progress units in this catalog summary. Those details can remain in the scenario detail view.
| const estimate: ScenarioRunEstimate = { | ||
| version: response.version, | ||
| scope, | ||
| total: response.total_attack_count, |
There was a problem hiding this comment.
(GHCP Generated): This does not match the backend response contract and crashes the whole catalog after a clean start. The live /api/scenarios/catalog response contains estimated_attack_count and does not contain status, version, total_attack_count, or retries_included. As a result, total becomes undefined; because undefined !== null, the summary calls undefined.toLocaleString() and the page shows the error boundary. Please align the frontend type and adapter with ScenarioRunSizeEstimate, or change the backend response model and serialization in the same stack.
Summary
Adds registered Scenario discovery, target and technique configuration, dataset and baseline selection, authoritative launch previews, and run creation. The post-launch handoff remains intentionally small because live monitoring arrives in the next layer.
What this layer adds
Preview
Stack
This is 2 of 7 in native GitHub Stack #2390 and depends on #2372.
See the full implementation, screenshots, walkthrough, validation, and operational notes.
Validation