Skip to content

Commit

Permalink
feat: improves plain output with audit confidence (#119)
Browse files Browse the repository at this point in the history
  • Loading branch information
ubiratansoares authored Nov 4, 2024
1 parent ceed1e3 commit c4b20de
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/render.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,17 @@ pub(crate) fn render_findings(registry: &WorkflowRegistry, findings: &[Finding])

fn render_finding(registry: &WorkflowRegistry, finding: &Finding) {
let link = Link::new(finding.ident, &finding.url()).to_string();
let confidence = format!(
"audit confidence → {:?}",
&finding.determinations.confidence
);
let confidence_footer = Level::Note.title(&confidence);

let message = Level::from(&finding.determinations.severity)
.title(finding.desc)
.id(&link)
.snippets(finding_snippet(registry, finding));
.snippets(finding_snippet(registry, finding))
.footer(confidence_footer);

let renderer = Renderer::styled();
println!("{}", renderer.render(message));
Expand Down

0 comments on commit c4b20de

Please sign in to comment.