Skip to content

feat: bounded security header and error disclosure checks from BootUI 2.5.0 - #271

Merged
ffroliva merged 31 commits into
release/0.8.0from
feat/0.8.0-a10
Nov 21, 2026
Merged

ffroliva merged 31 commits into
release/0.8.0from
feat/0.8.0-a10

Conversation

@ffroliva

Copy link
Copy Markdown
Owner

Summary

Ports BootUI 2.5.0's bounded pentesting checks for security headers and error disclosure (lane A10 of the 0.8.0
plan), with BootUI's scan action.

  • A bounded synthetic probe of the application itself: one GET and one OPTIONS request, in process, with BootUI's
    limits on time, header count and body size, run on the request's event loop under single-flight (released on
    success, error and timeout). It opens no socket and sends nothing off the application.
  • Ported checks: the security response headers (PT-A05-002 for any content type except 204, 205 and 3xx; HSTS;
    X-Frame-Options across all values; Referrer-Policy, X-XSS-Protection, COOP/CORP, PT-A05-021/-022/-024/-047/-061),
    TRACE handling, PT-A07-008, the error-disclosure checks (server errors on both probes, verbose error bodies
    including truncated ones, technology disclosure with BootUI's severities and confidence). Header and body values are
    named, never echoed.
  • The action follows BootUI's gates: POST /pentesting/scan, MCP pentest_scan and get_pentest_report, CLI
    pentest scan and pentest report; a read-only panel refuses the scan with PANEL_ACCESS_DENIED; reads have no side
    effects. The panel's routes are mounted once.
  • The CORS checks (lane A11) and the cookie and session checks (lane A12) are reported as pending, not unavailable.
  • Deviation rows: in-process transport and deadline; the MCP/CLI wait; Spring-only checks as not applicable.

Tests

Behaviour Test Red before the change
Missing nosniff on a JSON 404 is reported test_missing_nosniff_is_reported_for_a_json_404 assert [] ...
Server errors on both probes ..._other_statuses_..., test_options_server_error_... assertion
Technology disclosure severity ..._technology_disclosure_severity... 'LOW' != 'INFO'
A truncated error body is still evaluated test_truncated_error_body_is_still_evaluated_with_a_gap assertion
The ported header and TRACE checks tests/engine/collectors/pentesting/test_pentesting_report.py assertion
A disabled or read-only panel refuses the action test_disabled_panel..., test_read_only_panel... 404 == 403
The panel's routes are registered once once-only registration test 3 extra registrations
PT-A10-001 confidence follows BootUI confidence test 'Medium' == 'High'
A read opens no socket socket-trap tests trap control

755 tests in the pentesting, parity, docs, golden, citation and import-boundary suites pass; ruff and pyright pass.
tests/test_shard.py needs refreshed shard weights from this pull request's CI run (the new test files have none yet).

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>
Adds the GET report and POST scan routes, the get_pentest_report and
pentest_scan MCP and CLI tools behind the existing gates, the registry
and parity status updates, and the extractions that keep the probe and
report functions under the complexity ratchet.

Signed-off-by: Flavio Oliva <ffroliva@gmail.com>
Records the in-process transport, deadline and tool-wait deviations in the
A10 matrix fragment and the design deviation log.

Signed-off-by: Flavio Oliva <ffroliva@gmail.com>
PT-A05-002 is evaluated for every response except 204, 205 and 3xx, as
BootUI 2.5.0 MissingContentTypeOptionsCheck does, so a JSON 404 from a
FastAPI host produces the finding.

Signed-off-by: Flavio Oliva <ffroliva@gmail.com>
Behaviour is unchanged. The checks move to one function per BootUI check
family so further checks slot in without raising cognitive complexity.

Signed-off-by: Flavio Oliva <ffroliva@gmail.com>
…oth probes

PT-A10-001 fires for 500, 502 and 504 on the GET and the OPTIONS probe, as
BootUI 2.5.0 SyntheticProbeServerErrorCheck does, instead of any status
from 500 on the GET probe alone.

Signed-off-by: Flavio Oliva <ffroliva@gmail.com>
PT-A05-011 is INFO for an unversioned Server token and LOW for a
version-shaped token or any X-Powered-By header, mirroring BootUI 2.5.0
TechnologyDisclosureCheck. Header values are still never echoed.

Signed-off-by: Flavio Oliva <ffroliva@gmail.com>
PT-A05-006 evaluates the retained text of a truncated body (the gap is
reported separately) and recognises BootUI's JVM frame and exception
patterns plus the Python traceback header, instead of the loose
'stack trace' and 'traceback' words. Technology disclosure and the
error-body check run on any retained response, as in BootUI.

Signed-off-by: Flavio Oliva <ffroliva@gmail.com>
Adds PT-A05-047 (Referrer-Policy), PT-A05-061 (X-XSS-Protection),
PT-A05-021 and PT-A05-022 (cross-origin isolation), PT-A05-024 (TRACE or
TRACK advertised by OPTIONS) and PT-A07-008 (Basic or Digest challenge).
HSTS is no longer limited to documents, X-Frame-Options values are
judged together, and a document without a Content-Type is recognised by
its body, as in BootUI 2.5.0. Values are named, never echoed.

Signed-off-by: Flavio Oliva <ffroliva@gmail.com>
… the environment

Reads and the scan run with socket connects and name lookups trapped
after the test client's own loopback pair is open, and a control proves
the trap catches a connect made during a scan. The panel gate tests set
the gate through the environment so the assertion, not the settings
parser's panel-name check, decides them. The MCP-action allow-list is
one Tool.on_mcp property and the scan summary is public.

Signed-off-by: Flavio Oliva <ffroliva@gmail.com>
…ew disposition

The scan limitation and the A02 coverage text name CORS, cookie and
session checks as pending instead of unavailable. The matrix lists the
pending checks, the error-marker adaptation and the browser-document
rule; the plan records its review disposition.

Signed-off-by: Flavio Oliva <ffroliva@gmail.com>
Signed-off-by: Flavio Oliva <ffroliva@gmail.com>
Signed-off-by: Flavio Oliva <ffroliva@gmail.com>
…ort test file and drop unresolvable citations

Signed-off-by: Flavio Oliva <ffroliva@gmail.com>
…golden ids

Signed-off-by: Flavio Oliva <ffroliva@gmail.com>
Signed-off-by: Flavio Oliva <ffroliva@gmail.com>
…ared with the 2.3.0 golden)

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>

# Conflicts:
#	tests/shard_weights.json
…g checks, one constant per OWASP category

Signed-off-by: Flavio Oliva <ffroliva@gmail.com>
…NOSONAR on required-async callables

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

Signed-off-by: Flavio Oliva <ffroliva@gmail.com>
…sync callables

Signed-off-by: Flavio Oliva <ffroliva@gmail.com>
@ffroliva
ffroliva marked this pull request as ready for review November 21, 2026 23:10
Signed-off-by: Flavio Oliva <ffroliva@gmail.com>

# Conflicts:
#	docs/superpowers/specs/2026-10-30-sharpit-mvp-design.md
#	src/sharpit/engine/advisors/registry.py
@ffroliva
ffroliva merged commit b84adea into release/0.8.0 Nov 21, 2026
47 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