From 769003ff19e76cdd988b36007148158dcaaf2ab0 Mon Sep 17 00:00:00 2001 From: alipmsft <147458118+alipmsft@users.noreply.github.com> Date: Fri, 30 May 2025 01:54:57 -0700 Subject: [PATCH 1/2] Bump Aero Upload Task version 1.x -> 2.x (#2336) --- build/pipelines/templates/release-store.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/pipelines/templates/release-store.yaml b/build/pipelines/templates/release-store.yaml index 48483835..8eafca10 100644 --- a/build/pipelines/templates/release-store.yaml +++ b/build/pipelines/templates/release-store.yaml @@ -34,7 +34,7 @@ jobs: deletePackages: true numberOfPackagesToKeep: 0 - - task: APS-Aero-Package.aero-upload-task.AeroUploadTask.AeroUpload@1 + - task: APS-Aero-Package.aero-upload-task.AeroUploadTask.AeroUpload@2 displayName: Aero Upload (FC) inputs: productId: $(ProductId) From adf225deaeb7c49e1fa9c728f62088f2d87bb417 Mon Sep 17 00:00:00 2001 From: oneonezhang Date: Wed, 4 Jun 2025 09:21:29 +0800 Subject: [PATCH 2/2] Run PREFast (#2338) * prefast * fix comment --- .config/tvs.ruleset | 310 ++++++++++++++++++ build/pipelines/azure-pipelines.release.yaml | 2 + .../templates/build-single-architecture.yaml | 8 - .../templates/run-compliance-checks.yaml | 47 +++ 4 files changed, 359 insertions(+), 8 deletions(-) create mode 100644 .config/tvs.ruleset create mode 100644 build/pipelines/templates/run-compliance-checks.yaml diff --git a/.config/tvs.ruleset b/.config/tvs.ruleset new file mode 100644 index 00000000..33575dc2 --- /dev/null +++ b/.config/tvs.ruleset @@ -0,0 +1,310 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/build/pipelines/azure-pipelines.release.yaml b/build/pipelines/azure-pipelines.release.yaml index 3ffc9a09..8911ce0d 100644 --- a/build/pipelines/azure-pipelines.release.yaml +++ b/build/pipelines/azure-pipelines.release.yaml @@ -89,6 +89,8 @@ extends: useReleaseAppxmanifest: true condition: not(eq(variables['Build.Reason'], 'PullRequest')) + - template: /build/pipelines/templates/run-compliance-checks.yaml@self + - template: /build/pipelines/templates/run-ui-tests.yaml@self parameters: platform: x64 diff --git a/build/pipelines/templates/build-single-architecture.yaml b/build/pipelines/templates/build-single-architecture.yaml index 0eb2ee0b..8b2b55f4 100644 --- a/build/pipelines/templates/build-single-architecture.yaml +++ b/build/pipelines/templates/build-single-architecture.yaml @@ -45,14 +45,6 @@ jobs: - checkout: self fetchDepth: 1 - - task: WinUndockNativeCompiler@1 - displayName: Use LKG native compiler - inputs: - compilerPackageName: 'DevDiv.rel.LKG18.VCTools' - compilerPackageVersion: '19.42.3443710001+DevDivGIT.CI20250110.04-466784EE54DF2F302AD0CD6790031C954EF41DA23DA4415D73A76ADF260F2D21' - slnDirectory: $(Build.SourcesDirectory)\src - runPrefastDuring: Build - - ${{ if eq(parameters.isOSSBuild, true) }}: - task: nuget-security-analysis@0 displayName: Secure Supply Chain Analysis diff --git a/build/pipelines/templates/run-compliance-checks.yaml b/build/pipelines/templates/run-compliance-checks.yaml new file mode 100644 index 00000000..ba301af5 --- /dev/null +++ b/build/pipelines/templates/run-compliance-checks.yaml @@ -0,0 +1,47 @@ +jobs: +- job: ComplianceChecks + displayName: Run compliance checks + timeoutInMinutes: 60 + pool: + name: EssentialExperiences-windows-2022 + steps: + - checkout: self + + - task: UniversalPackages@0 + displayName: Download internals package + inputs: + command: download + downloadDirectory: $(Build.SourcesDirectory) + vstsFeed: WindowsInboxApps + vstsFeedPackage: calculator-internals + vstsPackageVersion: 0.0.117 + + - task: NuGetToolInstaller@0 + displayName: Use NuGet 6.x + inputs: + versionSpec: 6.x + + - task: NuGetCommand@2 + displayName: NuGet restore src/Calculator.sln + inputs: + command: custom + arguments: restore src/Calculator.sln -Verbosity Detailed -NonInteractive + + - task: PowerShell@2 + displayName: Set version number in AppxManifest + inputs: + filePath: $(Build.SourcesDirectory)\build\scripts\UpdateAppxManifestVersion.ps1 + arguments: '-AppxManifest $(Build.SourcesDirectory)\src\Calculator\Package.appxmanifest -Version $(Build.BuildNumber)' + + - task: securedevelopmentteam.vss-secure-development-tools.build-task-prefast.SDLNativeRules@3 + displayName: 'Run the PREfast SDL Native Rules' + inputs: + userProvideBuildInfo: msBuildInfo + setupCommandlines: '"%ProgramFiles%\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsMSBuildCmd.bat"' + msBuildArchitecture: 'amd64' + msBuildCommandline: 'msbuild.exe $(Build.SourcesDirectory)\src\Calculator.sln /p:AppVersion=$(Build.BuildNumber) /p:OutDir=$(Build.BinariesDirectory)\ /p:Configuration=Release /p:Platform=x64 /m /p:IsStoreBuild=true' + rulesetName: Custom + customRuleset: $(Build.SourcesDirectory)\.config\tvs.ruleset + + - task: securedevelopmentteam.vss-secure-development-tools.build-task-publishsecurityanalysislogs.PublishSecurityAnalysisLogs@3 + displayName: 'Publish Guardian Artifacts'