diff --git a/eng/common/pipelines/templates/steps/publish-1es-artifact.yml b/eng/common/pipelines/templates/steps/publish-1es-artifact.yml index a875f052dfe..15663cce30d 100644 --- a/eng/common/pipelines/templates/steps/publish-1es-artifact.yml +++ b/eng/common/pipelines/templates/steps/publish-1es-artifact.yml @@ -31,4 +31,6 @@ steps: inputs: artifactName: '$(PublishArtifactName)' targetPath: '${{ parameters.ArtifactPath }}' - sbomEnabled: ${{ parameters.SbomEnabled }} + # Disable sbom generation by default for forked PR builds to avoid a bunch of warnings + ${{ if not(and(eq(variables['Build.Reason'],'PullRequest'), eq(variables['System.PullRequest.IsFork'], 'True'))) }}: + sbomEnabled: ${{ parameters.SbomEnabled }}