Skip to content

Commit 7edba26

Browse files
author
Mirroring
committed
Merge commit 'e49bbfbb49f98587b8bf26356b89157fb81d3807'
2 parents b9bbf9a + e49bbfb commit 7edba26

18 files changed

+62
-57
lines changed

eng/Version.Details.xml

+6-6
Original file line numberDiff line numberDiff line change
@@ -56,17 +56,17 @@
5656
</Dependency>
5757
</ProductDependencies>
5858
<ToolsetDependencies>
59-
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="8.0.0-beta.24360.5">
59+
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="8.0.0-beta.24426.2">
6060
<Uri>https://github.com/dotnet/arcade</Uri>
61-
<Sha>c9efa535175049eb9cba06cae1f8c3d5dbe768a9</Sha>
61+
<Sha>80264e60280e2815e7d65871081ccac04a32445c</Sha>
6262
</Dependency>
63-
<Dependency Name="Microsoft.DotNet.Build.Tasks.Templating" Version="8.0.0-beta.24360.5">
63+
<Dependency Name="Microsoft.DotNet.Build.Tasks.Templating" Version="8.0.0-beta.24426.2">
6464
<Uri>https://github.com/dotnet/arcade</Uri>
65-
<Sha>c9efa535175049eb9cba06cae1f8c3d5dbe768a9</Sha>
65+
<Sha>80264e60280e2815e7d65871081ccac04a32445c</Sha>
6666
</Dependency>
67-
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="8.0.0-beta.24360.5">
67+
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="8.0.0-beta.24426.2">
6868
<Uri>https://github.com/dotnet/arcade</Uri>
69-
<Sha>c9efa535175049eb9cba06cae1f8c3d5dbe768a9</Sha>
69+
<Sha>80264e60280e2815e7d65871081ccac04a32445c</Sha>
7070
</Dependency>
7171
</ToolsetDependencies>
7272
</Dependencies>

eng/Versions.props

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
<MicrosoftNETCoreBrowserDebugHostTransportVersion>8.0.9-servicing.24415.9</MicrosoftNETCoreBrowserDebugHostTransportVersion>
3333
</PropertyGroup>
3434
<PropertyGroup Label="Dependencies from dotnet/arcade">
35-
<MicrosoftDotNetBuildTasksTemplatingVersion>8.0.0-beta.24360.5</MicrosoftDotNetBuildTasksTemplatingVersion>
35+
<MicrosoftDotNetBuildTasksTemplatingVersion>8.0.0-beta.24426.2</MicrosoftDotNetBuildTasksTemplatingVersion>
3636
</PropertyGroup>
3737
<PropertyGroup Label="Other dependencies">
3838
<!-- NB: This version affects Visual Studio compatibility. See https://learn.microsoft.com/visualstudio/extensibility/roslyn-version-support -->

eng/common/sdl/NuGet.config

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
</solution>
66
<packageSources>
77
<clear />
8-
<add key="guardian" value="https://securitytools.pkgs.visualstudio.com/_packaging/Guardian/nuget/v3/index.json" />
8+
<add key="guardian" value="https://pkgs.dev.azure.com/dnceng/_packaging/Guardian1ESPTUpstreamOrgFeed/nuget/v3/index.json" />
99
</packageSources>
1010
<packageSourceMapping>
1111
<packageSource key="guardian">
12-
<package pattern="microsoft.guardian.cli" />
12+
<package pattern="Microsoft.Guardian.Cli.win-x64" />
1313
</packageSource>
1414
</packageSourceMapping>
1515
<disabledPackageSources>

eng/common/sdl/execute-all-sdl-tools.ps1

+1-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ Param(
66
[string] $BranchName=$env:BUILD_SOURCEBRANCH, # Optional: name of branch or version of gdn settings; defaults to master
77
[string] $SourceDirectory=$env:BUILD_SOURCESDIRECTORY, # Required: the directory where source files are located
88
[string] $ArtifactsDirectory = (Join-Path $env:BUILD_ARTIFACTSTAGINGDIRECTORY ('artifacts')), # Required: the directory where build artifacts are located
9-
[string] $AzureDevOpsAccessToken, # Required: access token for dnceng; should be provided via KeyVault
109

1110
# Optional: list of SDL tools to run on source code. See 'configure-sdl-tool.ps1' for tools list
1211
# format.
@@ -75,7 +74,7 @@ try {
7574
}
7675

7776
Exec-BlockVerbosely {
78-
& $(Join-Path $PSScriptRoot 'init-sdl.ps1') -GuardianCliLocation $guardianCliLocation -Repository $RepoName -BranchName $BranchName -WorkingDirectory $workingDirectory -AzureDevOpsAccessToken $AzureDevOpsAccessToken -GuardianLoggerLevel $GuardianLoggerLevel
77+
& $(Join-Path $PSScriptRoot 'init-sdl.ps1') -GuardianCliLocation $guardianCliLocation -Repository $RepoName -BranchName $BranchName -WorkingDirectory $workingDirectory -GuardianLoggerLevel $GuardianLoggerLevel
7978
}
8079
$gdnFolder = Join-Path $workingDirectory '.gdn'
8180

@@ -104,7 +103,6 @@ try {
104103
-TargetDirectory $targetDirectory `
105104
-GdnFolder $gdnFolder `
106105
-ToolsList $tools `
107-
-AzureDevOpsAccessToken $AzureDevOpsAccessToken `
108106
-GuardianLoggerLevel $GuardianLoggerLevel `
109107
-CrScanAdditionalRunConfigParams $CrScanAdditionalRunConfigParams `
110108
-PoliCheckAdditionalRunConfigParams $PoliCheckAdditionalRunConfigParams `

eng/common/sdl/init-sdl.ps1

-8
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ Param(
33
[string] $Repository,
44
[string] $BranchName='master',
55
[string] $WorkingDirectory,
6-
[string] $AzureDevOpsAccessToken,
76
[string] $GuardianLoggerLevel='Standard'
87
)
98

@@ -21,14 +20,7 @@ $ci = $true
2120
# Don't display the console progress UI - it's a huge perf hit
2221
$ProgressPreference = 'SilentlyContinue'
2322

24-
# Construct basic auth from AzDO access token; construct URI to the repository's gdn folder stored in that repository; construct location of zip file
25-
$encodedPat = [Convert]::ToBase64String([System.Text.Encoding]::ASCII.GetBytes(":$AzureDevOpsAccessToken"))
26-
$escapedRepository = [Uri]::EscapeDataString("/$Repository/$BranchName/.gdn")
27-
$uri = "https://dev.azure.com/dnceng/internal/_apis/git/repositories/sdl-tool-cfg/Items?path=$escapedRepository&versionDescriptor[versionOptions]=0&`$format=zip&api-version=5.0"
28-
$zipFile = "$WorkingDirectory/gdn.zip"
29-
3023
Add-Type -AssemblyName System.IO.Compression.FileSystem
31-
$gdnFolder = (Join-Path $WorkingDirectory '.gdn')
3224

3325
try {
3426
# if the folder does not exist, we'll do a guardian init and push it to the remote repository

eng/common/sdl/sdl.ps1

+3-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ function Install-Gdn {
44
[Parameter(Mandatory=$true)]
55
[string]$Path,
66

7+
[string]$Source = "https://pkgs.dev.azure.com/dnceng/_packaging/Guardian1ESPTUpstreamOrgFeed/nuget/v3/index.json",
8+
79
# If omitted, install the latest version of Guardian, otherwise install that specific version.
810
[string]$Version
911
)
@@ -19,7 +21,7 @@ function Install-Gdn {
1921
$ci = $true
2022
. $PSScriptRoot\..\tools.ps1
2123

22-
$argumentList = @("install", "Microsoft.Guardian.Cli", "-Source https://securitytools.pkgs.visualstudio.com/_packaging/Guardian/nuget/v3/index.json", "-OutputDirectory $Path", "-NonInteractive", "-NoCache")
24+
$argumentList = @("install", "Microsoft.Guardian.Cli.win-x64", "-Source $Source", "-OutputDirectory $Path", "-NonInteractive", "-NoCache")
2325

2426
if ($Version) {
2527
$argumentList += "-Version $Version"

eng/common/templates-official/job/publish-build-assets.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ jobs:
149149
scriptPath: $(Build.SourcesDirectory)/eng/common/post-build/publish-using-darc.ps1
150150
arguments: -BuildId $(BARBuildId)
151151
-PublishingInfraVersion 3
152-
-AzdoToken '$(publishing-dnceng-devdiv-code-r-build-re)'
152+
-AzdoToken '$(System.AccessToken)'
153153
-WaitPublishingFinish true
154154
-ArtifactsPublishingAdditionalParameters '${{ parameters.artifactsPublishingAdditionalParameters }}'
155155
-SymbolPublishingAdditionalParameters '${{ parameters.symbolPublishingAdditionalParameters }}'

eng/common/templates-official/post-build/post-build.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ stages:
281281
scriptPath: $(Build.SourcesDirectory)/eng/common/post-build/publish-using-darc.ps1
282282
arguments: -BuildId $(BARBuildId)
283283
-PublishingInfraVersion ${{ parameters.publishingInfraVersion }}
284-
-AzdoToken '$(publishing-dnceng-devdiv-code-r-build-re)'
284+
-AzdoToken '$(System.AccessToken)'
285285
-WaitPublishingFinish true
286286
-ArtifactsPublishingAdditionalParameters '${{ parameters.artifactsPublishingAdditionalParameters }}'
287287
-SymbolPublishingAdditionalParameters '${{ parameters.symbolPublishingAdditionalParameters }}'

eng/common/templates-official/steps/execute-sdl.yml

-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ parameters:
99

1010
steps:
1111
- task: NuGetAuthenticate@1
12-
inputs:
13-
nuGetServiceConnections: GuardianConnect
1412

1513
- task: NuGetToolInstaller@1
1614
displayName: 'Install NuGet.exe'

eng/common/templates-official/steps/get-delegation-sas.yml

+5-10
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,12 @@ steps:
2828
# Calculate the expiration of the SAS token and convert to UTC
2929
$expiry = (Get-Date).AddHours(${{ parameters.expiryInHours }}).ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ssZ")
3030
31-
# Temporarily work around a helix issue where SAS tokens with / in them will cause incorrect downloads
32-
# of correlation payloads.
33-
$sas = ""
34-
do {
35-
$sas = az storage container generate-sas --account-name ${{ parameters.storageAccount }} --name ${{ parameters.container }} --permissions ${{ parameters.permissions }} --expiry $expiry --auth-mode login --as-user -o tsv
31+
$sas = az storage container generate-sas --account-name ${{ parameters.storageAccount }} --name ${{ parameters.container }} --permissions ${{ parameters.permissions }} --expiry $expiry --auth-mode login --as-user -o tsv
3632
37-
if ($LASTEXITCODE -ne 0) {
38-
Write-Error "Failed to generate SAS token."
39-
exit 1
40-
}
41-
} while($sas.IndexOf('/') -ne -1)
33+
if ($LASTEXITCODE -ne 0) {
34+
Write-Error "Failed to generate SAS token."
35+
exit 1
36+
}
4237
4338
if ('${{ parameters.base64Encode }}' -eq 'true') {
4439
$sas = [Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes($sas))

eng/common/templates-official/steps/get-federated-access-token.yml

+13-1
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,29 @@ parameters:
33
type: string
44
- name: outputVariableName
55
type: string
6+
- name: stepName
7+
type: string
8+
default: 'getFederatedAccessToken'
9+
- name: condition
10+
type: string
11+
default: ''
612
# Resource to get a token for. Common values include:
713
# - '499b84ac-1321-427f-aa17-267ca6975798' for Azure DevOps
814
# - 'https://storage.azure.com/' for storage
915
# Defaults to Azure DevOps
1016
- name: resource
1117
type: string
1218
default: '499b84ac-1321-427f-aa17-267ca6975798'
19+
- name: isStepOutputVariable
20+
type: boolean
21+
default: false
1322

1423
steps:
1524
- task: AzureCLI@2
1625
displayName: 'Getting federated access token for feeds'
26+
name: ${{ parameters.stepName }}
27+
${{ if ne(parameters.condition, '') }}:
28+
condition: ${{ parameters.condition }}
1729
inputs:
1830
azureSubscription: ${{ parameters.federatedServiceConnection }}
1931
scriptType: 'pscore'
@@ -25,4 +37,4 @@ steps:
2537
exit 1
2638
}
2739
Write-Host "Setting '${{ parameters.outputVariableName }}' with the access token value"
28-
Write-Host "##vso[task.setvariable variable=${{ parameters.outputVariableName }};issecret=true]$accessToken"
40+
Write-Host "##vso[task.setvariable variable=${{ parameters.outputVariableName }};issecret=true;isOutput=${{ parameters.isStepOutputVariable }}]$accessToken"

eng/common/templates/job/publish-build-assets.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ jobs:
145145
scriptPath: $(Build.SourcesDirectory)/eng/common/post-build/publish-using-darc.ps1
146146
arguments: -BuildId $(BARBuildId)
147147
-PublishingInfraVersion 3
148-
-AzdoToken '$(publishing-dnceng-devdiv-code-r-build-re)'
148+
-AzdoToken '$(System.AccessToken)'
149149
-WaitPublishingFinish true
150150
-ArtifactsPublishingAdditionalParameters '${{ parameters.artifactsPublishingAdditionalParameters }}'
151151
-SymbolPublishingAdditionalParameters '${{ parameters.symbolPublishingAdditionalParameters }}'

eng/common/templates/post-build/post-build.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ stages:
277277
scriptPath: $(Build.SourcesDirectory)/eng/common/post-build/publish-using-darc.ps1
278278
arguments: -BuildId $(BARBuildId)
279279
-PublishingInfraVersion ${{ parameters.publishingInfraVersion }}
280-
-AzdoToken '$(publishing-dnceng-devdiv-code-r-build-re)'
280+
-AzdoToken '$(System.AccessToken)'
281281
-WaitPublishingFinish true
282282
-ArtifactsPublishingAdditionalParameters '${{ parameters.artifactsPublishingAdditionalParameters }}'
283283
-SymbolPublishingAdditionalParameters '${{ parameters.symbolPublishingAdditionalParameters }}'

eng/common/templates/steps/execute-sdl.yml

+4-3
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ parameters:
99

1010
steps:
1111
- task: NuGetAuthenticate@1
12-
inputs:
13-
nuGetServiceConnections: GuardianConnect
1412

1513
- task: NuGetToolInstaller@1
1614
displayName: 'Install NuGet.exe'
@@ -36,16 +34,19 @@ steps:
3634
displayName: Execute SDL (Overridden)
3735
continueOnError: ${{ parameters.sdlContinueOnError }}
3836
condition: ${{ parameters.condition }}
37+
env:
38+
GUARDIAN_DEFAULT_PACKAGE_SOURCE_SECRET: $(System.AccessToken)
3939

4040
- ${{ if eq(parameters.overrideParameters, '') }}:
4141
- powershell: ${{ parameters.executeAllSdlToolsScript }}
4242
-GuardianCliLocation $(GuardianCliLocation)
4343
-NugetPackageDirectory $(Build.SourcesDirectory)\.packages
44-
-AzureDevOpsAccessToken $(dn-bot-dotnet-build-rw-code-rw)
4544
${{ parameters.additionalParameters }}
4645
displayName: Execute SDL
4746
continueOnError: ${{ parameters.sdlContinueOnError }}
4847
condition: ${{ parameters.condition }}
48+
env:
49+
GUARDIAN_DEFAULT_PACKAGE_SOURCE_SECRET: $(System.AccessToken)
4950

5051
- ${{ if ne(parameters.publishGuardianDirectoryToPipeline, 'false') }}:
5152
# We want to publish the Guardian results and configuration for easy diagnosis. However, the

eng/common/templates/steps/get-delegation-sas.yml

+5-10
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,12 @@ steps:
2828
# Calculate the expiration of the SAS token and convert to UTC
2929
$expiry = (Get-Date).AddHours(${{ parameters.expiryInHours }}).ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ssZ")
3030
31-
# Temporarily work around a helix issue where SAS tokens with / in them will cause incorrect downloads
32-
# of correlation payloads.
33-
$sas = ""
34-
do {
35-
$sas = az storage container generate-sas --account-name ${{ parameters.storageAccount }} --name ${{ parameters.container }} --permissions ${{ parameters.permissions }} --expiry $expiry --auth-mode login --as-user -o tsv
31+
$sas = az storage container generate-sas --account-name ${{ parameters.storageAccount }} --name ${{ parameters.container }} --permissions ${{ parameters.permissions }} --expiry $expiry --auth-mode login --as-user -o tsv
3632
37-
if ($LASTEXITCODE -ne 0) {
38-
Write-Error "Failed to generate SAS token."
39-
exit 1
40-
}
41-
} while($sas.IndexOf('/') -ne -1)
33+
if ($LASTEXITCODE -ne 0) {
34+
Write-Error "Failed to generate SAS token."
35+
exit 1
36+
}
4237
4338
if ('${{ parameters.base64Encode }}' -eq 'true') {
4439
$sas = [Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes($sas))

eng/common/templates/steps/get-federated-access-token.yml

+13-1
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,29 @@ parameters:
33
type: string
44
- name: outputVariableName
55
type: string
6+
- name: stepName
7+
type: string
8+
default: 'getFederatedAccessToken'
9+
- name: condition
10+
type: string
11+
default: ''
612
# Resource to get a token for. Common values include:
713
# - '499b84ac-1321-427f-aa17-267ca6975798' for Azure DevOps
814
# - 'https://storage.azure.com/' for storage
915
# Defaults to Azure DevOps
1016
- name: resource
1117
type: string
1218
default: '499b84ac-1321-427f-aa17-267ca6975798'
19+
- name: isStepOutputVariable
20+
type: boolean
21+
default: false
1322

1423
steps:
1524
- task: AzureCLI@2
1625
displayName: 'Getting federated access token for feeds'
26+
name: ${{ parameters.stepName }}
27+
${{ if ne(parameters.condition, '') }}:
28+
condition: ${{ parameters.condition }}
1729
inputs:
1830
azureSubscription: ${{ parameters.federatedServiceConnection }}
1931
scriptType: 'pscore'
@@ -25,4 +37,4 @@ steps:
2537
exit 1
2638
}
2739
Write-Host "Setting '${{ parameters.outputVariableName }}' with the access token value"
28-
Write-Host "##vso[task.setvariable variable=${{ parameters.outputVariableName }};issecret=true]$accessToken"
40+
Write-Host "##vso[task.setvariable variable=${{ parameters.outputVariableName }};issecret=true;isOutput=${{ parameters.isStepOutputVariable }}]$accessToken"

eng/common/templates/steps/telemetry-start.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ parameters:
88

99
steps:
1010
- ${{ if and(eq(parameters.runAsPublic, 'false'), not(eq(variables['System.TeamProject'], 'public'))) }}:
11-
- task: AzureKeyVault@1
11+
- task: AzureKeyVault@2
1212
inputs:
1313
azureSubscription: 'HelixProd_KeyVault'
1414
KeyVaultName: HelixProdKV

global.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
{
22
"sdk": {
3-
"version": "8.0.101",
3+
"version": "8.0.108",
44
"allowPrerelease": true,
55
"rollForward": "latestMajor"
66
},
77
"tools": {
8-
"dotnet": "8.0.101",
8+
"dotnet": "8.0.108",
99
"runtimes": {
1010
"dotnet": [
1111
"$(MicrosoftNETCoreBrowserDebugHostTransportVersion)"
1212
]
1313
}
1414
},
1515
"msbuild-sdks": {
16-
"Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.24360.5",
17-
"Microsoft.DotNet.Helix.Sdk": "8.0.0-beta.24360.5"
16+
"Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.24426.2",
17+
"Microsoft.DotNet.Helix.Sdk": "8.0.0-beta.24426.2"
1818
}
1919
}

0 commit comments

Comments
 (0)