(
query: &str,
title: &str,
description: &str,
paths: Vec<ExfilPath>,
remediation: Vec<String>,
)
| 247 | } |
| 248 | |
| 249 | fn build_finding( |
| 250 | query: &str, |
| 251 | title: &str, |
| 252 | description: &str, |
| 253 | paths: Vec<ExfilPath>, |
| 254 | remediation: Vec<String>, |
| 255 | ) -> Finding { |
| 256 | let n = paths.len(); |
| 257 | Finding { |
| 258 | query: query.to_owned(), |
| 259 | title: title.to_owned(), |
| 260 | // Per-finding description prefixes the count with the category's |
| 261 | // canonical sentence so the audit string is self-describing. |
| 262 | description: format!("{description} ({n} path(s).)"), |
| 263 | paths: paths.into_iter().map(FindingPath::Exfil).collect(), |
| 264 | remediation, |
| 265 | accepted: false, |
| 266 | accepted_reason: String::new(), |
| 267 | } |
| 268 | } |
| 269 | |
| 270 | /// Run all queries (single entry point for end-to-end callers). |
| 271 | pub fn run_all_queries(model: &ReachabilityModel) -> Vec<Finding> { |
no test coverage detected