Skip to content

sec (4/9): scope benchmark requirement preflight to runnable scanners#28

Open
jesse-merhi wants to merge 1 commit into
sec/03-require-active-targetfrom
sec/04-benchmark-preflight
Open

sec (4/9): scope benchmark requirement preflight to runnable scanners#28
jesse-merhi wants to merge 1 commit into
sec/03-require-active-targetfrom
sec/04-benchmark-preflight

Conversation

@jesse-merhi

@jesse-merhi jesse-merhi commented Jul 23, 2026

Copy link
Copy Markdown
Member

What changes

Benchmark requirement preflight now only considers scanners that can
actually run on the benchmark's target kind. A scanner that does not support the
target kind (e.g. a plugin-only scanner during a skill benchmark) no longer has
its required env vars demanded before the run starts.

Why it matters

Preflight fails fast when a required credential is missing — good. But it was
checking every configured scanner, including ones that would be skipped anyway
because they don't support the target kind. That meant a benchmark could abort
demanding, say, a token for a scanner that was never going to execute. Scoping
preflight to the runnable set makes the "fail before partial work" check match
the work that will actually happen.

Before / after

Behavior
Before preflight requires env for all configured scanners, including unrunnable ones — benchmark aborts on a credential it will never use
After preflight requires env only for scanners that support the benchmark target kind

New helper runnableBenchmarkScanners(opts, kind) filters the scanner set via
the registry's SupportsTargetKind before requirement resolution; RunBenchmark
feeds that filtered set into preflight.

Verify

go test ./internal/runner/ -run 'RunnableBenchmarkScanners' -count=1

TestRunnableBenchmarkScannersFiltersUnsupportedTargetKind asserts a scanner
that does not support the target kind is dropped from the preflight set.

A benchmark validates required env for every requested scanner before running.
A url-only user-defined scanner would abort a skill benchmark it would never
run against, because its required credentials look missing. Filter requirement
validation to scanners that support the per-case target kind.
Copilot AI review requested due to automatic review settings July 23, 2026 12:49

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@clawsweeper

clawsweeper Bot commented Jul 24, 2026

Copy link
Copy Markdown

ClawSweeper status: review started.

I am starting a fresh review of this pull request: sec (4/9): scope benchmark requirement preflight to runnable scanners This is item 1/1 in the current shard. Shard 0/1.

This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking.

Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted.

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.

2 participants