Stable identity key for a finding path. Deliberately excludes `policy_name`: two paths with identical (binary, endpoint, mechanism) are the same security gap whether they live in rule `foo` or rule `bar`. This keeps the delta from spuriously surfacing baseline gaps just because the proposal added a new rule name that produces the same gap shape.
(path: &FindingPath)
| 590 | /// keeps the delta from spuriously surfacing baseline gaps just because the |
| 591 | /// proposal added a new rule name that produces the same gap shape. |
| 592 | fn finding_path_key(path: &FindingPath) -> String { |
| 593 | let FindingPath::Exfil(p) = path; |
| 594 | // Include the category and (for capability_expansion) the method so |
| 595 | // adding a new method on an already-reached host surfaces as a new |
| 596 | // path; reuse of an existing method does not. |
| 597 | format!( |
| 598 | "exfil|{}|{}:{}|{}|{}", |
| 599 | p.binary, p.endpoint_host, p.endpoint_port, p.category, p.method |
| 600 | ) |
| 601 | } |
| 602 | |
| 603 | /// Return the merged-policy findings that aren't already present in the |
| 604 | /// baseline. Comparison is per-(query, path) so that a single finding whose |