Skip to content

Commit 44f05ad

Browse files
authored
Merge pull request #9475 from dotnet/dev/adamint/fix-codesign-warnings
Removes files that do not need code signing checked
2 parents 8b160e5 + a31a38f commit 44f05ad

File tree

2 files changed

+26
-34
lines changed

2 files changed

+26
-34
lines changed

eng/pipelines/templates/analyze-compliance.yml

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ parameters:
66

77
steps:
88
# Most SDL tasks are run through the 1ES official pipeline template: https://eng.ms/docs/cloud-ai-platform/devdiv/one-engineering-system-1es/1es-docs/1es-pipeline-templates/features/sdlanalysis/overview
9-
# However, we still must run CodeSign and APIScan ourselves
9+
# However, we still must run APIScan ourselves
1010

1111
###################################################################################################################################################################
1212
# RUN ANALYSIS
@@ -19,33 +19,6 @@ steps:
1919
displayName: === Run Analysis ===
2020
condition: false
2121

22-
# Verify the loose DLLs are signed appropriately.
23-
# Note: This task takes ~3 minutes only because it is the first Guardian task in this job. So, it installs the Guardian components so the other tasks don't have to.
24-
# YAML reference: https://eng.ms/docs/security-compliance-identity-and-management-scim/security/azure-security/cloudai-security-fundamentals-engineering/security-integration/guardian-wiki/sdl-azdo-extension/code-signing-validation-build-task#v1-preview
25-
- task: CodeSign@1
26-
displayName: Verify Signed DLLs
27-
inputs:
28-
Path: $(Build.SourcesDirectory)/artifacts/$(BuildConfiguration)/bin/Dlls/
29-
# Glob Format: https://dev.azure.com/securitytools/SecurityIntegration/_wiki/wikis/Guardian/1378/Glob-Format
30-
Targets: '**/Microsoft.VisualStudio.AppDesigner*.dll;**/Microsoft.VisualStudio.Editors*.dll;**/Microsoft.VisualStudio.ProjectSystem.Managed*.dll'
31-
condition: succeededOrFailed()
32-
33-
# Verifies the packages (and files within) are signed appropriately.
34-
- task: MicroBuildCodesignVerify@3
35-
displayName: Verify Signed Packages
36-
inputs:
37-
TargetFolders: |
38-
$(Build.SourcesDirectory)/artifacts/$(BuildConfiguration)/packages
39-
$(Build.SourcesDirectory)/artifacts/$(BuildConfiguration)/VSSetup/Insertion
40-
# Filters out certain files (usually by extension) for Authenticode certificate verification.
41-
# File Format:
42-
# Wildcards (* and ?) can be used and paths are relative to the TargetFolders locations.
43-
# Format is one entry per line followed by a comma and then a comment as to why the entry is approved.
44-
ApprovalListPathForCerts: $(Build.SourcesDirectory)/eng/pipelines/configuration/AuthenticodeSigningFilter.txt
45-
# The bootstrapper folder is placed inside the VSSetup/Insertion folder. We don't want to verify the VS bootstrapper for signing.
46-
ExcludeFolders: bootstrapper
47-
condition: succeededOrFailed()
48-
4922
# Scan for the use of undocumented APIs.
5023
# YAML reference: https://eng.ms/docs/security-compliance-identity-and-management-scim/security/azure-security/cloudai-security-fundamentals-engineering/security-integration/guardian-wiki/sdl-azdo-extension/apiscan-build-task#v2
5124
- task: APIScan@2

eng/pipelines/templates/build-official-release.yml

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ jobs:
2626
zipSources: false
2727
sbom:
2828
enabled: true
29-
outputParentDirectory: $(Build.SourcesDirectory)/artifacts
29+
outputParentDirectory: $(Build.SourcesDirectory)/artifacts/output
3030
outputs:
3131
# Publish artifacts
3232
- output: pipelineArtifact
3333
displayName: Publish Build Artifacts
34-
targetPath: $(Build.SourcesDirectory)/artifacts/$(BuildConfiguration)
34+
targetPath: $(Build.SourcesDirectory)/artifacts/output
3535
artifactName: $(Build.BuildNumber)
3636
condition: succeededOrFailed()
3737
- output: pipelineArtifact
@@ -41,13 +41,13 @@ jobs:
4141
condition: succeededOrFailed()
4242
- output: pipelineArtifact
4343
displayName: Publish Loc Artifacts
44-
targetPath: $(Build.SourcesDirectory)/artifacts/$(BuildConfiguration)/bin/Dlls/
44+
targetPath: $(Build.SourcesDirectory)/artifacts/output/bin/Dlls/
4545
artifactName: Loc
4646
condition: succeededOrFailed()
4747

4848
# Publish VS drop
4949
- output: microBuildVstsDrop
50-
dropFolder: $(Build.SourcesDirectory)/artifacts/$(BuildConfiguration)/VSSetup/Insertion
50+
dropFolder: $(Build.SourcesDirectory)/artifacts/output/VSSetup/Insertion
5151
# TODO: Consider using $(GitBuildVersion) instead of $(Build.BuildNumber) as it better correlates the build of the code to the VS insertion.
5252
# Meaning, instead of VS Insertion -> Pipeline BuildNumber -> Code BuildVersion, it would just be VS Insertion -> Code BuildVersion.
5353
# If this is updated, VstsDropNames set in build-official-release.yml would also need to be updated.
@@ -250,8 +250,27 @@ jobs:
250250
- powershell: Copy-Item -Path '$(Build.SourcesDirectory)/eng/pipelines/configuration/staging.artifactignore' -Destination '$(Build.StagingDirectory)/.artifactignore'
251251
displayName: Copy Staging Artifact Filter
252252
condition: succeededOrFailed()
253-
254-
# Authenticate with a service connection to be able to publish packages to external (different DevOps organization) NuGet feeds.
253+
254+
# This output folder is used for 1ES code signing validation
255+
- task: CopyFiles@2
256+
displayName: Copy necessary files to output folder
257+
inputs:
258+
SourceFolder: $(Build.SourcesDirectory)/artifacts/$(BuildConfiguration)
259+
TargetFolder: $(Build.SourcesDirectory)/artifacts/output
260+
Contents: |
261+
*\**
262+
!obj\**
263+
!bin\UnitTests\**
264+
!bin\IntegrationTests\**
265+
!bin\Dlls\net472\ProjectSystemSetup.dll
266+
!bin\Dlls\net472\ProjectSystem.dll
267+
!bin\Dlls\net472\VisualStudioEditorsSetup.dll
268+
!bin\Dlls\net472\Setup.dll
269+
!SymStore\**
270+
!VSSetup\Insertion\bootstrapper\**\vs_enterprise.exe
271+
272+
273+
# Authenticate with a service connection to be able to publish packages to external (different DevOps organization) NuGet feeds.
255274
# See: https://docs.microsoft.com/azure/devops/pipelines/tasks/package/nuget-authenticate?view=azure-devops
256275
# This connecction is used in the templateContext nuget outputs.
257276
- task: NuGetAuthenticate@1

0 commit comments

Comments
 (0)