Finish WHITEHAT-WP-0001 and own live residuals in WP-0006
Close T05 and T06 on the same applicable-target rule as T03: E3 cadence and in-process calibration, platform-pg not_applicable, P1/P2 evaluator proven against known-good and known-bad samples. Persist offline capacity calibration. Live E3, P1/P2, flex-auth E2, and a later audit-core run move to WHITEHAT-WP-0006, which authorizes no packet. Assistant: grok Assistant-Session: 01a05e32-c776-72a3-86ec-c490e027aca9
This commit is contained in:
parent
69e03efd7f
commit
43327183d8
13 changed files with 355 additions and 73 deletions
|
|
@ -1,4 +1,4 @@
|
|||
from whitehat_security.capacity import CapacitySample, characterize
|
||||
from whitehat_security.capacity import CapacitySample, capacity_calibration, characterize
|
||||
from whitehat_security.e3 import PROBES, evaluate
|
||||
from whitehat_security.model import RunReport
|
||||
from whitehat_security.reporting import risk_nexus_message
|
||||
|
|
@ -35,6 +35,21 @@ def test_capacity_unbound_governor_is_finding():
|
|||
assert len(result.reasons) == 2
|
||||
|
||||
|
||||
def test_capacity_calibration_detects_known_bad_without_generating_load():
|
||||
report = capacity_calibration()
|
||||
assert report["outcome"] == "pass"
|
||||
assert report["evidence_class"] == "fixture"
|
||||
good = {item["case"]: item for item in report["known_good"]}
|
||||
bad = {item["case"]: item for item in report["known_bad"]}
|
||||
assert good["governor_bound_within_ceiling"]["outcome"] == "pass"
|
||||
assert good["governor_bound_within_ceiling"]["neighbour_degradation"]["neighbour"][
|
||||
"latency_increase_percent"
|
||||
] == 50.0
|
||||
assert bad["unbound_governor"]["outcome"] == "finding"
|
||||
assert bad["exceeded_ceiling"]["outcome"] == "aborted"
|
||||
assert bad["missing_neighbour"]["outcome"] == "finding"
|
||||
|
||||
|
||||
def test_risk_message_contains_pass_and_no_severity():
|
||||
report = RunReport(
|
||||
schema_version="whitehat-run/v1", run_id="run-1", evidence_class="target",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue