microsoft / security-devops-action

Microsoft Security DevOps for GitHub Actions.
MIT License
97 stars 44 forks source link

Cannot use action on self-hosted Runner #81

Closed agsonsmith closed 7 months ago

agsonsmith commented 8 months ago

We have a fleet of self-hosted Runners running as containers. We have a minimal windows image (windows server core ltsc 2022) and only install what we need. We have tried to use the security-devops-action Action and encounter the following issue:

When running AntiMalware 1.7.0 we encounter the following error:

The tool path for AntiMalware could not be found. ArgumentNullException: Value cannot be null

When we run the exact same workflow on a GitHub-hosted Runner - it works perfectly.

What software are we missing on the self-hosted Runner in order for the action to work?

dotpaul commented 8 months ago

Hi @agsonsmith, it runs Windows Defender. Specifically it's looking for the path in "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Defender", and failing that, "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft Antimalware"