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

Function format_path_line

crates/openshell-prover/src/report.rs:51–72  ·  view source on GitHub ↗
(query: &str, p: &crate::finding::ExfilPath)

Source from the content-addressed store, hash-verified

49}
50
51fn format_path_line(query: &str, p: &crate::finding::ExfilPath) -> String {
52 let endpoint = format!("{}:{}", p.endpoint_host, p.endpoint_port);
53 match query {
54 category::LINK_LOCAL_REACH => {
55 format!("link_local_reach: {endpoint} via {}", p.binary)
56 }
57 category::L7_BYPASS_CREDENTIALED => {
58 format!("l7_bypass_credentialed: {endpoint} via {}", p.binary)
59 }
60 category::CREDENTIAL_REACH_EXPANSION => {
61 format!("credential_reach_expansion: {endpoint} via {}", p.binary)
62 }
63 category::CAPABILITY_EXPANSION => {
64 format!(
65 "capability_expansion: {method} on {endpoint} via {bin}",
66 method = p.method,
67 bin = p.binary
68 )
69 }
70 _ => format!("{query}: {endpoint} via {}", p.binary),
71 }
72}
73
74// ---------------------------------------------------------------------------
75// Compact output (CLI lint mode)

Callers 1

finding_shorthandFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected