Skip to main content
Version: 2.2.1-preview

Test-AzdoOrganizationCodeSecurityScanning

SYNOPSIS

Returns a boolean depending on the configuration.

SYNTAX

Test-AzdoOrganizationCodeSecurityScanning [-ProgressAction <ActionPreference>] [<CommonParameters>]

DESCRIPTION

Checks if every Git repository with the GitHub Code Security plan enabled also has dependency alerts and CodeQL alerts turned on.

'Dependency alerts' and 'CodeQL alerts' are the Code Security features found under Options for the Code Security plan. Enabling the plan without them leaves the repository licensed but unscanned.

Per feature properties are only returned by api-version 7.2-preview.3 of the Advanced Security org enablement API, so this test calls the endpoint directly instead of using Get-ADOPSOrganizationAdvancedSecurity.

Requires membership of the 'Project Collection Administrators' group or the 'Advanced Security: manage settings' permission set to Allow.

https://learn.microsoft.com/azure/devops/repos/security/configure-github-advanced-security-features?view=azure-devops#set-up-code-scanning

EXAMPLES

EXAMPLE 1

Test-AzdoOrganizationCodeSecurityScanning

Returns a boolean depending on the configuration.

PARAMETERS

-ProgressAction

Determines how PowerShell responds to progress updates generated by a script, cmdlet, or provider, such as the progress bars generated by Write-Progress.

Type: ActionPreference
Parameter Sets: (All)
Aliases: proga

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

OUTPUTS

System.Boolean

NOTES

https://maester.dev/docs/commands/Test-AzdoOrganizationCodeSecurityScanning