Skip to content

fix(hndl): unbound findings get a rankable exposure (audit #8) - #39

Merged
leonacostaok merged 1 commit into
mainfrom
fix/hndl-unbound-exposure
Jul 27, 2026
Merged

fix(hndl): unbound findings get a rankable exposure (audit #8)#39
leonacostaok merged 1 commit into
mainfrom
fix/hndl-unbound-exposure

Conversation

@leonacostaok

Copy link
Copy Markdown
Contributor

Fable audit #8 (MEDIUM). An unbound finding (no declared hndl.yml asset) had retention = secrecy = 0, so the Mosca margin (X+Y-Z)/(X+Y) clamped to 0 under the default horizons and every unbound finding scored 0, making the documented defaults.classification fallback dead.

Fix: default an unbound finding's secrecy lifetime to the quantum-threat horizon Z (the minimum-concern horizon), giving M = Y/(Y+Z), a small, non-zero, rankable exposure that never exceeds a declared long-lived asset and self-adjusts to any per-org horizon override. Inline (non-exported), so the public API surface is unchanged.

Verification: 1178 tests, benchmark F1 = 1.000 (unchanged), typecheck/lint/api:check/format all green, action dist rebuilt. docs/HNDL.md §4.1 + CHANGELOG updated. Manual-merge per repo guardrail.

An unbound finding (matching no declared hndl.yml asset) was scored with
retention = secrecy lifetime = 0, so its protection horizon X = 0 and the
Mosca factor M = (0 + Y - Z)/(0 + Y) clamped to 0 under any horizon where
Z >= Y (including the defaults Y=5, Z=15). Every unbound finding scored 0
regardless of classification, so the documented defaults.classification
fallback never produced a rankable exposure.

Unbound findings now assume the minimum-concern horizon X = Z (secrecy
lifetime = quantumThreatYears): the shortest data lifetime for which HNDL is
a concern at all. This yields M = Y / (Y + Z), a small but non-zero, rankable
exposure that never exceeds a declared long-lived asset's and self-adjusts to
any per-org horizon override, with no magic constant. Retention stays 0
(genuinely unknown); the assumed secrecy lifetime is surfaced in the finding
rationale so it is visible and contestable.

The Mosca math and the public API surface are unchanged; the fix is purely
additive scoring. Detection F1 = 1.000 benchmark and scan exit codes
unaffected. Docs: HNDL.md 4.1 + CHANGELOG. Action bundle rebuilt.
@leonacostaok
leonacostaok merged commit 1f4bfc4 into main Jul 27, 2026
14 checks passed
@leonacostaok
leonacostaok deleted the fix/hndl-unbound-exposure branch July 27, 2026 03:51
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