The abort profile is also the one setting your tests can't catch. Cargo ignores the panic setting for tests and benchmarks, because the test harness needs unwinding, so a test that panics inside a rule and checks that the scan continues will still pass after someone adds panic = "abort" to the size profile. A compile-time guard closes that gap: put #[cfg(panic = "abort")] compile_error!("rule isolation needs panic = unwind"); next to the dispatch, and the build that would break isolation fails instead of shipping.
I'd also put the skipped rule in the report, not only in the log. For a cost tool, a missing finding reads as no waste found, so a line saying rule 57 panicked on that EBS volume tells the reader which part of the account the report didn't check.
The guard is in the app; it just wasn't in the article. Worth saying why it has to be a compile-time check rather than a test: Cargo builds test and bench targets with unwinding no matter what the profile says, because libtest needs to catch the panic to report the failure. So a test that asserts the scan survives a panicking rule passes even in a tree where a profile sets panic = "abort" and every guard is inert. The build is the only place that mistake is visible.
The visibility point is the one I would push further than you did. It isn't really a logging decision; it's about what the customer can conclude from the report. They're looking at a cost report to decide what to turn off. If rule 57 died on one EBS volume and all they see is no EBS finding, they conclude that volume is fine and move on. The report has quietly told them something false. A line naming the check and the resource turns that into a known gap they can act on, and for an air-gapped customer who can't just ask us, it's the difference between an incomplete answer and a wrong one.
The report can make that gap hard to miss by putting the denominator at the top: 91 of 92 rules completed. A clean-looking page with one rule missing then never reads as a full scan. If anyone consumes the output in a script or a pipeline, I'd also give a partial scan its own exit status rather than the clean one, so automation that only checks the exit code can't record it as nothing found.
The abort profile is also the one setting your tests can't catch. Cargo ignores the panic setting for tests and benchmarks, because the test harness needs unwinding, so a test that panics inside a rule and checks that the scan continues will still pass after someone adds panic = "abort" to the size profile. A compile-time guard closes that gap: put
#[cfg(panic = "abort")] compile_error!("rule isolation needs panic = unwind");next to the dispatch, and the build that would break isolation fails instead of shipping.I'd also put the skipped rule in the report, not only in the log. For a cost tool, a missing finding reads as no waste found, so a line saying rule 57 panicked on that EBS volume tells the reader which part of the account the report didn't check.