Skip to content

Commit e1c7832

Browse files
authored
[ci] Use managed identity for API Scan (#1207)
I've configured a new [managed identity][0] (MSI) for API Scan, which allows us to enable a more modern authentication approach when running API Scan on the `MAUI-1ESPT` agent pool. A new `$(ApiScanMAUI1ESPTManagedId)` variable has been configured in the pipeline settings to pass the app ID for this MSI to the API Scan task. [0]: https://ms.portal.azure.com/#@microsoft.onmicrosoft.com/resource/subscriptions/cd4829e2-e38b-43d2-8316-2f2009f36f97/resourcegroups/1esobjects/providers/microsoft.managedidentity/userassignedidentities/maui1esptapiscanidentity/overview
1 parent 651de42 commit e1c7832

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

build-tools/automation/azure-pipelines.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,8 @@ jobs:
9999
dependsOn: windows_dotnet_build
100100
condition: and(eq(dependencies.windows_dotnet_build.result, 'Succeeded'), eq(variables['Build.SourceBranch'], '${{ parameters.ApiScanSourceBranch }}'))
101101
pool:
102-
name: Azure Pipelines
103-
vmImage: windows-2022
102+
name: MAUI-1ESPT
103+
demands: ImageOverride -equals 1ESPT-Windows2022
104104
timeoutInMinutes: 480
105105
workspace:
106106
clean: all
@@ -135,7 +135,7 @@ jobs:
135135
isLargeApp: true
136136
toolVersion: Latest
137137
env:
138-
AzureServicesAuthConnectionString: runAs=App;AppId=$(ApiScanClientId);TenantId=$(ApiScanTenant);AppKey=$(ApiScanSecret)
138+
AzureServicesAuthConnectionString: runAs=App;AppId=$(ApiScanMAUI1ESPTManagedId)
139139

140140
- task: SdtReport@2
141141
displayName: Guardian Export - Security Report

0 commit comments

Comments
 (0)