Skip to content

Commit

Permalink
fix: Updated plugin parsers to parse kdl format
Browse files Browse the repository at this point in the history
  • Loading branch information
devin-b-lake committed Jan 23, 2025
1 parent 9541362 commit be54221
Show file tree
Hide file tree
Showing 41 changed files with 2,945 additions and 153 deletions.
6 changes: 6 additions & 0 deletions Cargo.lock

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

7 changes: 7 additions & 0 deletions Exec.kdl
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
plugin {
backoff-interval 1000000
max-spawn-attempts 3
max-conn-attempts 5
jitter-percent 10
grpc-msg-buffer-size 10
}
63 changes: 63 additions & 0 deletions config/Binary.kdl
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
//###############################################################################
// Binary.kdl
//
// This configuration file defines known binary file formats (executables and
// precompiled objects) and their file extensions in order to identify non-
// source files included in repositories.
//
// -----------------------------------------------------------------------------
// References:
//
// https://en.wikipedia.org/wiki/List_of_file_formats#Object_code,_executable_files,_shared_and_dynamically_linked_libraries
//
// -----------------------------------------------------------------------------
//
// name - Name of the format in question.
// type - executable, object, combination, or nil
// extensions - An Array of associated extensions (the first is considered the
// primary extension; the others should be listed alphanumerically)
// notes - Optional, short text description of format. Useful if uncommon.
//
//###############################################################################

format {
format name="8BF" notes="Image editor plugins" type="executable" {
extensions "8bf" "8ba" "8bc" "8be" "8bi" "8bp" "8bs" "8by" "8li" "8ly"
}
format name="Objective C static library" type="object" {
extensions "a"
}
format name="Android Application Package" type="executable" {
extensions "apk" "apkm" "apks" "xapk"
}
format name="macOS Appplication Bundle" type="executable" {
extensions "app"
}
format name="Java class file" type="object" {
extensions "class"
}
format name="COM file" notes="DOS command file" type="executable" {
extensions "com"
}
format name="Dynamic-link library" notes="Microsoft shared library" type="object" {
extension "dll"
}
format name="Executable and Linkable Format" notes="Unix ELF" type="combination" {
extensions "elf" "axf" "bin" "o" "prx" "puff" "ko" "mod" "so"
}
format name="Microsoft Executable" type="executable" {
extensions "exe" "acm" "ax" "cpl" "drv" "efi" "mui" "ocx" "scr" "sys" "tsp"
}
format name="iOS App Store Package" type="executable" {
extensions "ipa"
}
format name="Java Archive" type="combination" {
extensions "jar" "ear" "war"
}
format name="XPInstall" notes="Mozilla Cross-Platform Install" type="executable" {
extensions "xpi"
}
format name="Mach-O" notes="Mach object file format, macOS/iOS" type="object" {
extensions "dylib" "bundle"
}
}
8 changes: 4 additions & 4 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 #rel("Binary.toml")
binary-file #rel("Binary.kdl")
binary-file-threshold 0
}
analysis "mitre/fuzz" policy="(eq #t $)"
Expand All @@ -31,7 +31,7 @@ analyze {

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

Expand All @@ -42,12 +42,12 @@ analyze {
}

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

0 comments on commit be54221

Please sign in to comment.