From 9ef9b8347fb6ebba5ef597a099ee6fedab45166d Mon Sep 17 00:00:00 2001 From: Gabrielle Chen Date: Tue, 12 Apr 2022 12:12:00 -0700 Subject: [PATCH 01/54] Template BinSkim --- eng/pipelines/MIDebugEngine-CI.yml | 2 +- eng/pipelines/tasks/BinSkim.yml | 3 +++ eng/pipelines/templates/CodeAnalysis.template.yml | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 eng/pipelines/tasks/BinSkim.yml diff --git a/eng/pipelines/MIDebugEngine-CI.yml b/eng/pipelines/MIDebugEngine-CI.yml index 4a9188068..8ead59e4f 100644 --- a/eng/pipelines/MIDebugEngine-CI.yml +++ b/eng/pipelines/MIDebugEngine-CI.yml @@ -2,7 +2,7 @@ name: $(Date:yyyMMdd).$(Rev:r) stages: - stage: CodeAnalysis - dependsOn: [] + dependsOn: [CI] jobs: - template: ./jobs/MSHosted-Windows.job.yml parameters: diff --git a/eng/pipelines/tasks/BinSkim.yml b/eng/pipelines/tasks/BinSkim.yml new file mode 100644 index 000000000..902ebf5ed --- /dev/null +++ b/eng/pipelines/tasks/BinSkim.yml @@ -0,0 +1,3 @@ +steps: +- task: securedevelopmentteam.vss-secure-development-tools.build-task-binskim.BinSkim@4 + displayName: 'Run BinSkim' \ No newline at end of file diff --git a/eng/pipelines/templates/CodeAnalysis.template.yml b/eng/pipelines/templates/CodeAnalysis.template.yml index 2b8d7d55d..ca5a7b8ac 100644 --- a/eng/pipelines/templates/CodeAnalysis.template.yml +++ b/eng/pipelines/templates/CodeAnalysis.template.yml @@ -4,6 +4,8 @@ steps: - template: ../tasks/CredScan.yml +- template: ../tasks/BinSkim.yml + - template: ../tasks/PoliCheck.yml - template: ../tasks/SdtReport.yml From 05c9a61ed2a393d1d0b7ff37fcd1b7f63872cb62 Mon Sep 17 00:00:00 2001 From: Gabrielle Chen Date: Tue, 12 Apr 2022 13:46:04 -0700 Subject: [PATCH 02/54] Sample code BinSkim --- eng/pipelines/tasks/BinSkim.yml | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/eng/pipelines/tasks/BinSkim.yml b/eng/pipelines/tasks/BinSkim.yml index 902ebf5ed..7e90776f1 100644 --- a/eng/pipelines/tasks/BinSkim.yml +++ b/eng/pipelines/tasks/BinSkim.yml @@ -1,3 +1,16 @@ steps: -- task: securedevelopmentteam.vss-secure-development-tools.build-task-binskim.BinSkim@4 - displayName: 'Run BinSkim' \ No newline at end of file +- task: DownloadBuildArtifacts@0 + displayName: Download Windows Files (Release) + inputs: + downloadType: single + artifactName: Lab.Release + downloadPath: $(Build.ArtifactStagingDirectory) + +- task: securedevelopmentteam.vss-secure-development-tools.build-task-binskim.BinSkim@3 + displayName: 'Run BinSkim' + inputs: + InputType: Basic + AnalyzeTarget: '$(Build.ArtifactStagingDirectory)\**\*.dll;$(Build.ArtifactStagingDirectory)\**\*.exe' + AnalyzeVerbose: true + AnalyzeHashes: true + AnalyzeEnvironment: true \ No newline at end of file From 64b07b26775ccc37eb643d88045bd60f5e72e68a Mon Sep 17 00:00:00 2001 From: Gabrielle Chen Date: Tue, 12 Apr 2022 14:26:07 -0700 Subject: [PATCH 03/54] Fix BinSkim artifactName --- eng/pipelines/tasks/BinSkim.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/pipelines/tasks/BinSkim.yml b/eng/pipelines/tasks/BinSkim.yml index 7e90776f1..1dc45ab10 100644 --- a/eng/pipelines/tasks/BinSkim.yml +++ b/eng/pipelines/tasks/BinSkim.yml @@ -3,7 +3,7 @@ steps: displayName: Download Windows Files (Release) inputs: downloadType: single - artifactName: Lab.Release + artifactName: ${{ parameters.artifactName }} downloadPath: $(Build.ArtifactStagingDirectory) - task: securedevelopmentteam.vss-secure-development-tools.build-task-binskim.BinSkim@3 From 322ac0a82317d11be87002a227e1d8b9e95ffd47 Mon Sep 17 00:00:00 2001 From: Gabrielle Chen Date: Tue, 12 Apr 2022 14:59:21 -0700 Subject: [PATCH 04/54] Fix BinSkim artifactName --- eng/pipelines/tasks/BinSkim.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/pipelines/tasks/BinSkim.yml b/eng/pipelines/tasks/BinSkim.yml index 1dc45ab10..7d585f6c3 100644 --- a/eng/pipelines/tasks/BinSkim.yml +++ b/eng/pipelines/tasks/BinSkim.yml @@ -3,7 +3,7 @@ steps: displayName: Download Windows Files (Release) inputs: downloadType: single - artifactName: ${{ parameters.artifactName }} + artifactName: Lab.Release\Release downloadPath: $(Build.ArtifactStagingDirectory) - task: securedevelopmentteam.vss-secure-development-tools.build-task-binskim.BinSkim@3 From 61c299b224ba3ba3a87a0a3193604b8831a409ad Mon Sep 17 00:00:00 2001 From: Gabrielle Chen Date: Tue, 12 Apr 2022 15:17:08 -0700 Subject: [PATCH 05/54] Fix BinSkim artifactName --- eng/pipelines/tasks/BinSkim.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/pipelines/tasks/BinSkim.yml b/eng/pipelines/tasks/BinSkim.yml index 7d585f6c3..7e90776f1 100644 --- a/eng/pipelines/tasks/BinSkim.yml +++ b/eng/pipelines/tasks/BinSkim.yml @@ -3,7 +3,7 @@ steps: displayName: Download Windows Files (Release) inputs: downloadType: single - artifactName: Lab.Release\Release + artifactName: Lab.Release downloadPath: $(Build.ArtifactStagingDirectory) - task: securedevelopmentteam.vss-secure-development-tools.build-task-binskim.BinSkim@3 From 509aa217d6ddd552f1bdaddbe02965528f9d2bc7 Mon Sep 17 00:00:00 2001 From: Gabrielle Chen Date: Wed, 13 Apr 2022 09:23:43 -0700 Subject: [PATCH 06/54] Use PipelineArtifact instead of BuildArtifact --- eng/pipelines/tasks/BinSkim.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/eng/pipelines/tasks/BinSkim.yml b/eng/pipelines/tasks/BinSkim.yml index 7e90776f1..c6a9414df 100644 --- a/eng/pipelines/tasks/BinSkim.yml +++ b/eng/pipelines/tasks/BinSkim.yml @@ -1,16 +1,15 @@ steps: -- task: DownloadBuildArtifacts@0 - displayName: Download Windows Files (Release) +- task: DownloadPipelineArtifact@2 + displayName: Download Pipeline Artifact inputs: - downloadType: single - artifactName: Lab.Release - downloadPath: $(Build.ArtifactStagingDirectory) + source: "current" + path: "$(Pipeline.Workspace)" - task: securedevelopmentteam.vss-secure-development-tools.build-task-binskim.BinSkim@3 displayName: 'Run BinSkim' inputs: InputType: Basic - AnalyzeTarget: '$(Build.ArtifactStagingDirectory)\**\*.dll;$(Build.ArtifactStagingDirectory)\**\*.exe' + AnalyzeTarget: '$(Pipeline.Workspace)\**\*.dll;$(Pipeline.Workspace)\**\*.exe' AnalyzeVerbose: true AnalyzeHashes: true AnalyzeEnvironment: true \ No newline at end of file From 2b31a49895e6a4a01b45002cdb47dc9a831c99d8 Mon Sep 17 00:00:00 2001 From: Gabrielle Chen Date: Wed, 13 Apr 2022 10:05:31 -0700 Subject: [PATCH 07/54] Add APIScan --- eng/pipelines/tasks/APIScan.yml | 19 +++++++++++++++++++ .../templates/CodeAnalysis.template.yml | 2 ++ 2 files changed, 21 insertions(+) create mode 100644 eng/pipelines/tasks/APIScan.yml diff --git a/eng/pipelines/tasks/APIScan.yml b/eng/pipelines/tasks/APIScan.yml new file mode 100644 index 000000000..a918baccf --- /dev/null +++ b/eng/pipelines/tasks/APIScan.yml @@ -0,0 +1,19 @@ +steps: +- task: DownloadPipelineArtifact@2 + displayName: Download Pipeline Artifact + inputs: + source: "current" + path: "$(Pipeline.Workspace)" + +- task: securedevelopmentteam.vss-secure-development-tools.build-task-apiscan.APIScan@2 + displayName: 'Run APIScan' + inputs: + softwareFolder: '$(Pipeline.Workspace)' + softwareName: MIEngine + # softwareVersionNum: '$(Build.BuildNumber)' + symbolsFolder: 'SRV*http://symweb;$(Pipeline.Workspace)' + isLargeApp: false + verbosityLevel: none + continueOnError: true + env: + AzureServicesAuthConnectionString: runAs=App;AppId=$(ApiScanClientId);TenantId=$(TenantId);AppKey=$(AppKey) \ No newline at end of file diff --git a/eng/pipelines/templates/CodeAnalysis.template.yml b/eng/pipelines/templates/CodeAnalysis.template.yml index ca5a7b8ac..0ed740c03 100644 --- a/eng/pipelines/templates/CodeAnalysis.template.yml +++ b/eng/pipelines/templates/CodeAnalysis.template.yml @@ -6,6 +6,8 @@ steps: - template: ../tasks/BinSkim.yml +- template: ../tasks/APIScan.yml + - template: ../tasks/PoliCheck.yml - template: ../tasks/SdtReport.yml From 743a90f6a1e69e0a0a6e7f341db19cd6c57ec6da Mon Sep 17 00:00:00 2001 From: Gabrielle Chen Date: Wed, 13 Apr 2022 10:35:24 -0700 Subject: [PATCH 08/54] Add softwareVersionNum to APIScan --- eng/pipelines/tasks/APIScan.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/pipelines/tasks/APIScan.yml b/eng/pipelines/tasks/APIScan.yml index a918baccf..c77e4fac0 100644 --- a/eng/pipelines/tasks/APIScan.yml +++ b/eng/pipelines/tasks/APIScan.yml @@ -10,7 +10,7 @@ steps: inputs: softwareFolder: '$(Pipeline.Workspace)' softwareName: MIEngine - # softwareVersionNum: '$(Build.BuildNumber)' + softwareVersionNum: '$(Build.BuildNumber)' symbolsFolder: 'SRV*http://symweb;$(Pipeline.Workspace)' isLargeApp: false verbosityLevel: none From 4c3a34e4e31e9a9431788fee66a5a7533f44d0fb Mon Sep 17 00:00:00 2001 From: Gabrielle Chen Date: Wed, 13 Apr 2022 11:47:06 -0700 Subject: [PATCH 09/54] Fix path for APIScan --- eng/pipelines/tasks/APIScan.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/pipelines/tasks/APIScan.yml b/eng/pipelines/tasks/APIScan.yml index c77e4fac0..1b733bb1c 100644 --- a/eng/pipelines/tasks/APIScan.yml +++ b/eng/pipelines/tasks/APIScan.yml @@ -3,7 +3,7 @@ steps: displayName: Download Pipeline Artifact inputs: source: "current" - path: "$(Pipeline.Workspace)" + path: "$(Pipeline.Workspace)/temp" - task: securedevelopmentteam.vss-secure-development-tools.build-task-apiscan.APIScan@2 displayName: 'Run APIScan' @@ -11,7 +11,7 @@ steps: softwareFolder: '$(Pipeline.Workspace)' softwareName: MIEngine softwareVersionNum: '$(Build.BuildNumber)' - symbolsFolder: 'SRV*http://symweb;$(Pipeline.Workspace)' + symbolsFolder: 'SRV*http://symweb;$(Pipeline.Workspace)/temp' isLargeApp: false verbosityLevel: none continueOnError: true From 49c4ae41f64d5122db4aa76d8eae97fc77cc49f6 Mon Sep 17 00:00:00 2001 From: Gabrielle Chen Date: Wed, 13 Apr 2022 13:09:15 -0700 Subject: [PATCH 10/54] Copy files before APIScan --- eng/pipelines/tasks/APIScan.yml | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/eng/pipelines/tasks/APIScan.yml b/eng/pipelines/tasks/APIScan.yml index 1b733bb1c..4ce1c668f 100644 --- a/eng/pipelines/tasks/APIScan.yml +++ b/eng/pipelines/tasks/APIScan.yml @@ -3,15 +3,26 @@ steps: displayName: Download Pipeline Artifact inputs: source: "current" - path: "$(Pipeline.Workspace)/temp" + path: "$(Pipeline.Workspace)" + +- task: CopyFiles@2 + displayName: 'Copy Files to: $(Pipeline.Workspace)\ApiScanFiles' + inputs: + SourceFolder: '$(Pipeline.Workspace)\Lab.Release' + Contents: | + **\*@(*.dll|*.pdb|*.exe) + !**\*.resources.dll + TargetFolder: '$(Pipeline.Workspace)\ApiScanFiles' + CleanTargetFolder: true + OverWrite: true - task: securedevelopmentteam.vss-secure-development-tools.build-task-apiscan.APIScan@2 displayName: 'Run APIScan' inputs: - softwareFolder: '$(Pipeline.Workspace)' + softwareFolder: '$(Pipeline.Workspace)\ApiScanFiles' softwareName: MIEngine softwareVersionNum: '$(Build.BuildNumber)' - symbolsFolder: 'SRV*http://symweb;$(Pipeline.Workspace)/temp' + symbolsFolder: 'SRV*http://symweb;$(Pipeline.Workspace)\ApiScanFiles' isLargeApp: false verbosityLevel: none continueOnError: true From 97c839bfca0ba865ca70c79eb8cc2c7b0bcb0de8 Mon Sep 17 00:00:00 2001 From: Gabrielle Chen Date: Wed, 13 Apr 2022 13:11:10 -0700 Subject: [PATCH 11/54] Copy files before APIScan --- eng/pipelines/tasks/APIScan.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/pipelines/tasks/APIScan.yml b/eng/pipelines/tasks/APIScan.yml index 4ce1c668f..431ca33ff 100644 --- a/eng/pipelines/tasks/APIScan.yml +++ b/eng/pipelines/tasks/APIScan.yml @@ -10,7 +10,7 @@ steps: inputs: SourceFolder: '$(Pipeline.Workspace)\Lab.Release' Contents: | - **\*@(*.dll|*.pdb|*.exe) + **\**@(*.dll|*.pdb|*.exe) !**\*.resources.dll TargetFolder: '$(Pipeline.Workspace)\ApiScanFiles' CleanTargetFolder: true From 937f9f1c945dba52fc6700dc1aac3bb90c6e10b3 Mon Sep 17 00:00:00 2001 From: Gabrielle Chen Date: Wed, 13 Apr 2022 13:19:42 -0700 Subject: [PATCH 12/54] Copy files before APIScan --- eng/pipelines/tasks/APIScan.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/pipelines/tasks/APIScan.yml b/eng/pipelines/tasks/APIScan.yml index 431ca33ff..b41684841 100644 --- a/eng/pipelines/tasks/APIScan.yml +++ b/eng/pipelines/tasks/APIScan.yml @@ -10,7 +10,7 @@ steps: inputs: SourceFolder: '$(Pipeline.Workspace)\Lab.Release' Contents: | - **\**@(*.dll|*.pdb|*.exe) + **\@(*.dll|*.pdb|*.exe) !**\*.resources.dll TargetFolder: '$(Pipeline.Workspace)\ApiScanFiles' CleanTargetFolder: true From a0f289c328937f3dddf8ef970c36519493de6c81 Mon Sep 17 00:00:00 2001 From: Gabrielle Chen Date: Wed, 13 Apr 2022 13:22:34 -0700 Subject: [PATCH 13/54] Copy files before APIScan --- eng/pipelines/tasks/APIScan.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/pipelines/tasks/APIScan.yml b/eng/pipelines/tasks/APIScan.yml index b41684841..cbb9d33d4 100644 --- a/eng/pipelines/tasks/APIScan.yml +++ b/eng/pipelines/tasks/APIScan.yml @@ -10,7 +10,7 @@ steps: inputs: SourceFolder: '$(Pipeline.Workspace)\Lab.Release' Contents: | - **\@(*.dll|*.pdb|*.exe) + **\.*@(*.dll|*.pdb|*.exe) !**\*.resources.dll TargetFolder: '$(Pipeline.Workspace)\ApiScanFiles' CleanTargetFolder: true From d45b2ed269c12047558005ea5b676279a236bfc0 Mon Sep 17 00:00:00 2001 From: Gabrielle Chen Date: Wed, 13 Apr 2022 13:38:01 -0700 Subject: [PATCH 14/54] Copy files before APIScan --- eng/pipelines/tasks/APIScan.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/eng/pipelines/tasks/APIScan.yml b/eng/pipelines/tasks/APIScan.yml index cbb9d33d4..0dd4ae16a 100644 --- a/eng/pipelines/tasks/APIScan.yml +++ b/eng/pipelines/tasks/APIScan.yml @@ -10,7 +10,10 @@ steps: inputs: SourceFolder: '$(Pipeline.Workspace)\Lab.Release' Contents: | - **\.*@(*.dll|*.pdb|*.exe) + **\*Microsoft@(*.dll|*.pdb|*.exe) + **\*Newtonsoft@(*.dll|*.pdb|*.exe) + **\*OpenDebugAD7@(*.dll|*.pdb|*.exe) + **\*WindowsDebugLauncher@(*.dll|*.pdb|*.exe) !**\*.resources.dll TargetFolder: '$(Pipeline.Workspace)\ApiScanFiles' CleanTargetFolder: true From 2dc2a952aabcb17ab380f4acf98bfc51267241a3 Mon Sep 17 00:00:00 2001 From: Gabrielle Chen Date: Wed, 13 Apr 2022 13:48:05 -0700 Subject: [PATCH 15/54] Copy files before APIScan - fixing indentation --- eng/pipelines/tasks/APIScan.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/eng/pipelines/tasks/APIScan.yml b/eng/pipelines/tasks/APIScan.yml index 0dd4ae16a..2e805e9ff 100644 --- a/eng/pipelines/tasks/APIScan.yml +++ b/eng/pipelines/tasks/APIScan.yml @@ -10,11 +10,11 @@ steps: inputs: SourceFolder: '$(Pipeline.Workspace)\Lab.Release' Contents: | - **\*Microsoft@(*.dll|*.pdb|*.exe) - **\*Newtonsoft@(*.dll|*.pdb|*.exe) - **\*OpenDebugAD7@(*.dll|*.pdb|*.exe) - **\*WindowsDebugLauncher@(*.dll|*.pdb|*.exe) - !**\*.resources.dll + **\*Microsoft@(*.dll|*.pdb|*.exe) + **\*Newtonsoft@(*.dll|*.pdb|*.exe) + **\*OpenDebugAD7@(*.dll|*.pdb|*.exe) + **\*WindowsDebugLauncher@(*.dll|*.pdb|*.exe) + !**\*.resources.dll TargetFolder: '$(Pipeline.Workspace)\ApiScanFiles' CleanTargetFolder: true OverWrite: true From 1f513a29a9ed44dd198ddbd97acaabef47ecb492 Mon Sep 17 00:00:00 2001 From: Gabrielle Chen Date: Wed, 13 Apr 2022 14:05:16 -0700 Subject: [PATCH 16/54] Remove APIScan env --- eng/pipelines/tasks/APIScan.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/pipelines/tasks/APIScan.yml b/eng/pipelines/tasks/APIScan.yml index 2e805e9ff..fcedd82c7 100644 --- a/eng/pipelines/tasks/APIScan.yml +++ b/eng/pipelines/tasks/APIScan.yml @@ -29,5 +29,5 @@ steps: isLargeApp: false verbosityLevel: none continueOnError: true - env: - AzureServicesAuthConnectionString: runAs=App;AppId=$(ApiScanClientId);TenantId=$(TenantId);AppKey=$(AppKey) \ No newline at end of file + # env: + # AzureServicesAuthConnectionString: runAs=App;AppId=$(ApiScanClientId);TenantId=$(TenantId);AppKey=$(AppKey) \ No newline at end of file From 67654e69843508a163b728f3229e9e989fa67917 Mon Sep 17 00:00:00 2001 From: Gabrielle Chen Date: Wed, 13 Apr 2022 16:03:45 -0700 Subject: [PATCH 17/54] Fix APIScan issues --- eng/pipelines/tasks/APIScan.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/pipelines/tasks/APIScan.yml b/eng/pipelines/tasks/APIScan.yml index fcedd82c7..5d774cd55 100644 --- a/eng/pipelines/tasks/APIScan.yml +++ b/eng/pipelines/tasks/APIScan.yml @@ -29,5 +29,5 @@ steps: isLargeApp: false verbosityLevel: none continueOnError: true - # env: - # AzureServicesAuthConnectionString: runAs=App;AppId=$(ApiScanClientId);TenantId=$(TenantId);AppKey=$(AppKey) \ No newline at end of file + env: + AzureServicesAuthConnectionString: runAs=App;AppId=$(ApiScanClientId);TenantId=$(TenantId);AppKey=$(MIEngineApiScan) \ No newline at end of file From ca8f5e0bb979840a9248361cd1af40aa05eefac3 Mon Sep 17 00:00:00 2001 From: Gabrielle Chen Date: Thu, 14 Apr 2022 08:24:59 -0700 Subject: [PATCH 18/54] Modify APIScan TenantId --- eng/pipelines/tasks/APIScan.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/pipelines/tasks/APIScan.yml b/eng/pipelines/tasks/APIScan.yml index 5d774cd55..55f828e96 100644 --- a/eng/pipelines/tasks/APIScan.yml +++ b/eng/pipelines/tasks/APIScan.yml @@ -30,4 +30,4 @@ steps: verbosityLevel: none continueOnError: true env: - AzureServicesAuthConnectionString: runAs=App;AppId=$(ApiScanClientId);TenantId=$(TenantId);AppKey=$(MIEngineApiScan) \ No newline at end of file + AzureServicesAuthConnectionString: runAs=App;AppId=$(ApiScanClientId);TenantId=$(ApiScanTenant);AppKey=$(MIEngineApiScan) \ No newline at end of file From cc7ea62f89658bb63385624e4c8a297f08ababfb Mon Sep 17 00:00:00 2001 From: Gabrielle Chen Date: Thu, 14 Apr 2022 11:22:15 -0700 Subject: [PATCH 19/54] Increase APIScan timeout --- eng/pipelines/tasks/APIScan.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/eng/pipelines/tasks/APIScan.yml b/eng/pipelines/tasks/APIScan.yml index 55f828e96..ba998daf5 100644 --- a/eng/pipelines/tasks/APIScan.yml +++ b/eng/pipelines/tasks/APIScan.yml @@ -1,3 +1,8 @@ +jobs: +- job: CodeAnaysis_APIScan + displayName: Code Analysis - APIScan + timeoutInMinutes: 360 + steps: - task: DownloadPipelineArtifact@2 displayName: Download Pipeline Artifact From 33b266bfe6029528ee751dfc07ea80f59c26e193 Mon Sep 17 00:00:00 2001 From: Gabrielle Chen Date: Thu, 14 Apr 2022 11:27:23 -0700 Subject: [PATCH 20/54] Modify APIScan TenantId --- eng/pipelines/tasks/APIScan.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/eng/pipelines/tasks/APIScan.yml b/eng/pipelines/tasks/APIScan.yml index ba998daf5..3b2d1e4c3 100644 --- a/eng/pipelines/tasks/APIScan.yml +++ b/eng/pipelines/tasks/APIScan.yml @@ -1,7 +1,4 @@ -jobs: -- job: CodeAnaysis_APIScan - displayName: Code Analysis - APIScan - timeoutInMinutes: 360 +timeoutInMinutes: 360 steps: - task: DownloadPipelineArtifact@2 From 09c32c35c706060ba562c47c1f3351c8b668845b Mon Sep 17 00:00:00 2001 From: Gabrielle Chen Date: Thu, 14 Apr 2022 11:30:10 -0700 Subject: [PATCH 21/54] Increase timeout --- eng/pipelines/jobs/MSHosted-Windows.job.yml | 1 + eng/pipelines/tasks/APIScan.yml | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/eng/pipelines/jobs/MSHosted-Windows.job.yml b/eng/pipelines/jobs/MSHosted-Windows.job.yml index 9fbbd84eb..0859b0ae3 100644 --- a/eng/pipelines/jobs/MSHosted-Windows.job.yml +++ b/eng/pipelines/jobs/MSHosted-Windows.job.yml @@ -8,6 +8,7 @@ parameters: jobs: - job: displayName: ${{ parameters.DisplayName }} + timeoutInMinutes: 360 pool: vmImage: 'windows-latest' steps: diff --git a/eng/pipelines/tasks/APIScan.yml b/eng/pipelines/tasks/APIScan.yml index 3b2d1e4c3..55f828e96 100644 --- a/eng/pipelines/tasks/APIScan.yml +++ b/eng/pipelines/tasks/APIScan.yml @@ -1,5 +1,3 @@ -timeoutInMinutes: 360 - steps: - task: DownloadPipelineArtifact@2 displayName: Download Pipeline Artifact From 72a40c206a07e54f75c860831dbaedc5f126a565 Mon Sep 17 00:00:00 2001 From: Gabrielle Chen Date: Thu, 14 Apr 2022 14:55:55 -0700 Subject: [PATCH 22/54] Add Roslyn analyzers --- eng/pipelines/tasks/CSharp.yml | 13 +++++++++++++ eng/pipelines/templates/CodeAnalysis.template.yml | 2 ++ 2 files changed, 15 insertions(+) create mode 100644 eng/pipelines/tasks/CSharp.yml diff --git a/eng/pipelines/tasks/CSharp.yml b/eng/pipelines/tasks/CSharp.yml new file mode 100644 index 000000000..eca2dc19d --- /dev/null +++ b/eng/pipelines/tasks/CSharp.yml @@ -0,0 +1,13 @@ +steps: +- task: securedevelopmentteam.vss-secure-development-tools.build-task-roslynanalyzers.RoslynAnalyzers@3 + displayName: 'Run Roslyn Analyzers' + inputs: + continueOnError: true + rulesetName: Custom + msBuildVersion: 17.0 + msBuildArchitecture: amd64 + customRuleset: $(Build.SourcesDirectory)\build\yaml\steps\codeanalysis\DevDivRoslynRequired.ruleset + setupCommandLine: | + "%ProgramFiles%\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsMSBuildCmd.bat" + msBuildCommandline: | + msbuild $(Build.SourcesDirectory)\src\MIDebugEngine.sln /p:Platform="$(Platform)" /p:Configuration=$(Configuration) \ No newline at end of file diff --git a/eng/pipelines/templates/CodeAnalysis.template.yml b/eng/pipelines/templates/CodeAnalysis.template.yml index 0ed740c03..5397b7f2e 100644 --- a/eng/pipelines/templates/CodeAnalysis.template.yml +++ b/eng/pipelines/templates/CodeAnalysis.template.yml @@ -6,6 +6,8 @@ steps: - template: ../tasks/BinSkim.yml +- template: ../tasks/CSharp.yml + - template: ../tasks/APIScan.yml - template: ../tasks/PoliCheck.yml From 41043fc9ebd581ddc6b6de0c9ec249b02c5b49d2 Mon Sep 17 00:00:00 2001 From: Gabrielle Chen Date: Fri, 15 Apr 2022 07:32:40 -0700 Subject: [PATCH 23/54] Roslyn Analyzer --- eng/pipelines/tasks/CSharp.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/pipelines/tasks/CSharp.yml b/eng/pipelines/tasks/CSharp.yml index eca2dc19d..3ed25e0ad 100644 --- a/eng/pipelines/tasks/CSharp.yml +++ b/eng/pipelines/tasks/CSharp.yml @@ -10,4 +10,4 @@ steps: setupCommandLine: | "%ProgramFiles%\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsMSBuildCmd.bat" msBuildCommandline: | - msbuild $(Build.SourcesDirectory)\src\MIDebugEngine.sln /p:Platform="$(Platform)" /p:Configuration=$(Configuration) \ No newline at end of file + msbuild $(Build.SourcesDirectory)\src\MIDebugEngine.sln # /p:Platform="$(Platform)" /p:Configuration=$(Configuration) \ No newline at end of file From 59ba2b189e0ccaaa4d52efb8010c1790986cdd51 Mon Sep 17 00:00:00 2001 From: Gabrielle Chen Date: Fri, 15 Apr 2022 08:04:20 -0700 Subject: [PATCH 24/54] Roslyn Analyzer --- eng/pipelines/tasks/CSharp.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/pipelines/tasks/CSharp.yml b/eng/pipelines/tasks/CSharp.yml index 3ed25e0ad..e0ac4d9ff 100644 --- a/eng/pipelines/tasks/CSharp.yml +++ b/eng/pipelines/tasks/CSharp.yml @@ -10,4 +10,4 @@ steps: setupCommandLine: | "%ProgramFiles%\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsMSBuildCmd.bat" msBuildCommandline: | - msbuild $(Build.SourcesDirectory)\src\MIDebugEngine.sln # /p:Platform="$(Platform)" /p:Configuration=$(Configuration) \ No newline at end of file + msbuild $(Build.SourcesDirectory)\src\MIDebugEngine.sln /p:Platform="AnyCPU" /p:Configuration="Release" \ No newline at end of file From 0ba2969af36dde994e8cc184c673c05364c49812 Mon Sep 17 00:00:00 2001 From: Gabrielle Chen Date: Fri, 15 Apr 2022 08:26:51 -0700 Subject: [PATCH 25/54] Roslyn Analyzer --- eng/pipelines/tasks/CSharp.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/pipelines/tasks/CSharp.yml b/eng/pipelines/tasks/CSharp.yml index e0ac4d9ff..b1fdb0e5e 100644 --- a/eng/pipelines/tasks/CSharp.yml +++ b/eng/pipelines/tasks/CSharp.yml @@ -10,4 +10,4 @@ steps: setupCommandLine: | "%ProgramFiles%\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsMSBuildCmd.bat" msBuildCommandline: | - msbuild $(Build.SourcesDirectory)\src\MIDebugEngine.sln /p:Platform="AnyCPU" /p:Configuration="Release" \ No newline at end of file + msbuild $(Build.SourcesDirectory)\src\MIDebugEngine.sln /p:Platform="AnyCPU" /p:Configuration="Lab.Release" \ No newline at end of file From 5bfd61115a9fc52615f293877a4b26244738c7fa Mon Sep 17 00:00:00 2001 From: Gabrielle Chen Date: Fri, 15 Apr 2022 08:46:59 -0700 Subject: [PATCH 26/54] Roslyn Analyzer --- eng/pipelines/tasks/CSharp.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/pipelines/tasks/CSharp.yml b/eng/pipelines/tasks/CSharp.yml index b1fdb0e5e..05a3b78a1 100644 --- a/eng/pipelines/tasks/CSharp.yml +++ b/eng/pipelines/tasks/CSharp.yml @@ -10,4 +10,4 @@ steps: setupCommandLine: | "%ProgramFiles%\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsMSBuildCmd.bat" msBuildCommandline: | - msbuild $(Build.SourcesDirectory)\src\MIDebugEngine.sln /p:Platform="AnyCPU" /p:Configuration="Lab.Release" \ No newline at end of file + msbuild $(Build.SourcesDirectory)\src\MIDebugEngine.sln /p:Platform="$(BuildPlatform)" /p:Configuration=$(Configuration) \ No newline at end of file From c8aede482822878d97ebbaf772252e3c006ddbc8 Mon Sep 17 00:00:00 2001 From: Gabrielle Chen Date: Fri, 15 Apr 2022 09:13:11 -0700 Subject: [PATCH 27/54] Roslyn Analyzer --- eng/pipelines/tasks/CSharp.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/pipelines/tasks/CSharp.yml b/eng/pipelines/tasks/CSharp.yml index 05a3b78a1..eca2dc19d 100644 --- a/eng/pipelines/tasks/CSharp.yml +++ b/eng/pipelines/tasks/CSharp.yml @@ -10,4 +10,4 @@ steps: setupCommandLine: | "%ProgramFiles%\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsMSBuildCmd.bat" msBuildCommandline: | - msbuild $(Build.SourcesDirectory)\src\MIDebugEngine.sln /p:Platform="$(BuildPlatform)" /p:Configuration=$(Configuration) \ No newline at end of file + msbuild $(Build.SourcesDirectory)\src\MIDebugEngine.sln /p:Platform="$(Platform)" /p:Configuration=$(Configuration) \ No newline at end of file From 44de31d3f14c5427f654955aed93c625732c895a Mon Sep 17 00:00:00 2001 From: Gabrielle Chen Date: Fri, 15 Apr 2022 09:14:44 -0700 Subject: [PATCH 28/54] Roslyn Analyzer --- eng/pipelines/tasks/CSharp.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/pipelines/tasks/CSharp.yml b/eng/pipelines/tasks/CSharp.yml index eca2dc19d..db43f860e 100644 --- a/eng/pipelines/tasks/CSharp.yml +++ b/eng/pipelines/tasks/CSharp.yml @@ -10,4 +10,4 @@ steps: setupCommandLine: | "%ProgramFiles%\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsMSBuildCmd.bat" msBuildCommandline: | - msbuild $(Build.SourcesDirectory)\src\MIDebugEngine.sln /p:Platform="$(Platform)" /p:Configuration=$(Configuration) \ No newline at end of file + msbuild $(Build.SourcesDirectory)\src\MIDebugEngine.sln /p:Platform='AnyCPU' /p:Configuration=$(Configuration) \ No newline at end of file From 7cd7ccb897997c610561e99047884bedf2079bc2 Mon Sep 17 00:00:00 2001 From: Gabrielle Chen Date: Fri, 15 Apr 2022 09:30:55 -0700 Subject: [PATCH 29/54] Roslyn Analyzer --- eng/pipelines/tasks/CSharp.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/pipelines/tasks/CSharp.yml b/eng/pipelines/tasks/CSharp.yml index db43f860e..5a0065e55 100644 --- a/eng/pipelines/tasks/CSharp.yml +++ b/eng/pipelines/tasks/CSharp.yml @@ -10,4 +10,4 @@ steps: setupCommandLine: | "%ProgramFiles%\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsMSBuildCmd.bat" msBuildCommandline: | - msbuild $(Build.SourcesDirectory)\src\MIDebugEngine.sln /p:Platform='AnyCPU' /p:Configuration=$(Configuration) \ No newline at end of file + msbuild $(Build.SourcesDirectory)\src\MIDebugEngine.sln /p:Platform='AnyCPU' /p:Configuration='Lab.Release' \ No newline at end of file From d66635145457c7cb43656000816f198556d9ce94 Mon Sep 17 00:00:00 2001 From: Gabrielle Chen Date: Fri, 15 Apr 2022 09:54:00 -0700 Subject: [PATCH 30/54] Roslyn Analyzer --- eng/pipelines/tasks/CSharp.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/pipelines/tasks/CSharp.yml b/eng/pipelines/tasks/CSharp.yml index 5a0065e55..77e185168 100644 --- a/eng/pipelines/tasks/CSharp.yml +++ b/eng/pipelines/tasks/CSharp.yml @@ -10,4 +10,4 @@ steps: setupCommandLine: | "%ProgramFiles%\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsMSBuildCmd.bat" msBuildCommandline: | - msbuild $(Build.SourcesDirectory)\src\MIDebugEngine.sln /p:Platform='AnyCPU' /p:Configuration='Lab.Release' \ No newline at end of file + msbuild $(Build.SourcesDirectory)\src\MIDebugEngine.sln /p:Platform=AnyCPU /p:Configuration=Lab.Release \ No newline at end of file From fa2c4262312bf5fe9ff1f4483ea38cb5edc35f4f Mon Sep 17 00:00:00 2001 From: Gabrielle Chen Date: Fri, 15 Apr 2022 10:24:51 -0700 Subject: [PATCH 31/54] Roslyn Analyzer --- eng/pipelines/tasks/CSharp.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/pipelines/tasks/CSharp.yml b/eng/pipelines/tasks/CSharp.yml index 77e185168..fd71545af 100644 --- a/eng/pipelines/tasks/CSharp.yml +++ b/eng/pipelines/tasks/CSharp.yml @@ -10,4 +10,4 @@ steps: setupCommandLine: | "%ProgramFiles%\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsMSBuildCmd.bat" msBuildCommandline: | - msbuild $(Build.SourcesDirectory)\src\MIDebugEngine.sln /p:Platform=AnyCPU /p:Configuration=Lab.Release \ No newline at end of file + msbuild $(Build.SourcesDirectory)\src\MIDebugEngine.sln /p:Platform="Any CPU" /p:Configuration="Release" \ No newline at end of file From d4158a97f6e212ca65490004bb3cf240e8b60751 Mon Sep 17 00:00:00 2001 From: Gabrielle Chen Date: Fri, 15 Apr 2022 14:02:25 -0700 Subject: [PATCH 32/54] Roslyn Analyzer --- eng/pipelines/tasks/CSharp.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/eng/pipelines/tasks/CSharp.yml b/eng/pipelines/tasks/CSharp.yml index fd71545af..c6c07a518 100644 --- a/eng/pipelines/tasks/CSharp.yml +++ b/eng/pipelines/tasks/CSharp.yml @@ -1,4 +1,11 @@ steps: +- task: NuGetCommand@2 + displayName: 'Restore MIEngine' + inputs: + restoreSolution: $(Build.SourcesDirectory)\src\MIDebugEngine.sln + feedsToUse: config + nugetConfigPath: NuGet.config + - task: securedevelopmentteam.vss-secure-development-tools.build-task-roslynanalyzers.RoslynAnalyzers@3 displayName: 'Run Roslyn Analyzers' inputs: From 00d234fa52445643e6c08f4ee86facab4939b768 Mon Sep 17 00:00:00 2001 From: Gabrielle Chen Date: Fri, 15 Apr 2022 14:28:56 -0700 Subject: [PATCH 33/54] Roslyn Analyzer: Fix NuGet file path --- eng/pipelines/tasks/CSharp.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/pipelines/tasks/CSharp.yml b/eng/pipelines/tasks/CSharp.yml index c6c07a518..597863af2 100644 --- a/eng/pipelines/tasks/CSharp.yml +++ b/eng/pipelines/tasks/CSharp.yml @@ -4,7 +4,7 @@ steps: inputs: restoreSolution: $(Build.SourcesDirectory)\src\MIDebugEngine.sln feedsToUse: config - nugetConfigPath: NuGet.config + nugetConfigPath: $(Build.SourcesDirectory)\src\.nuget\NuGet.config - task: securedevelopmentteam.vss-secure-development-tools.build-task-roslynanalyzers.RoslynAnalyzers@3 displayName: 'Run Roslyn Analyzers' From d7888f3aaa46cdb344f61c75b58e3e8e7b437579 Mon Sep 17 00:00:00 2001 From: Gabrielle Chen Date: Fri, 15 Apr 2022 15:17:34 -0700 Subject: [PATCH 34/54] Roslyn Analyzer --- eng/pipelines/tasks/CSharp.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/eng/pipelines/tasks/CSharp.yml b/eng/pipelines/tasks/CSharp.yml index 597863af2..a0850fad1 100644 --- a/eng/pipelines/tasks/CSharp.yml +++ b/eng/pipelines/tasks/CSharp.yml @@ -1,4 +1,8 @@ steps: +- task: NuGetToolInstaller@0 + inputs: + versionSpec: '5.8.0' + - task: NuGetCommand@2 displayName: 'Restore MIEngine' inputs: From e65e5a71eeaefaa5f116836a27fd4bc227f6bf2e Mon Sep 17 00:00:00 2001 From: Gabrielle Chen Date: Mon, 18 Apr 2022 07:39:31 -0700 Subject: [PATCH 35/54] Move tasks from Code Analysis to Build --- eng/pipelines/templates/Build.template.yml | 6 ++++++ eng/pipelines/templates/CodeAnalysis.template.yml | 6 +++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/eng/pipelines/templates/Build.template.yml b/eng/pipelines/templates/Build.template.yml index c8425388c..cad2a8012 100644 --- a/eng/pipelines/templates/Build.template.yml +++ b/eng/pipelines/templates/Build.template.yml @@ -15,6 +15,12 @@ steps: - template: ../tasks/MicroBuildPrefastPlugin.yml +- template: ../tasks/APIScan.yml + +- template: ../tasks/BinSkim.yml + +- template: ../tasks/CSharp.yml + - template: ../steps/BuildSolution.yml parameters: Configuration: ${{ parameters.Configuration }} diff --git a/eng/pipelines/templates/CodeAnalysis.template.yml b/eng/pipelines/templates/CodeAnalysis.template.yml index 5397b7f2e..2a2580e41 100644 --- a/eng/pipelines/templates/CodeAnalysis.template.yml +++ b/eng/pipelines/templates/CodeAnalysis.template.yml @@ -4,11 +4,11 @@ steps: - template: ../tasks/CredScan.yml -- template: ../tasks/BinSkim.yml +# - template: ../tasks/APIScan.yml -- template: ../tasks/CSharp.yml +# - template: ../tasks/BinSkim.yml -- template: ../tasks/APIScan.yml +# - template: ../tasks/CSharp.yml - template: ../tasks/PoliCheck.yml From b9d95ff2f4f04f9753a3dfe083fecb18b6622001 Mon Sep 17 00:00:00 2001 From: Gabrielle Chen Date: Mon, 18 Apr 2022 12:55:49 -0700 Subject: [PATCH 36/54] Addressed some PR comments --- eng/pipelines/MIDebugEngine-CI.yml | 22 +++++++++---------- eng/pipelines/tasks/APIScan.yml | 1 - eng/pipelines/tasks/BinSkim.yml | 6 ----- eng/pipelines/tasks/CSharp.yml | 11 ---------- eng/pipelines/templates/Build.template.yml | 4 ---- .../templates/CodeAnalysis.template.yml | 6 ++--- 6 files changed, 13 insertions(+), 37 deletions(-) diff --git a/eng/pipelines/MIDebugEngine-CI.yml b/eng/pipelines/MIDebugEngine-CI.yml index 8ead59e4f..05c72a7a6 100644 --- a/eng/pipelines/MIDebugEngine-CI.yml +++ b/eng/pipelines/MIDebugEngine-CI.yml @@ -1,17 +1,6 @@ --- name: $(Date:yyyMMdd).$(Rev:r) stages: -- stage: CodeAnalysis - dependsOn: [CI] - jobs: - - template: ./jobs/MSHosted-Windows.job.yml - parameters: - DisplayName: 'CodeAnalysis' - JobTemplate: - - template: ../templates/CodeAnalysis.template.yml - parameters: - Configuration: 'Lab.Debug' - - stage: CI dependsOn: [] variables: @@ -35,4 +24,15 @@ stages: - template: ../templates/Build.template.yml parameters: Configuration: 'Lab.Release' + +- stage: CodeAnalysis + dependsOn: [CI] + jobs: + - template: ./jobs/MSHosted-Windows.job.yml + parameters: + DisplayName: 'CodeAnalysis' + JobTemplate: + - template: ../templates/CodeAnalysis.template.yml + parameters: + Configuration: 'Lab.Debug' ... \ No newline at end of file diff --git a/eng/pipelines/tasks/APIScan.yml b/eng/pipelines/tasks/APIScan.yml index 55f828e96..e78288c11 100644 --- a/eng/pipelines/tasks/APIScan.yml +++ b/eng/pipelines/tasks/APIScan.yml @@ -27,7 +27,6 @@ steps: softwareVersionNum: '$(Build.BuildNumber)' symbolsFolder: 'SRV*http://symweb;$(Pipeline.Workspace)\ApiScanFiles' isLargeApp: false - verbosityLevel: none continueOnError: true env: AzureServicesAuthConnectionString: runAs=App;AppId=$(ApiScanClientId);TenantId=$(ApiScanTenant);AppKey=$(MIEngineApiScan) \ No newline at end of file diff --git a/eng/pipelines/tasks/BinSkim.yml b/eng/pipelines/tasks/BinSkim.yml index c6a9414df..4f38be438 100644 --- a/eng/pipelines/tasks/BinSkim.yml +++ b/eng/pipelines/tasks/BinSkim.yml @@ -1,10 +1,4 @@ steps: -- task: DownloadPipelineArtifact@2 - displayName: Download Pipeline Artifact - inputs: - source: "current" - path: "$(Pipeline.Workspace)" - - task: securedevelopmentteam.vss-secure-development-tools.build-task-binskim.BinSkim@3 displayName: 'Run BinSkim' inputs: diff --git a/eng/pipelines/tasks/CSharp.yml b/eng/pipelines/tasks/CSharp.yml index a0850fad1..fd71545af 100644 --- a/eng/pipelines/tasks/CSharp.yml +++ b/eng/pipelines/tasks/CSharp.yml @@ -1,15 +1,4 @@ steps: -- task: NuGetToolInstaller@0 - inputs: - versionSpec: '5.8.0' - -- task: NuGetCommand@2 - displayName: 'Restore MIEngine' - inputs: - restoreSolution: $(Build.SourcesDirectory)\src\MIDebugEngine.sln - feedsToUse: config - nugetConfigPath: $(Build.SourcesDirectory)\src\.nuget\NuGet.config - - task: securedevelopmentteam.vss-secure-development-tools.build-task-roslynanalyzers.RoslynAnalyzers@3 displayName: 'Run Roslyn Analyzers' inputs: diff --git a/eng/pipelines/templates/Build.template.yml b/eng/pipelines/templates/Build.template.yml index cad2a8012..182b9862b 100644 --- a/eng/pipelines/templates/Build.template.yml +++ b/eng/pipelines/templates/Build.template.yml @@ -15,10 +15,6 @@ steps: - template: ../tasks/MicroBuildPrefastPlugin.yml -- template: ../tasks/APIScan.yml - -- template: ../tasks/BinSkim.yml - - template: ../tasks/CSharp.yml - template: ../steps/BuildSolution.yml diff --git a/eng/pipelines/templates/CodeAnalysis.template.yml b/eng/pipelines/templates/CodeAnalysis.template.yml index 2a2580e41..5250a014e 100644 --- a/eng/pipelines/templates/CodeAnalysis.template.yml +++ b/eng/pipelines/templates/CodeAnalysis.template.yml @@ -4,11 +4,9 @@ steps: - template: ../tasks/CredScan.yml -# - template: ../tasks/APIScan.yml +- template: ../tasks/APIScan.yml -# - template: ../tasks/BinSkim.yml - -# - template: ../tasks/CSharp.yml +- template: ../tasks/BinSkim.yml - template: ../tasks/PoliCheck.yml From b50ee046992554a70ef8744aae75d767198c9945 Mon Sep 17 00:00:00 2001 From: Gabrielle Chen Date: Mon, 18 Apr 2022 13:19:57 -0700 Subject: [PATCH 37/54] Addressed PR comments --- eng/pipelines/tasks/CSharp.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/eng/pipelines/tasks/CSharp.yml b/eng/pipelines/tasks/CSharp.yml index fd71545af..c78cbd482 100644 --- a/eng/pipelines/tasks/CSharp.yml +++ b/eng/pipelines/tasks/CSharp.yml @@ -3,10 +3,8 @@ steps: displayName: 'Run Roslyn Analyzers' inputs: continueOnError: true - rulesetName: Custom msBuildVersion: 17.0 msBuildArchitecture: amd64 - customRuleset: $(Build.SourcesDirectory)\build\yaml\steps\codeanalysis\DevDivRoslynRequired.ruleset setupCommandLine: | "%ProgramFiles%\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsMSBuildCmd.bat" msBuildCommandline: | From cb4c6a57b099da29d3a7cd377182530881db2f54 Mon Sep 17 00:00:00 2001 From: Gabrielle Chen Date: Mon, 18 Apr 2022 15:17:27 -0700 Subject: [PATCH 38/54] Checking customRuleset for Roslyn Analyzers --- eng/pipelines/tasks/CSharp.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/eng/pipelines/tasks/CSharp.yml b/eng/pipelines/tasks/CSharp.yml index c78cbd482..fd71545af 100644 --- a/eng/pipelines/tasks/CSharp.yml +++ b/eng/pipelines/tasks/CSharp.yml @@ -3,8 +3,10 @@ steps: displayName: 'Run Roslyn Analyzers' inputs: continueOnError: true + rulesetName: Custom msBuildVersion: 17.0 msBuildArchitecture: amd64 + customRuleset: $(Build.SourcesDirectory)\build\yaml\steps\codeanalysis\DevDivRoslynRequired.ruleset setupCommandLine: | "%ProgramFiles%\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsMSBuildCmd.bat" msBuildCommandline: | From 2f9f489fe26766f48949b4542c87c22a266f57cd Mon Sep 17 00:00:00 2001 From: Gabrielle Chen Date: Tue, 19 Apr 2022 08:05:50 -0700 Subject: [PATCH 39/54] Stuck on ruleset for Roslyn Analyzers... --- eng/pipelines/tasks/CSharp.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/pipelines/tasks/CSharp.yml b/eng/pipelines/tasks/CSharp.yml index fd71545af..be4035768 100644 --- a/eng/pipelines/tasks/CSharp.yml +++ b/eng/pipelines/tasks/CSharp.yml @@ -3,10 +3,10 @@ steps: displayName: 'Run Roslyn Analyzers' inputs: continueOnError: true - rulesetName: Custom + # rulesetName: Custom msBuildVersion: 17.0 msBuildArchitecture: amd64 - customRuleset: $(Build.SourcesDirectory)\build\yaml\steps\codeanalysis\DevDivRoslynRequired.ruleset + # customRuleset: $(Build.SourcesDirectory)\build\yaml\steps\codeanalysis\DevDivRoslynRequired.ruleset # create this file setupCommandLine: | "%ProgramFiles%\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsMSBuildCmd.bat" msBuildCommandline: | From d34fa377b3897d05172b7b7350c4c455e81d72c3 Mon Sep 17 00:00:00 2001 From: Gabrielle Chen Date: Tue, 19 Apr 2022 08:39:06 -0700 Subject: [PATCH 40/54] Stuck on ruleset for Roslyn Analyzers... --- eng/pipelines/tasks/CSharp.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/eng/pipelines/tasks/CSharp.yml b/eng/pipelines/tasks/CSharp.yml index be4035768..972d000e2 100644 --- a/eng/pipelines/tasks/CSharp.yml +++ b/eng/pipelines/tasks/CSharp.yml @@ -10,4 +10,5 @@ steps: setupCommandLine: | "%ProgramFiles%\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsMSBuildCmd.bat" msBuildCommandline: | - msbuild $(Build.SourcesDirectory)\src\MIDebugEngine.sln /p:Platform="Any CPU" /p:Configuration="Release" \ No newline at end of file + # msbuild $(Build.SourcesDirectory)\src\MIDebugEngine.sln /p:Platform="Any CPU" /p:Configuration="Release" + msbuild $(Pipeline.Workspace)\src\MIDebugEngine.sln /p:Platform="Any CPU" /p:Configuration="Release" \ No newline at end of file From 65ba48752bbff34cf5695b03766fc98236dd324b Mon Sep 17 00:00:00 2001 From: Gabrielle Chen Date: Tue, 19 Apr 2022 09:06:29 -0700 Subject: [PATCH 41/54] Stuck on ruleset for Roslyn Analyzers... --- eng/pipelines/tasks/CSharp.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/eng/pipelines/tasks/CSharp.yml b/eng/pipelines/tasks/CSharp.yml index 972d000e2..be4035768 100644 --- a/eng/pipelines/tasks/CSharp.yml +++ b/eng/pipelines/tasks/CSharp.yml @@ -10,5 +10,4 @@ steps: setupCommandLine: | "%ProgramFiles%\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsMSBuildCmd.bat" msBuildCommandline: | - # msbuild $(Build.SourcesDirectory)\src\MIDebugEngine.sln /p:Platform="Any CPU" /p:Configuration="Release" - msbuild $(Pipeline.Workspace)\src\MIDebugEngine.sln /p:Platform="Any CPU" /p:Configuration="Release" \ No newline at end of file + msbuild $(Build.SourcesDirectory)\src\MIDebugEngine.sln /p:Platform="Any CPU" /p:Configuration="Release" \ No newline at end of file From b8654dcb3c27c24d3b80ab62731f0c5b0cd0ba13 Mon Sep 17 00:00:00 2001 From: Gabrielle Chen Date: Tue, 19 Apr 2022 09:37:57 -0700 Subject: [PATCH 42/54] Stuck on ruleset for Roslyn Analyzers... --- eng/pipelines/tasks/CSharp.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/eng/pipelines/tasks/CSharp.yml b/eng/pipelines/tasks/CSharp.yml index be4035768..30cdfe126 100644 --- a/eng/pipelines/tasks/CSharp.yml +++ b/eng/pipelines/tasks/CSharp.yml @@ -8,6 +8,7 @@ steps: msBuildArchitecture: amd64 # customRuleset: $(Build.SourcesDirectory)\build\yaml\steps\codeanalysis\DevDivRoslynRequired.ruleset # create this file setupCommandLine: | - "%ProgramFiles%\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsMSBuildCmd.bat" + # "%ProgramFiles%\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsMSBuildCmd.bat" + "%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\VsMSBuild.cmd" msBuildCommandline: | msbuild $(Build.SourcesDirectory)\src\MIDebugEngine.sln /p:Platform="Any CPU" /p:Configuration="Release" \ No newline at end of file From 03fd64b85e1f58202545ed80371f3d7b23b05fd4 Mon Sep 17 00:00:00 2001 From: Gabrielle Chen Date: Tue, 19 Apr 2022 09:56:23 -0700 Subject: [PATCH 43/54] Stuck on ruleset for Roslyn Analyzers... --- eng/pipelines/tasks/CSharp.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/eng/pipelines/tasks/CSharp.yml b/eng/pipelines/tasks/CSharp.yml index 30cdfe126..35553a857 100644 --- a/eng/pipelines/tasks/CSharp.yml +++ b/eng/pipelines/tasks/CSharp.yml @@ -8,7 +8,8 @@ steps: msBuildArchitecture: amd64 # customRuleset: $(Build.SourcesDirectory)\build\yaml\steps\codeanalysis\DevDivRoslynRequired.ruleset # create this file setupCommandLine: | - # "%ProgramFiles%\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsMSBuildCmd.bat" "%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\VsMSBuild.cmd" msBuildCommandline: | - msbuild $(Build.SourcesDirectory)\src\MIDebugEngine.sln /p:Platform="Any CPU" /p:Configuration="Release" \ No newline at end of file + msbuild $(Build.SourcesDirectory)\src\MIDebugEngine.sln /p:Platform="Any CPU" /p:Configuration="Release" + +# "%ProgramFiles%\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsMSBuildCmd.bat" \ No newline at end of file From 863aae52637589e25562c285ea05e79f1f7c508e Mon Sep 17 00:00:00 2001 From: Gabrielle Chen Date: Tue, 19 Apr 2022 10:50:59 -0700 Subject: [PATCH 44/54] Stuck on ruleset for Roslyn Analyzers... --- eng/pipelines/jobs/VSEngSS-MicroBuild2019-1ES.job.yml | 3 ++- eng/pipelines/tasks/CSharp.yml | 6 ++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/eng/pipelines/jobs/VSEngSS-MicroBuild2019-1ES.job.yml b/eng/pipelines/jobs/VSEngSS-MicroBuild2019-1ES.job.yml index 459a18afc..a7c01027c 100644 --- a/eng/pipelines/jobs/VSEngSS-MicroBuild2019-1ES.job.yml +++ b/eng/pipelines/jobs/VSEngSS-MicroBuild2019-1ES.job.yml @@ -8,7 +8,8 @@ jobs: - job: displayName: ${{ parameters.DisplayName }} pool: - name: VSEngSS-MicroBuild2019-1ES + # name: VSEngSS-MicroBuild2019-1ES + name: VSEngSS-MicroBuild2022-1ES demands: - msbuild - visualstudio diff --git a/eng/pipelines/tasks/CSharp.yml b/eng/pipelines/tasks/CSharp.yml index 35553a857..be4035768 100644 --- a/eng/pipelines/tasks/CSharp.yml +++ b/eng/pipelines/tasks/CSharp.yml @@ -8,8 +8,6 @@ steps: msBuildArchitecture: amd64 # customRuleset: $(Build.SourcesDirectory)\build\yaml\steps\codeanalysis\DevDivRoslynRequired.ruleset # create this file setupCommandLine: | - "%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\VsMSBuild.cmd" + "%ProgramFiles%\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsMSBuildCmd.bat" msBuildCommandline: | - msbuild $(Build.SourcesDirectory)\src\MIDebugEngine.sln /p:Platform="Any CPU" /p:Configuration="Release" - -# "%ProgramFiles%\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsMSBuildCmd.bat" \ No newline at end of file + msbuild $(Build.SourcesDirectory)\src\MIDebugEngine.sln /p:Platform="Any CPU" /p:Configuration="Release" \ No newline at end of file From 43ec270f37b725ffa453480f4d375fd27a4214c2 Mon Sep 17 00:00:00 2001 From: Gabrielle Chen Date: Tue, 19 Apr 2022 11:46:37 -0700 Subject: [PATCH 45/54] Stuck on ruleset for Roslyn Analyzers... --- eng/pipelines/tasks/CSharp.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/eng/pipelines/tasks/CSharp.yml b/eng/pipelines/tasks/CSharp.yml index be4035768..4a968a9f9 100644 --- a/eng/pipelines/tasks/CSharp.yml +++ b/eng/pipelines/tasks/CSharp.yml @@ -1,4 +1,15 @@ steps: +- task: NuGetToolInstaller@0 + inputs: + versionSpec: '5.8.0' + +- task: NuGetCommand@2 + displayName: 'Restore MIEngine' + inputs: + restoreSolution: $(Build.SourcesDirectory)\src\MIDebugEngine.sln + feedsToUse: config + nugetConfigPath: $(Build.SourcesDirectory)\src\.nuget\NuGet.config + - task: securedevelopmentteam.vss-secure-development-tools.build-task-roslynanalyzers.RoslynAnalyzers@3 displayName: 'Run Roslyn Analyzers' inputs: From 220ecfd07fa672ee966083ff70c140863cad1970 Mon Sep 17 00:00:00 2001 From: Gabrielle Chen Date: Tue, 19 Apr 2022 12:05:37 -0700 Subject: [PATCH 46/54] Stuck on ruleset for Roslyn Analyzers... --- eng/pipelines/tasks/CSharp.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/eng/pipelines/tasks/CSharp.yml b/eng/pipelines/tasks/CSharp.yml index 4a968a9f9..6f725a5eb 100644 --- a/eng/pipelines/tasks/CSharp.yml +++ b/eng/pipelines/tasks/CSharp.yml @@ -14,10 +14,8 @@ steps: displayName: 'Run Roslyn Analyzers' inputs: continueOnError: true - # rulesetName: Custom msBuildVersion: 17.0 msBuildArchitecture: amd64 - # customRuleset: $(Build.SourcesDirectory)\build\yaml\steps\codeanalysis\DevDivRoslynRequired.ruleset # create this file setupCommandLine: | "%ProgramFiles%\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsMSBuildCmd.bat" msBuildCommandline: | From 86b43b84409d0d674c55b4cf356e1af581e3dffd Mon Sep 17 00:00:00 2001 From: Gabrielle Chen Date: Tue, 19 Apr 2022 13:39:57 -0700 Subject: [PATCH 47/54] Addressing PR comments --- eng/pipelines/tasks/CSharp.yml | 11 ----------- eng/pipelines/templates/Build.template.yml | 4 ++-- 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/eng/pipelines/tasks/CSharp.yml b/eng/pipelines/tasks/CSharp.yml index 6f725a5eb..c78cbd482 100644 --- a/eng/pipelines/tasks/CSharp.yml +++ b/eng/pipelines/tasks/CSharp.yml @@ -1,15 +1,4 @@ steps: -- task: NuGetToolInstaller@0 - inputs: - versionSpec: '5.8.0' - -- task: NuGetCommand@2 - displayName: 'Restore MIEngine' - inputs: - restoreSolution: $(Build.SourcesDirectory)\src\MIDebugEngine.sln - feedsToUse: config - nugetConfigPath: $(Build.SourcesDirectory)\src\.nuget\NuGet.config - - task: securedevelopmentteam.vss-secure-development-tools.build-task-roslynanalyzers.RoslynAnalyzers@3 displayName: 'Run Roslyn Analyzers' inputs: diff --git a/eng/pipelines/templates/Build.template.yml b/eng/pipelines/templates/Build.template.yml index 182b9862b..502ddf823 100644 --- a/eng/pipelines/templates/Build.template.yml +++ b/eng/pipelines/templates/Build.template.yml @@ -15,12 +15,12 @@ steps: - template: ../tasks/MicroBuildPrefastPlugin.yml -- template: ../tasks/CSharp.yml - - template: ../steps/BuildSolution.yml parameters: Configuration: ${{ parameters.Configuration }} +- template: ../tasks/CSharp.yml + # Used for localization - template: ../steps/CollectAndPublishBinaries.yml parameters: From 6fb9f4f9a1eb69177c576d65da5993c7e6975df4 Mon Sep 17 00:00:00 2001 From: Gabrielle Chen Date: Tue, 19 Apr 2022 14:56:36 -0700 Subject: [PATCH 48/54] Addressing PR comments --- ...roBuild2019-1ES.job.yml => VSEngSS-MicroBuild2022-1ES.job.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename eng/pipelines/jobs/{VSEngSS-MicroBuild2019-1ES.job.yml => VSEngSS-MicroBuild2022-1ES.job.yml} (100%) diff --git a/eng/pipelines/jobs/VSEngSS-MicroBuild2019-1ES.job.yml b/eng/pipelines/jobs/VSEngSS-MicroBuild2022-1ES.job.yml similarity index 100% rename from eng/pipelines/jobs/VSEngSS-MicroBuild2019-1ES.job.yml rename to eng/pipelines/jobs/VSEngSS-MicroBuild2022-1ES.job.yml From fc5c055fc21a07957f52f401008fb2f732ad46e2 Mon Sep 17 00:00:00 2001 From: Gabrielle Chen Date: Tue, 19 Apr 2022 15:04:38 -0700 Subject: [PATCH 49/54] Addressing PR comments --- eng/pipelines/DebuggerTesting-release.yml | 2 +- eng/pipelines/MIDebugEngine-CI.yml | 4 ++-- eng/pipelines/VS-release.yml | 2 +- eng/pipelines/VSCode-release.yml | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/eng/pipelines/DebuggerTesting-release.yml b/eng/pipelines/DebuggerTesting-release.yml index 4a852cfae..a0f5bd99e 100644 --- a/eng/pipelines/DebuggerTesting-release.yml +++ b/eng/pipelines/DebuggerTesting-release.yml @@ -6,7 +6,7 @@ variables: - name: TeamName value: MDDDebugger jobs: -- template: ./jobs/VSEngSS-MicroBuild2019-1ES.job.yml +- template: ./jobs/VSEngSS-MicroBuild2022-1ES.job.yml parameters: DisplayName: DebuggerTesting JobTemplate: diff --git a/eng/pipelines/MIDebugEngine-CI.yml b/eng/pipelines/MIDebugEngine-CI.yml index 05c72a7a6..c41558db5 100644 --- a/eng/pipelines/MIDebugEngine-CI.yml +++ b/eng/pipelines/MIDebugEngine-CI.yml @@ -9,7 +9,7 @@ stages: - name: TeamName value: MDDDebugger jobs: - - template: ./jobs/VSEngSS-MicroBuild2019-1ES.job.yml + - template: ./jobs/VSEngSS-MicroBuild2022-1ES.job.yml parameters: DisplayName: 'Lab.Debug' JobTemplate: @@ -17,7 +17,7 @@ stages: parameters: Configuration: 'Lab.Debug' - - template: ./jobs/VSEngSS-MicroBuild2019-1ES.job.yml + - template: ./jobs/VSEngSS-MicroBuild2022-1ES.job.yml parameters: DisplayName: 'Lab.Release' JobTemplate: diff --git a/eng/pipelines/VS-release.yml b/eng/pipelines/VS-release.yml index c67f192e3..53e45bcee 100644 --- a/eng/pipelines/VS-release.yml +++ b/eng/pipelines/VS-release.yml @@ -3,7 +3,7 @@ name: $(Date:yyyMMdd).$(Rev:r) variables: - group: TSDTUSR jobs: -- template: ./jobs/VSEngSS-MicroBuild2019-1ES.job.yml +- template: ./jobs/VSEngSS-MicroBuild2022-1ES.job.yml parameters: DisplayName: 'VS_Release' JobTemplate: diff --git a/eng/pipelines/VSCode-release.yml b/eng/pipelines/VSCode-release.yml index 94a1c211e..5cc6cfa31 100644 --- a/eng/pipelines/VSCode-release.yml +++ b/eng/pipelines/VSCode-release.yml @@ -6,7 +6,7 @@ stages: - stage: Windows dependsOn: [] jobs: - - template: ./jobs/VSEngSS-MicroBuild2019-1ES.job.yml + - template: ./jobs/VSEngSS-MicroBuild2022-1ES.job.yml parameters: DisplayName: 'VSCode_Release' JobTemplate: @@ -24,7 +24,7 @@ stages: - stage: OSX_ESRPSign dependsOn: [OSX_CodeSign] jobs: - - template: ./jobs/VSEngSS-MicroBuild2019-1ES.job.yml + - template: ./jobs/VSEngSS-MicroBuild2022-1ES.job.yml parameters: DisplayName: 'OSX Sign/Harden' JobTemplate: From d863615c0713b71edce56c690d3349dc2a2b076f Mon Sep 17 00:00:00 2001 From: Gabrielle Chen Date: Tue, 19 Apr 2022 15:09:15 -0700 Subject: [PATCH 50/54] Addressing PR comments --- eng/pipelines/tasks/APIScan.yml | 6 ------ eng/pipelines/templates/CodeAnalysis.template.yml | 6 ++++++ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/eng/pipelines/tasks/APIScan.yml b/eng/pipelines/tasks/APIScan.yml index e78288c11..e359faf30 100644 --- a/eng/pipelines/tasks/APIScan.yml +++ b/eng/pipelines/tasks/APIScan.yml @@ -1,10 +1,4 @@ steps: -- task: DownloadPipelineArtifact@2 - displayName: Download Pipeline Artifact - inputs: - source: "current" - path: "$(Pipeline.Workspace)" - - task: CopyFiles@2 displayName: 'Copy Files to: $(Pipeline.Workspace)\ApiScanFiles' inputs: diff --git a/eng/pipelines/templates/CodeAnalysis.template.yml b/eng/pipelines/templates/CodeAnalysis.template.yml index 5250a014e..b2426e392 100644 --- a/eng/pipelines/templates/CodeAnalysis.template.yml +++ b/eng/pipelines/templates/CodeAnalysis.template.yml @@ -4,6 +4,12 @@ steps: - template: ../tasks/CredScan.yml +- task: DownloadPipelineArtifact@2 + displayName: Download Pipeline Artifact + inputs: + source: "current" + path: "$(Pipeline.Workspace)" + - template: ../tasks/APIScan.yml - template: ../tasks/BinSkim.yml From 03addc3a0003b6691dda4a399be1fe0892e7dbd3 Mon Sep 17 00:00:00 2001 From: Gabrielle Chen Date: Wed, 20 Apr 2022 08:44:06 -0700 Subject: [PATCH 51/54] Address PR comments --- eng/pipelines/{tasks => steps}/APIScan.yml | 5 ++++- eng/pipelines/templates/CodeAnalysis.template.yml | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) rename eng/pipelines/{tasks => steps}/APIScan.yml (89%) diff --git a/eng/pipelines/tasks/APIScan.yml b/eng/pipelines/steps/APIScan.yml similarity index 89% rename from eng/pipelines/tasks/APIScan.yml rename to eng/pipelines/steps/APIScan.yml index e359faf30..6bcd493bc 100644 --- a/eng/pipelines/tasks/APIScan.yml +++ b/eng/pipelines/steps/APIScan.yml @@ -1,8 +1,11 @@ +paraeters: + FolderToScan: '$(Pipeline.Workspace)\Lab.Release' + steps: - task: CopyFiles@2 displayName: 'Copy Files to: $(Pipeline.Workspace)\ApiScanFiles' inputs: - SourceFolder: '$(Pipeline.Workspace)\Lab.Release' + SourceFolder: ${{ parameters.FolderToScan }} Contents: | **\*Microsoft@(*.dll|*.pdb|*.exe) **\*Newtonsoft@(*.dll|*.pdb|*.exe) diff --git a/eng/pipelines/templates/CodeAnalysis.template.yml b/eng/pipelines/templates/CodeAnalysis.template.yml index b2426e392..593299bac 100644 --- a/eng/pipelines/templates/CodeAnalysis.template.yml +++ b/eng/pipelines/templates/CodeAnalysis.template.yml @@ -10,7 +10,9 @@ steps: source: "current" path: "$(Pipeline.Workspace)" -- template: ../tasks/APIScan.yml +- template: ../steps/APIScan.yml + parameters: + FolderToScan: ${{ parameters.FolderToScan }} - template: ../tasks/BinSkim.yml From 99ae9562c2149fed581bbb5cd496ccb5d07e6d4c Mon Sep 17 00:00:00 2001 From: Gabrielle Chen Date: Wed, 20 Apr 2022 08:46:52 -0700 Subject: [PATCH 52/54] Address PR comments --- eng/pipelines/steps/APIScan.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/pipelines/steps/APIScan.yml b/eng/pipelines/steps/APIScan.yml index 6bcd493bc..7633c3b58 100644 --- a/eng/pipelines/steps/APIScan.yml +++ b/eng/pipelines/steps/APIScan.yml @@ -1,4 +1,4 @@ -paraeters: +parameters: FolderToScan: '$(Pipeline.Workspace)\Lab.Release' steps: From 499cfd017cfd4c21b3942aeda44eb427ad34699e Mon Sep 17 00:00:00 2001 From: Gabrielle Chen Date: Wed, 20 Apr 2022 09:44:07 -0700 Subject: [PATCH 53/54] Address PR comments --- eng/pipelines/templates/CodeAnalysis.template.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/pipelines/templates/CodeAnalysis.template.yml b/eng/pipelines/templates/CodeAnalysis.template.yml index 593299bac..20388caaf 100644 --- a/eng/pipelines/templates/CodeAnalysis.template.yml +++ b/eng/pipelines/templates/CodeAnalysis.template.yml @@ -12,7 +12,7 @@ steps: - template: ../steps/APIScan.yml parameters: - FolderToScan: ${{ parameters.FolderToScan }} + FolderToScan: $(Pipeline.Workspace)\Lab.Release - template: ../tasks/BinSkim.yml From 7b60ba7d4caca41a5d148a9b646b24272005e7b4 Mon Sep 17 00:00:00 2001 From: Gabrielle Chen Date: Wed, 20 Apr 2022 10:43:08 -0700 Subject: [PATCH 54/54] Remove extraneous comment --- eng/pipelines/jobs/VSEngSS-MicroBuild2022-1ES.job.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/eng/pipelines/jobs/VSEngSS-MicroBuild2022-1ES.job.yml b/eng/pipelines/jobs/VSEngSS-MicroBuild2022-1ES.job.yml index a7c01027c..6b4258f14 100644 --- a/eng/pipelines/jobs/VSEngSS-MicroBuild2022-1ES.job.yml +++ b/eng/pipelines/jobs/VSEngSS-MicroBuild2022-1ES.job.yml @@ -8,7 +8,6 @@ jobs: - job: displayName: ${{ parameters.DisplayName }} pool: - # name: VSEngSS-MicroBuild2019-1ES name: VSEngSS-MicroBuild2022-1ES demands: - msbuild