-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: get proper version from download manifest and spawn with canonic…
…al path Discovered a bug in the entry selection process from the plugin's download manifest, such that the desired version was not checked and the first entry with a matching arch was returned. Additionally, downloaded plugin.kdl files have entrypoints that are relative to the parent dir, but Hipcheck core does not change working directory for the process so we don't find the right plugin binary. This commit prepends the proper plugin cache dir to PATH when resolving the binary to execute so that the `git` plugin's `git` binary will be found before the actual version control software. This commit also passes entrypoint args properly to the plugin's Command object. Signed-off-by: jlanson <[email protected]>
- Loading branch information
Showing
7 changed files
with
132 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
plugins { | ||
plugin "mitre/activity" version="0.1.0" manifest="plugins/activity/local-plugin.kdl" | ||
plugin "mitre/affiliation" version="0.1.0" manifest="plugins/affiliation/local-plugin.kdl" | ||
plugin "mitre/binary" version="0.1.0" manifest="plugins/binary/local-plugin.kdl" | ||
plugin "mitre/churn" version="0.1.0" manifest="plugins/churn/local-plugin.kdl" | ||
plugin "mitre/entropy" version="0.1.0" manifest="plugins/entropy/local-plugin.kdl" | ||
plugin "mitre/fuzz" version="0.1.1" manifest="plugins/fuzz/local-plugin.kdl" | ||
plugin "mitre/review" version="0.1.0" manifest="plugins/review/local-plugin.kdl" | ||
plugin "mitre/typo" version="0.1.0" manifest="plugins/typo/local-plugin.kdl" | ||
} | ||
|
||
patch { | ||
plugin "mitre/github" { | ||
api-token-var "HC_GITHUB_TOKEN" | ||
} | ||
} | ||
|
||
analyze { | ||
investigate policy="(gt 0.5 $)" | ||
investigate-if-fail "mitre/typo" "mitre/binary" | ||
|
||
category "practices" { | ||
analysis "mitre/activity" policy="(lte $ P52w)" weight=3 | ||
analysis "mitre/binary" { | ||
binary-file "./config/Binary.toml" | ||
binary-file-threshold 0 | ||
} | ||
analysis "mitre/fuzz" policy="(eq #t $)" | ||
analysis "mitre/review" policy="(lte (divz (count (filter (eq #f) $)) (count $)) 0.05)" | ||
} | ||
|
||
category "attacks" { | ||
analysis "mitre/typo" { | ||
typo-file "./config/Typos.toml" | ||
count-threshold 0 | ||
} | ||
|
||
category "commit" { | ||
analysis "mitre/affiliation" { | ||
orgs-file "./plugins/affiliation/test/example_orgs.kdl" | ||
count-threshold 0 | ||
} | ||
|
||
analysis "mitre/entropy" policy="(eq 0 (count (filter (gt 8.0) $)))" { | ||
langs-file "./config/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" | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters