diff --git a/build-tools/automation/azure-pipelines.yaml b/build-tools/automation/azure-pipelines.yaml index ca669345f15..6d269e1fc73 100644 --- a/build-tools/automation/azure-pipelines.yaml +++ b/build-tools/automation/azure-pipelines.yaml @@ -74,7 +74,10 @@ extends: binskim: scanOutputDirectoryOnly: true codeql: - runSourceLanguagesInSourceAnalysis: true + ${{ if ne(variables['Build.SourceBranch'], 'refs/heads/main') }}: + compiled: + enabled: false + justificationForDisabling: CodeQL disabled for non-main branch builds policheck: enabled: false justification: Built in task does not support multi-language scanning diff --git a/build-tools/automation/yaml-templates/build-linux.yaml b/build-tools/automation/yaml-templates/build-linux.yaml index f34a25ba776..796b5fe5df0 100644 --- a/build-tools/automation/yaml-templates/build-linux.yaml +++ b/build-tools/automation/yaml-templates/build-linux.yaml @@ -35,6 +35,11 @@ stages: CC: gcc-10 ${{ if eq(parameters.use1ESTemplate, true) }}: templateContext: + sdl: + codeql: + compiled: + enabled: false + justificationForDisabling: CodeQL runs against the Windows build and nightly macOS build outputs: - output: pipelineArtifact displayName: upload linux sdk diff --git a/build-tools/automation/yaml-templates/build-macos.yaml b/build-tools/automation/yaml-templates/build-macos.yaml index c279a6752ba..eafc4c7499d 100644 --- a/build-tools/automation/yaml-templates/build-macos.yaml +++ b/build-tools/automation/yaml-templates/build-macos.yaml @@ -43,6 +43,11 @@ stages: clean: all ${{ if eq(parameters.use1ESTemplate, true) }}: templateContext: + sdl: + codeql: + compiled: + enabled: false + justificationForDisabling: CodeQL runs against the Windows build and nightly macOS build outputParentDirectory: ${{ parameters.xaSourcePath }}/bin outputs: - output: pipelineArtifact