Skip to content

Feature/azdo#1371

Open
SebastianClaesson wants to merge 64 commits intomaester365:mainfrom
SebastianClaesson:feature/azdo
Open

Feature/azdo#1371
SebastianClaesson wants to merge 64 commits intomaester365:mainfrom
SebastianClaesson:feature/azdo

Conversation

@SebastianClaesson
Copy link
Contributor

Description

Fixes #1368

Adding 31 Azure DevOps security tests.
Each of the tests is added to the new folder azdo in maester\public\maester

All of the tests have a markdown file, with :

  • Rationale
  • Remediation action
  • Related links (Official links / blog posts describing the security issue)

Contribution Checklist

Before submitting this PR, please confirm you have completed the following:

  • 📖 Read the guidelines for contributing to this repository.
  • 🧪 Ensure the build and unit tests pass by running /powershell/tests/pester.ps1 on your local system.

@SebastianClaesson SebastianClaesson requested review from a team as code owners December 11, 2025 08:06
@SamErde SamErde requested a review from Copilot January 21, 2026 11:19
@SamErde SamErde added enhancement New feature or request maester-test Related to a Maester test labels Jan 21, 2026
3. Select Policies, locate the Request Access policy and toggle it to off.
4. Provide the URL to your internal process for gaining access. Users see this URL in the error report when they try to access the organization or a project within the organization that they don't have permission to access.

**Results:**
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't the detailed 401 go to users in the organization and the 404 go to users not in the organization?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do agree!
Seems the experience has changed since;

MicrosoftDocs/azure-devops-docs@91c4410#diff-a28e8dd823f1493651d0c6322e6b2dd976bccab79e279de5aea876ce20272729R44

I'll update with the new information the article.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request adds 31 Azure DevOps security tests to the Maester project, providing comprehensive security assessments for Azure DevOps organizations. Each test includes both PowerShell implementation and markdown documentation describing the security rationale and remediation steps.

Changes:

  • Added 31 new Azure DevOps security test functions covering authentication, access control, pipeline security, and resource management
  • Created comprehensive markdown documentation for each test with remediation guidance
  • Updated the module manifest to export all new test functions
  • Added a test runner file that orchestrates all Azure DevOps security tests

Reviewed changes

Copilot reviewed 65 out of 65 changed files in this pull request and generated 28 comments.

Show a summary per file
File Description
tests/Maester/Azdo/Test-Azdo.Tests.ps1 Test runner that executes all 31 Azure DevOps security tests
tests/Maester/Azdo/README.md Overview documentation for Azure DevOps tests
powershell/public/maester/azdo/*.ps1 31 PowerShell functions implementing security checks
powershell/public/maester/azdo/*.md 31 markdown documentation files with rationale and remediation steps
powershell/Maester.psd1 Module manifest updated to export new functions

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Corrected typos and formatting in the documentation.
Removed unnecessary commas and spaces. Added line breaks for MD linting.
Corrected grammatical errors and added punctuation for clarity.
Updated description to clarify the function's purpose and improve readability.
Corrected grammatical errors and improved clarity in remediation instructions.
Clarified the purpose of the Azure DevOps tests and updated the reference link.
…thorizationScopeNonReleasePipeline.ps1

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@SamErde
Copy link
Contributor

SamErde commented Feb 18, 2026

Sorry for all of the comments! This is awesome work!

@SebastianClaesson
Copy link
Contributor Author

@SebastianClaesson this is top notch work! Love it.

I would suggest two additions.

  1. Add doc - Update the installation doc to include the optinal module to install and the command for connecting website/docs/installation.md . See https://maester.dev/docs/installation#optional-modules-and-permissions
  2. Add a blog post that outlines that calls out the new tests to website/blog See https://maester.dev/blog

Thank you @merill , I'll add the docs and a blog post to showcase / outline the new tests!

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 68 out of 68 changed files in this pull request and generated 12 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +38 to +41
if ($Member.subjectKind -eq 'group') {
Write-Verbose "Finding members in group '$($Member.DisplayName)' - Descriptor '$($_.Descriptor)'"
Get-ADOPSMembership -Descriptor $Member.descriptor -Direction 'down' | Foreach-object {
Write-Verbose "Processing member '$($_.DisplayName)' - Descriptor '$($_.Descriptor)'"
Copy link

Copilot AI Feb 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inside Get-NestedAdoMembership, the first Write-Verbose message references $($_.Descriptor) even though $_ isn’t set in that scope; this will log an empty/incorrect descriptor. Use $Member.Descriptor there to match the rest of the function.

Copilot uses AI. Check for mistakes.
Checks the status of when you sign in to the web portal of a Microsoft Entra ID-backed organization,
Microsoft Entra ID always performs validation for any Conditional Access Policies (CAPs) set by tenant administrators.

https://learn.microsoft.com/en-us/azure/devops/organizations/audit/auditing-streaming?view=azure-devops
Copy link

Copilot AI Feb 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment header link in the description points to audit streaming (.../audit/auditing-streaming...) which doesn’t match this test’s purpose (Conditional Access enforcement). Updating it to the Conditional Access policy documentation would avoid confusing users reading the help.

Suggested change
https://learn.microsoft.com/en-us/azure/devops/organizations/audit/auditing-streaming?view=azure-devops
https://learn.microsoft.com/en-us/azure/devops/organizations/accounts/manage-conditional-access?view=azure-devops&tabs=preview-page

Copilot uses AI. Check for mistakes.
Comment on lines +44 to +48
$data = @'
Prevent pipelines from making secrets available to fork builds is set to '{0}'\
Prevent pipelines from making fork builds have the same permissions as regular builds is set to '{1}'\
Require a team member's comment before building a pull request is set to '{2}' ({3})
'@ -f $settings.enforceNoAccessToSecretsFromForks, $settings.enforceJobAuthScopeForForks, $settings.isCommentRequiredForPullRequest, $AdditionalInfo
Copy link

Copilot AI Feb 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The here-string includes trailing backslashes at the end of lines, which will be emitted literally in the result output (they don’t act as line continuations inside a here-string). If the intent is multiline formatting, remove the trailing \ characters and rely on the here-string newlines (or build the string with explicit newlines).

Copilot uses AI. Check for mistakes.
@SamErde
Copy link
Contributor

SamErde commented Feb 24, 2026

@copilot open a new pull request to apply changes based on the comments in this thread

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request maester-test Related to a Maester test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🙏 Azure DevOps tests

4 participants