|
| 1 | +# Last applied at: Fri, 24 Jan 2025 13:36:26 GMT |
| 2 | +# DevOps Shield - The ultimate DevSecOps platform designed to secure your DevOps. |
| 3 | +# https://devopsshield.com |
| 4 | +############################################################## |
| 5 | +# This is a DevOps Shield - Application Security - Code Security Template. |
| 6 | + |
| 7 | +# This workflow template uses actions that are not certified by DevOps Shield. |
| 8 | +# They are provided by a third-party and are governed by separate terms of service, privacy policy, and support documentation. |
| 9 | + |
| 10 | +# Use this workflow template for integrating code security into your pipelines and workflows. |
| 11 | + |
| 12 | +# DevOps Shield Workflow Template Details: |
| 13 | +# ------------------------------------------------------------ |
| 14 | +# Code: GH_MSDO_Microsoft_Security_DevOps |
| 15 | +# Name: Microsoft Security DevOps (MSDO) - Defender for DevOps |
| 16 | +# DevSecOpsControls: SAST, CIS, IACS |
| 17 | +# Provider: Microsoft |
| 18 | +# Categories: Code Scanning, Dockerfile, Python, JavaScript, EcmaScript, TypeScript, C#, .NET, ARM Template, Bicep, Kubernetes, JSON, YAML, CloudFormation, HCL, Terraform |
| 19 | +# Description: |
| 20 | +# Microsoft Security DevOps (MSDO) is a command line application which integrates static analysis tools into the development cycle. |
| 21 | +# MSDO installs, configures and runs the latest versions of static analysis tools (including, but not limited to, SDL/security and compliance tools). |
| 22 | +# Defender for DevOps helps integrate multiple tools with Advanced Security and sends the results to Defender for Cloud dashboard. |
| 23 | +# Please note this workflow do not integrate with Microsoft Defender For DevOps. |
| 24 | +# You have to create an integration and provide permission before this can report data back to Azure. |
| 25 | +# Read the official documentation to find out more. |
| 26 | +# For more information: |
| 27 | +# https://github.com/microsoft/security-devops-action |
| 28 | +# https://learn.microsoft.com/en-us/azure/defender-for-cloud/github-action |
| 29 | +# https://learn.microsoft.com/en-us/azure/defender-for-cloud/quickstart-onboard-github |
| 30 | +# ------------------------------------------------------------ |
| 31 | +# Source repository: https://github.com/microsoft/security-devops-action |
| 32 | +############################################################## |
| 33 | + |
| 34 | +name: Microsoft Security DevOps (MSDO) - Defender for DevOps |
| 35 | + |
| 36 | +on: |
| 37 | + push: |
| 38 | + branches: [ main ] |
| 39 | + pull_request: |
| 40 | + branches: [ main ] |
| 41 | + schedule: |
| 42 | + - cron: 0 0 * * 0 |
| 43 | + |
| 44 | +jobs: |
| 45 | + MSDO: |
| 46 | + name: Microsoft Security DevOps (MSDO) |
| 47 | + |
| 48 | + # Windows and Linux agents are supported |
| 49 | + runs-on: windows-latest |
| 50 | + |
| 51 | + permissions: |
| 52 | + contents: read |
| 53 | + # Write access for security-events is only required for customers looking for MSDO results to appear in the codeQL security alerts tab on GitHub (Requires GHAS) |
| 54 | + security-events: write |
| 55 | + |
| 56 | + steps: |
| 57 | + # Checkout your code repository to scan |
| 58 | + - uses: actions/checkout@v4 |
| 59 | + |
| 60 | + # Run analyzers |
| 61 | + - name: Run Microsoft Security DevOps |
| 62 | + uses: microsoft/security-devops-action@v1.6.0 |
| 63 | + id: msdo |
| 64 | + # with: |
| 65 | + # config: string. Optional. A file path to an MSDO configuration file ('*.gdnconfig'). |
| 66 | + # policy: 'GitHub' | 'microsoft' | 'none'. Optional. The name of a well-known Microsoft policy. If no configuration file or list of tools is provided, the policy may instruct MSDO which tools to run. Default: GitHub. |
| 67 | + # categories: string. Optional. A comma-separated list of analyzer categories to run. Values: 'code', 'artifacts', 'IaC', 'containers'. Example: 'IaC, containers'. Defaults to all. |
| 68 | + # languages: string. Optional. A comma-separated list of languages to analyze. Example: 'javascript,typescript'. Defaults to all. |
| 69 | + # tools: string. Optional. A comma-separated list of analyzer tools to run. Values: 'bandit', 'binskim', 'checkov', 'eslint', 'templateanalyzer', 'terrascan', 'trivy'. |
| 70 | + |
| 71 | + # Upload alerts to the Security tab - required for MSDO results to appear in the codeQL security alerts tab on GitHub (Requires GHAS) |
| 72 | + - name: Upload results to Security tab |
| 73 | + uses: github/codeql-action/upload-sarif@v3 |
| 74 | + with: |
| 75 | + sarif_file: ${{ steps.msdo.outputs.sarifFile }} |
0 commit comments