Merged
Conversation
… fix existing test logic New tests: - AZDO.1037: Restrict PAT creation at organization level - AZDO.1038: Block extensions from accessing local network resources (SSRF) Fixes: - Corrected return values and result messages for ExternalGuestAccess, SSHAuthentication, and ThirdPartyAccessViaOauth tests - Added (Tenant)/(Organization) scope labels to AZDO.1032-1038
Up to standards ✅🟢 Issues
|
Contributor
There was a problem hiding this comment.
Pull request overview
Adds additional Azure DevOps security posture coverage and corrects pass/fail semantics in existing AZDO tests so that “secure configuration” consistently returns $true.
Changes:
- Fixes return logic / message polarity in
Test-AzdoThirdPartyAccessViaOauth,Test-AzdoSSHAuthentication, andTest-AzdoExternalGuestAccess(and updates Pester assertions accordingly). - Adds two new organization-scope tests: restricting PAT creation (AZDO.1037) and preventing extension local-network access (AZDO.1038).
- Updates
maester-config.jsontitles (adds scope labels) and exports the new cmdlets via the module manifest.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/Maester/AzureDevOps/Test-Azdo.Tests.ps1 | Updates expected booleans for fixed tests; adds AZDO.1037/1038; adds scope labels to AZDO.1032–1036. |
| tests/maester-config.json | Adds entries for AZDO.1037/1038 and updates AZDO.1032–1036 titles with scope labels. |
| powershell/public/maester/azuredevops/Test-AzdoThirdPartyAccessViaOauth.ps1 | Fixes result message polarity to match the returned boolean. |
| powershell/public/maester/azuredevops/Test-AzdoSSHAuthentication.ps1 | Uses .value and corrects message polarity for the SSH policy result. |
| powershell/public/maester/azuredevops/Test-AzdoExternalGuestAccess.ps1 | Fixes inverted return value and improves result messaging/grammar. |
| powershell/public/maester/azuredevops/Test-AzdoDisablePATCreation.ps1 | New org-scope policy test for restricting PAT creation (AZDO.1037). |
| powershell/public/maester/azuredevops/Test-AzdoDisablePATCreation.md | Documentation/remediation guidance for AZDO.1037. |
| powershell/public/maester/azuredevops/Test-AzdoAllowExtensionsLocalNetworkAccess.ps1 | New org-scope policy test for extension local-network access (AZDO.1038). |
| powershell/public/maester/azuredevops/Test-AzdoAllowExtensionsLocalNetworkAccess.md | Documentation/remediation guidance for AZDO.1038. |
| powershell/Maester.psd1 | Exports the two new Test-Azdo* functions. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Fix "restrict ... to access" -> "restrict ... from accessing" grammar in AZDO.1000 test and ThirdPartyAccessViaOauth result messages - Rename AZDO.1038 title from "Allow" to "Disallow" to reflect the expected secure configuration - Sort module manifest exports alphabetically
merill
approved these changes
Apr 13, 2026
Contributor
merill
left a comment
There was a problem hiding this comment.
This is great. Thanks @SebastianClaesson!
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR adds two new Azure DevOps tests and fixes return logic in three existing tests.
New tests:
Bug fixes:
Other changes:
Contribution Checklist
Before submitting this PR, please confirm you have completed the following:
/powershell/tests/pester.ps1on your local system.