Skip to content

Latest commit

 

History

History
130 lines (94 loc) · 4.58 KB

advanced-security-codeql-autobuild-v1.md

File metadata and controls

130 lines (94 loc) · 4.58 KB
title description ms.date monikerRange
AdvancedSecurity-Codeql-Autobuild@1 - Advanced Security AutoBuild v1 task
Attempts to build the repository by finding and building project files in the source folder.
05/14/2024
=azure-pipelines

AdvancedSecurity-Codeql-Autobuild@1 - Advanced Security AutoBuild v1 task

:::moniker range="=azure-pipelines"

Attempts to automatically build your project for CodeQL analysis by finding and building project files in the source folder. This task is not required if you have your own custom build steps, or if you are not using cpp, java, csharp, or swift. You must have GitHub Advanced Security for Azure DevOps enabled for the repository being scanned.

:::moniker-end

Syntax

:::moniker range="=azure-pipelines"

# Advanced Security AutoBuild v1
# Attempts to build the repository by finding and building project files in the source folder.
- task: AdvancedSecurity-Codeql-Autobuild@1
  inputs: # none

:::moniker-end

Inputs

:::moniker range="=azure-pipelines"

None.

:::moniker-end

Task control options

All tasks have control options in addition to their task inputs. For more information, see Control options and common task properties.

Output variables

:::moniker range="=azure-pipelines"

None.

:::moniker-end

Remarks

Important

This task is supported with Azure Repos Git repositories only.

The AdvancedSecurity-Codeql-Autobuild@1 task attempts to build the project file in your repository. If AdvancedSecurity-Codeql-Autobuild@1 cannot build your project, remove the AdvancedSecurity-Codeql-Autobuild@1 task and replace it with your custom build steps.

This task is not required if you have your own custom build steps, or if you are not using cpp, java, csharp, or swift. You must have GitHub Advanced Security for Azure DevOps enabled for the repository being scanned.

The pipeline must call the tasks in the following order.

  1. Initialize CodeQL
  2. AutoBuild (or your custom build tasks)
  3. Perform CodeQL analysis

The AutoBuild task is optional and may be replaced with your custom build tasks. Either AutoBuild or your custom build tasks must be run for your project to be analyzed.

The AdvancedSecurity-Codeql-Autobuild@1 task must appear after the initialize step for successful completion.

# Initialize CodeQL database 
- task: AdvancedSecurity-Codeql-Init@1
  inputs: 
    language: csharp 
  displayName: 'Advanced Security Initialize CodeQL' 

# Build project using Autobuild or your own custom build steps 
- task: AdvancedSecurity-Codeql-Autobuild@1
  displayName: 'Advanced Security Autobuild' 

# Run analysis 
- task: AdvancedSecurity-Codeql-Analyze@1
  displayName: 'Advanced Security Code Scanning' 

Requirements

:::moniker range="=azure-pipelines"

Requirement Description
Pipeline types YAML, Classic build, Classic release
Runs on Agent, DeploymentGroup
Demands None
Capabilities This task does not satisfy any demands for subsequent tasks in the job.
Command restrictions Any
Settable variables Any
Agent version All supported agent versions.
Task category Build

:::moniker-end

See also