-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add statistics to JSON and YAML reports (#730)
* Add statistics to JSON and YAML reports Signed-off-by: egibs <[email protected]> * Add JSON stats test case Signed-off-by: egibs <[email protected]> * Avoid rendering empty stats object when running diffs Signed-off-by: egibs <[email protected]> * Use final report field instead Signed-off-by: egibs <[email protected]> --------- Signed-off-by: egibs <[email protected]>
- Loading branch information
Showing
18 changed files
with
263 additions
and
27 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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,113 @@ | ||
{ | ||
"Files": { | ||
"macOS/clean/ls": { | ||
"Path": "macOS/clean/ls", | ||
"SHA256": "461b7ef5288c9c4b0d10aefc9ca42f7ddab9954a3f3d032e3a783e3da0c970b6", | ||
"Size": 154352, | ||
"Syscalls": [ | ||
"getdents", | ||
"openat", | ||
"readlink" | ||
], | ||
"Pledge": [ | ||
"rpath" | ||
], | ||
"Behaviors": [ | ||
{ | ||
"Description": "binary contains hardcoded URL", | ||
"MatchStrings": [ | ||
"http://crl.apple.com/codesigning.crl0", | ||
"http://www.apple.com/DTDs/PropertyList", | ||
"http://www.apple.com/appleca/root.crl0", | ||
"https://www.apple.com/appleca/0" | ||
], | ||
"RiskScore": 1, | ||
"RiskLevel": "LOW", | ||
"RuleURL": "https://github.com/chainguard-dev/malcontent/blob/main/rules/c2/addr/url.yara#binary_with_url", | ||
"ID": "c2/addr/url", | ||
"RuleName": "binary_with_url" | ||
}, | ||
{ | ||
"Description": "Look up or override terminal settings", | ||
"MatchStrings": [ | ||
"TERM" | ||
], | ||
"RiskScore": 1, | ||
"RiskLevel": "LOW", | ||
"RuleURL": "https://github.com/chainguard-dev/malcontent/blob/main/rules/exec/shell/TERM.yara#TERM", | ||
"ReferenceURL": "https://www.gnu.org/software/gettext/manual/html_node/The-TERM-variable.html", | ||
"ID": "exec/shell/TERM", | ||
"RuleName": "TERM" | ||
}, | ||
{ | ||
"Description": "traverse filesystem hierarchy", | ||
"MatchStrings": [ | ||
"_fts_children", | ||
"_fts_close", | ||
"_fts_open", | ||
"_fts_read", | ||
"_fts_set" | ||
], | ||
"RiskScore": 1, | ||
"RiskLevel": "LOW", | ||
"RuleURL": "https://github.com/chainguard-dev/malcontent/blob/main/rules/fs/directory/directory-traverse.yara#fts", | ||
"ID": "fs/directory/traverse", | ||
"RuleName": "fts" | ||
}, | ||
{ | ||
"Description": "read value of a symbolic link", | ||
"MatchStrings": [ | ||
"readlink" | ||
], | ||
"RiskScore": 1, | ||
"RiskLevel": "LOW", | ||
"RuleURL": "https://github.com/chainguard-dev/malcontent/blob/main/rules/fs/link-read.yara#readlink", | ||
"ReferenceURL": "https://man7.org/linux/man-pages/man2/readlink.2.html", | ||
"ID": "fs/link_read", | ||
"RuleName": "readlink" | ||
} | ||
], | ||
"RiskScore": 1, | ||
"RiskLevel": "LOW" | ||
} | ||
}, | ||
"Stats": { | ||
"PkgStats": [ | ||
{ | ||
"Count": 1, | ||
"Key": "c2/addr/url", | ||
"Total": 4, | ||
"Value": 25 | ||
}, | ||
{ | ||
"Count": 1, | ||
"Key": "exec/shell/TERM", | ||
"Total": 4, | ||
"Value": 25 | ||
}, | ||
{ | ||
"Count": 1, | ||
"Key": "fs/directory/traverse", | ||
"Total": 4, | ||
"Value": 25 | ||
}, | ||
{ | ||
"Count": 1, | ||
"Key": "fs/link_read", | ||
"Total": 4, | ||
"Value": 25 | ||
} | ||
], | ||
"ProcessedFiles": 1, | ||
"RiskStats": [ | ||
{ | ||
"Count": 1, | ||
"Key": 1, | ||
"Total": 1, | ||
"Value": 100 | ||
} | ||
], | ||
"TotalBehaviors": 4, | ||
"TotalRisks": 1 | ||
} | ||
} |
Oops, something went wrong.