Skip to content

feat: CORS preflight pentesting checks from BootUI 2.5.0 - #275

Merged
ffroliva merged 21 commits into
release/0.8.0from
feat/0.8.0-a11
Nov 22, 2026
Merged

ffroliva merged 21 commits into
release/0.8.0from
feat/0.8.0-a11

Conversation

@ffroliva

Copy link
Copy Markdown
Owner

Summary

Ports BootUI 2.5.0's CORS preflight pentesting checks (lane A11 of the 0.8.0 plan) onto the bounded probe runner from
the security header checks. No new request is sent: the checks read the GET and OPTIONS responses the scan already
makes.

  • Checks PT-A05-007, -008, -023, -065, -069 and -073 in BootUI's registry order, with BootUI's texts, severities,
    thresholds, trim rules (Java String.trim() and isBlank(), so a non-breaking space is not stripped) and per-probe
    order. Repeated headers are read joined, as BootUI does, including the TRACE Allow check.
  • Per-header-name completeness: a header cut by the retention bounds withholds only the rules that need it and records
    BootUI's gap strings; a truncated header inventory makes every dependent rule indeterminate, never a clean pass.
  • A02 and A10 coverage follow BootUI's precedence (a finding gives REVIEW, incomplete evidence INDETERMINATE,
    otherwise INFO); a truncated OPTIONS body alone is complete evidence, as in BootUI.
  • Masking: only host-echoed fragments (origins, header tokens) pass through the masker, before the 240-character cut;
    under METADATA_ONLY they become [masked], BootUI's fixed text is never masked. The masker is a required argument
    of the scan and of the report builder.
  • The CORS entry the security header checks reported as pending is now the real result. Deviation rows are in
    docs/reference/matrix-updates/0.8.0-a11.tsv.

Tests

Every test commit was red at its named assertions before the change (scripts/dev/red_check.py): 27 for the evidence
contract, 64 for the CORS rules. Mutations confirm the tests bite: a no-op masker fails 3 tests, comparing the
credentialed origin trimmed fails 1, ignoring per-name completeness fails 10. A planted secret is masked on the POST
scan, the cached GET report, MCP get_pentest_report, the pentest_scan summary and the CLI. Ruff, format, pyright,
the import-boundary and code-shape ratchets (McCabe 9 or below for the new functions) and the pentesting suites pass.

Scenario and TDD plan for porting BootUI 2.5.0's CORS preflight checks onto the bounded pentesting probe.

Signed-off-by: Flavio Oliva <ffroliva@gmail.com>
… and BootUI OPTIONS parity

The truncated OPTIONS body follows BootUI, the header bounding is a pure function, every test commit carries wrong-value stubs, and the evidence echo, comparison asymmetries and required-name withholding each get a scenario row and a red-first test.

Signed-off-by: Flavio Oliva <ffroliva@gmail.com>
…and text semantics

Port BootUI's A02 and A10 coverage rules, required-header gap strings, Java trim and isBlank semantics, joined TRACE header reads and evidence text, with the scan result masked. Split the header bounding function under the complexity limit, give every absence test a positive control and list characterization tests with their mutants.

Signed-off-by: Flavio Oliva <ffroliva@gmail.com>
…s deviations

Signed-off-by: Flavio Oliva <ffroliva@gmail.com>
Signed-off-by: Flavio Oliva <ffroliva@gmail.com>
Signed-off-by: Flavio Oliva <ffroliva@gmail.com>
…mplete OPTIONS 5xx

Signed-off-by: Flavio Oliva <ffroliva@gmail.com>
Signed-off-by: Flavio Oliva <ffroliva@gmail.com>
Signed-off-by: Flavio Oliva <ffroliva@gmail.com>
Signed-off-by: Flavio Oliva <ffroliva@gmail.com>
Signed-off-by: Flavio Oliva <ffroliva@gmail.com>
Signed-off-by: Flavio Oliva <ffroliva@gmail.com>
Signed-off-by: Flavio Oliva <ffroliva@gmail.com>
Signed-off-by: Flavio Oliva <ffroliva@gmail.com>
Signed-off-by: Flavio Oliva <ffroliva@gmail.com>
Signed-off-by: Flavio Oliva <ffroliva@gmail.com>
Signed-off-by: Flavio Oliva <ffroliva@gmail.com>
Signed-off-by: Flavio Oliva <ffroliva@gmail.com>
Signed-off-by: Flavio Oliva <ffroliva@gmail.com>
Signed-off-by: Flavio Oliva <ffroliva@gmail.com>
Signed-off-by: Flavio Oliva <ffroliva@gmail.com>
@ffroliva
ffroliva marked this pull request as ready for review November 22, 2026 00:05
@ffroliva
ffroliva merged commit 9a7719e into release/0.8.0 Nov 22, 2026
45 checks passed
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