Assignment 2-Microsoft Defender for DevOps
Assignment 2-Microsoft Defender for DevOps
In this lab, you will configure Defender for DevOps. Microsoft Security DevOps is a
command line application that integrates static analysis tools into the development
lifecycle. Microsoft Security DevOps installs, configures, and runs the latest versions
of static analysis tools (including, but not limited to, SDL/security and compliance
tools).
The Microsoft Security DevOps uses the following Open Source tools: Bandit,
BinSkim, ESlint, Credscan, Template Analyzer, Terrascan and Trivy.
Objectives
After completing this lab, you will be able to:
Lab Environment
• Azure DevOps
• GitHub Actions
export PATH="/home/kali/.local/bin:$PATH"
iv.Run the scanner - We are using the tee command here to show the output and store it in a
file simultaneously. bandit -r . Basic scan
2. On the Marketplace, search for Microsoft Security DevOps and open it.
3. On the Microsoft Security DevOps page, click on Get it for free.
4. On the next page, select the desired Azure DevOps organization and Install. Proceed to
organization once installed.
5. Navigate to your VulnDjango project, then Pipelines and Click New pipeline.
6. On the Where is your code? window, select Azure Repos Git (YAML) and select
the VulnDjango repository.
7. On Add the following scripts as in into the yaml file.
8. Click Save and run and let the pipeline run. You can check progress by going to Pipeline-
Pipelines and select the running pipeline.
9. When done, you can view security vulnerabilities found by Microsoft Security DevOps , by
clicking Scans.
Note: Install the SARIF SAST Scans Tab extension on the Azure DevOps organization in
order to ensure that the generated analysis results will be displayed automatically under
the Scans tab.
https://learn.microsoft.com/en-us/azure/defender-for-cloud/azure-devops-extension
jobs:
sample:
steps:
- uses: actions/checkout@v3
- uses: actions/setup-dotnet@v3
with:
dotnet-version: |
5.0.x
6.0.x
# Run analyzers
- name: Run Microsoft Security DevOps Analysis
uses: microsoft/security-devops-action@preview
id: msdo