mirror of
https://github.com/norandom/OpenUltraSAST.git
synced 2026-10-16 03:49:26 +00:00
chore(p0): drop never-enabled hunter tools, test-only functions and receiver delivery
Off every active line (PATHFINDER-2026-10-13/03-unified-proposal.md, cuts). Deleted: the four hunter tools no caller enables (read_definition, entry_points, flows, obligations) with their schemas and dispatch, the dead mapping branch of find_refs; 20 functions whose only caller was one test (mapping task records, compute_ranking_metrics, build_quick_hunter_prompt, validate_evidence_transition, should_fuse, harness processors, rank_targets_with_model, model/report slice rendering, taxonomy hierarchical/related, config_value.verdict, taint.verdict, roles.load_roles, features.language_of and build_for_scan, folds.leave_one_*, features.recorded_case, search BatchExecutor and the three __main__ shims, delivery.put_input); the receiver delivery mode of the plane. push_inputs.py moved to benchmarks/push. memory.purge stays: the live-S3 test cleanup uses it. Net: 2,730 lines deleted, 207 added. 473 targeted tests passed; 3,282 tests collect. breadth.toml records the removals. Co-Authored-By: Claude Fable 5.1 <[email protected]>
This commit is contained in:
co-authored by
Claude Fable 5.1
parent
f5a904b7f2
commit
f63703a604
@@ -6,7 +6,6 @@ from openultrasast.calibration import (
|
||||
apply_ranking_calibration,
|
||||
calibrate_ranking,
|
||||
calibrate_rankings,
|
||||
compute_ranking_metrics,
|
||||
learning_from_finding_outcome,
|
||||
record_false_positive_learning,
|
||||
write_false_positive_learnings,
|
||||
@@ -62,34 +61,6 @@ def test_false_positive_learning_records_reason_and_scope(tmp_path: Path) -> Non
|
||||
assert "missing_attacker_control" in output.read_text()
|
||||
|
||||
|
||||
def test_ranking_metrics_track_false_positive_reasons_by_tier() -> None:
|
||||
metrics = compute_ranking_metrics(
|
||||
[
|
||||
{"tier": "A", "outcome": FindingOutcome.VERIFIED, "time_to_verification_seconds": 10},
|
||||
{
|
||||
"tier": "A",
|
||||
"outcome": FindingOutcome.REJECTED,
|
||||
"reason": FalsePositiveReason.UNREACHABLE_PATH,
|
||||
"time_to_verification_seconds": 20,
|
||||
},
|
||||
{"tier": "B", "outcome": FindingOutcome.REJECTED, "reason": FalsePositiveReason.DUPLICATE},
|
||||
{
|
||||
"tier": "A",
|
||||
"outcome": FindingOutcome.UNVERIFIED,
|
||||
"reason": FalsePositiveReason.UNVERIFIED,
|
||||
"missed_fixture_vulnerabilities": 1,
|
||||
},
|
||||
],
|
||||
tier="A",
|
||||
)
|
||||
|
||||
assert metrics.verified_findings == 1
|
||||
assert metrics.false_positives == 2
|
||||
assert metrics.time_to_verification_seconds == 15.0
|
||||
assert metrics.missed_fixture_vulnerabilities == 1
|
||||
assert metrics.false_positive_reasons["unreachable_path"] == 1
|
||||
|
||||
|
||||
def test_scoped_false_positive_demotion_does_not_suppress_class_globally() -> None:
|
||||
learning = record_false_positive_learning(
|
||||
_finding("auth/login.py"),
|
||||
|
||||
Reference in New Issue
Block a user