Skip to content

Commit

Permalink
feat: added #rel macro to allow expressing paths relative to policy f…
Browse files Browse the repository at this point in the history
…ile location

Signed-off-by: jlanson <[email protected]>
  • Loading branch information
j-lanson committed Jan 7, 2025
1 parent 476917c commit db4d392
Show file tree
Hide file tree
Showing 11 changed files with 364 additions and 336 deletions.
123 changes: 111 additions & 12 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions config/Hipcheck.kdl
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ analyze {
category "practices" {
analysis "mitre/activity" policy="(lte $ P52w)" weight=3
analysis "mitre/binary" {
binary-file "./config/Binary.toml"
binary-file #rel("Binary.toml")
binary-file-threshold 0
}
analysis "mitre/fuzz" policy="(eq #t $)"
Expand All @@ -31,23 +31,23 @@ analyze {

category "attacks" {
analysis "mitre/typo" {
typo-file "./config/Typos.toml"
typo-file #rel("Typos.toml")
count-threshold 0
}

category "commit" {
analysis "mitre/affiliation" {
orgs-file "./plugins/affiliation/test/example_orgs.kdl"
orgs-file #rel("Orgs.kdl")
count-threshold 0
}

analysis "mitre/entropy" policy="(eq 0 (count (filter (gt 8.0) $)))" {
langs-file "./config/Langs.toml"
langs-file #rel("Langs.toml")
entropy-threshold 10.0
commit-percentage 0.0
}
analysis "mitre/churn" policy="(lte (divz (count (filter (gt 3) $)) (count $)) 0.02)" {
langs-file "./config/Langs.toml"
langs-file #rel("Langs.toml")
}
}
}
Expand Down
Loading

0 comments on commit db4d392

Please sign in to comment.