| 49 | } |
| 50 | |
| 51 | fn 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) |