Analyzes the code in an Azure Repos Git repository to find security vulnerabilities and coding errors. You must have GitHub Advanced Security for Azure DevOps enabled for the repository being scanned.
Syntax
YAML
# Advanced Security Perform CodeQL analysis v1# Finalizes the CodeQL database and runs the analysis queries.- task:AdvancedSecurity-Codeql-Analyze@1 inputs:#WaitForProcessing: false # boolean. Enable Wait for Processing. Default: false.#WaitForProcessingInterval: '5' # string. Optional. Use when WaitForProcessing = true. Wait for Processing Time Interval. Default: 5.#WaitForProcessingTimeout: '120' # string. Optional. Use when WaitForProcessing = true. Wait for Processing Timeout. Default: 120.
Inputs
WaitForProcessing - Enable Wait for Processing boolean. Default value: false.
Wait for Advanced Security to process published SARIF file before completing.
WaitForProcessingInterval - Wait for Processing Time Interval string. Optional. Use when WaitForProcessing = true. Default value: 5.
Time, in seconds, to wait between each call to Advanced Security to check SARIF processing status.
WaitForProcessingTimeout - Wait for Processing Timeout string. Optional. Use when WaitForProcessing = true. Default value: 120.
Time, in seconds, to wait for Advanced Security to process SARIF file before completing.
This task is supported with Azure Repos Git repositories only.
Prerequisites
For the task to successfully complete and populate the Advanced Security tab for the scanned repository, Advanced Security must be enabled for that repository prior to running a build with the dependency scanning task included.
The pipeline must call the tasks in the following order.
Initialize CodeQL
AutoBuild (or your custom build tasks)
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 analysis task must appear after the initialize task for successful completion.
YAML
# Initialize CodeQL database - task:AdvancedSecurity-Codeql-Init@1 inputs: languages:'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'
შემოუერთდით Meetup სერიას, რათა შექმნათ მასშტაბური AI გადაწყვეტილებები რეალურ სამყაროში გამოყენების შემთხვევებზე დაყრდნობით თანამემამულე დეველოპერებთან და ექსპერტებთან.