MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / finding_path_key

Function finding_path_key

crates/openshell-server/src/grpc/policy.rs:592–601  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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.
592fn 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

Callers 1

finding_deltaFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected