maester icon indicating copy to clipboard operation
maester copied to clipboard

🪲Not connecting to Security & Compliance via GitHub Action

Open LarsDeGraaf opened this issue 3 months ago • 1 comments

Thanks for reporting the bug. Please ensure you've gone through the following checklist before opening an issue:

  • Make sure you can reproduce this issue using the latest released version of Maester.
  • Please search the existing issues to see if there has been a similar issue filed.

Describe the bug

I configured Maester to run in GitHub with a GitHub Action. I configured it step by step like the tutorial. It skips around 50 tests, almost all of them with the following error:

Skipped. Not connected to Security & Compliance. See Connecting to Security & Compliance

In the main.yaml I changed the following parameters from false to true:

  • include_exchange: true
  • include_teams: true

I can't find anything regarding Security & Compliance over there.

I gave the app registration the permissions like in the tutorial.: https://maester.dev/docs/monitoring/github

To Reproduce

Run the GitHub Action.

Expected behavior

Run all of the tests.

Debug Output

Run maester365/maester-action@main
Run echo "NOW=$(date +'%Y-%m-%d-T%H%M%S')" >> $GITHUB_ENV
Run azure/login@v2
Running Azure CLI Login.
/usr/bin/az cloud set -n azurecloud
Done setting cloud: "azurecloud"
Federated token details:
 issuer - https://token.actions.githubusercontent.com/
 subject claim - repo:<COMPANY-NAME>/maester-security-tests:ref:refs/heads/main
 audience - api://AzureADTokenExchange
 job_workflow_ref - <COMPANY-NAME>/maester-security-tests/.github/workflows/main.yml@refs/heads/main
Attempting Azure CLI login by using OIDC...
Azure CLI login succeeds by using OIDC.
Run /home/runner/work/_actions/maester365/maester-action/main\script\Run-MaesterAction.ps1 `
🔥 Maester Github Action 🔥 requested module: latest
WARNING: The version '2.30.0' of module 'Microsoft.Graph.Authentication' is currently in use. Retry the operation after closing the applications.
WARNING: The version '5.7.1' of module 'Pester' is currently in use. Retry the operation after closing the applications.
📃 Installed Maester version: 1.3.0
Maester tests installed successfully!
Run Connect-Maester to sign in and then run Invoke-Maester to start testing.
📃 Using provided path: /home/runner/work/maester-security-tests/maester-security-tests
✔️ Graph connected
✔️ Exchange Online connected.
VERBOSE: Performing the operation "Connect-MicrosoftTeams" on target "Establishing a PowerShell session connected to the environment.".

✔️ Microsoft Teams connected.
📃 Pester verbosity level set to: None
🕑 Start test execution 2025-09-29 07:35:49
WARNING: Skipping eligible roles as required Graph permission 'RoleEligibilitySchedule.ReadWrite.Directory' was not present.
🔥 Maester test report generated at test-results/test-results.html

Tests Passed ✅: 145, Failed ❌: 85, Skipped ⚫: 49

Module Version

I don't know how to do this within an GitHub Action.

Environment Data

I don't know how to do this within an GitHub Action.

LarsDeGraaf avatar Sep 29 '25 08:09 LarsDeGraaf

Any information on this? Is Security & Compliance even supported from a GitHub action?

LarsDeGraaf avatar Oct 09 '25 06:10 LarsDeGraaf