Skip to content

Commit

Permalink
update threatcheck.yml name
Browse files Browse the repository at this point in the history
  • Loading branch information
checkymander committed Feb 16, 2024
1 parent a5a8011 commit f3212fe
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/threatcheck.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
name: Agent Builds
name: Check Against Defender

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

# on:
# schedule:
# - cron: "0 13 * * 1"

jobs:

build:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ public class AmsiTests
[TestMethod]
public void ScanFiles()
{
//Can't be run with github actions
bool malicious = false;
string parent_dir = Directory.GetParent(Directory.GetCurrentDirectory()).Parent.Parent.Parent.Parent.FullName; //How deep does the rabbit hole go?
foreach (string file in Directory.EnumerateFiles(parent_dir, "*.dll*", SearchOption.AllDirectories))
Expand All @@ -31,8 +32,10 @@ public void ScanFiles()
{
if (!amsi.RealTimeProtectionEnabled)
{
//Default pass the test if real-time protection is not enabled (Github Actions has this disabled.)
Console.WriteLine("Ensure real-time protection is enabled");
malicious = true;
malicious = false;
break;
}

amsi.AnalyzeBytes(b);
Expand Down

0 comments on commit f3212fe

Please sign in to comment.