Check for Mach-O binaries in Binary Artifacts (#2000)

This commit is contained in:
Ethan Davis 2022-06-23 08:54:55 -07:00 committed by GitHub
parent e42af75660
commit 6a032a3019
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 0 deletions

View File

@ -65,6 +65,7 @@ var checkBinaryFileContent fileparser.DoWhileTrueOnFileContent = func(path strin
"elf": true, "elf": true,
"o": true, "o": true,
"so": true, "so": true,
"macho": true,
"iso": true, "iso": true,
"class": true, "class": true,
"jar": true, "jar": true,

View File

@ -41,6 +41,14 @@ func TestBinaryArtifacts(t *testing.T) {
}, },
expect: 1, expect: 1,
}, },
{
name: "Mach-O ARM64 executable",
err: nil,
files: []string{
"../testdata/binaryartifacts/executables/darwin-arm64-bt",
},
expect: 1,
},
{ {
name: "non binary file", name: "non binary file",
err: nil, err: nil,

Binary file not shown.