Skip to content

Commit

Permalink
feat: add rule kind to metadata output
Browse files Browse the repository at this point in the history
  • Loading branch information
alexkornitzer committed Jul 5, 2022
1 parent f124c82 commit 050feca
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,7 @@ pub fn print_detections(
if metadata {
let mut table = Table::new();
table.add_row(Row::new(vec![
cell!("").style_spec("c"),
cell!("name").style_spec("c"),
cell!("authors").style_spec("c"),
cell!("level").style_spec("c"),
Expand All @@ -317,6 +318,7 @@ pub fn print_detections(
match rule {
Rule::Chainsaw(c) => {
table.add_row(Row::new(vec![
cell!('c'),
cell!(split_tag(&c.name)),
cell!(c.authors.join("\n")),
cell!(c.level),
Expand All @@ -325,6 +327,7 @@ pub fn print_detections(
}
Rule::Sigma(s) => {
table.add_row(Row::new(vec![
cell!('σ'),
cell!(split_tag(&s.name)),
cell!(s.authors.join("\n")),
cell!(s.level),
Expand Down

0 comments on commit 050feca

Please sign in to comment.