Microsoft Security DevOps for Azure DevOps
An extension for Azure DevOps that contributes a build task to run the Microsoft Security DevOps CLI.
- Installs the Microsoft Security DevOps CLI
- Installs the latest Microsoft security policy
- Installs the latest Microsoft and 3rd party security tools
- Automatic or user-provided configuration of security tools
- Execution of a full suite of security tools
- Normalized processing of results into the SARIF format
- Build breaks and more
Dependencies
- The
MicrosoftSecurityDevOps
build task depends on .NET 6.
- The CredScan analyzer depends on .NET 3.1.
Microsoft-hosted build agents ship with an included list of software. To see if your agent image comes with these pre-installed, see here.
To install these dependencies at runtime, run the following tasks before the MicrosoftSecurityDevOps
task.
- task: UseDotNet@2
displayName: 'Use dotnet 3.1'
inputs:
version: 3.1.x
- task: UseDotNet@2
displayName: 'Use dotnet 6.0'
inputs:
version: 6.0.x
Basic
Add the MicrosoftSecurityDevOps
build task to your pipeline's yaml:
steps:
- task: MicrosoftSecurityDevOps@1
displayName: 'Run Microsoft Security DevOps'
The publish
input option is defaulted to true. If true, this will publish a SARIF formatted results file as a build artifact to CodeAnalysisLogs/msdo.sarif
.
View Results
To better view the results of the scan, outside of the console output and results file, the SARIF SAST Scans Tab Azure DevOps extension can be installed in parallel. It will look for *.sarif
files in the CodeAnalysisLogs
build artifact directory and display them as source annotations.