Skip to content

Commit 545f668

Browse files
TGTGamerymc9
authored andcommitted
feat(security-defender-for-devops.yml): add GitHub Actions workflow for Microsoft Defender For DevOps security checks
1 parent 520b469 commit 545f668

File tree

1 file changed

+107
-0
lines changed

1 file changed

+107
-0
lines changed
Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
###
2+
# @format
3+
# -----
4+
# Project: zenstack-monorepo
5+
# File: security-defender-for-devops.yml
6+
# Path: \.github\workflows\security-defender-for-devops.yml
7+
# Created Date: Monday, February 19th 2024
8+
# Author: Jonathan Stevens, jonathan@resnovas.com
9+
# Github: https://github.com/TGTGamer
10+
# -----
11+
# Contributing: Please read through our contributing guidelines.
12+
# Included are directions for opening issues, coding standards,
13+
# and notes on development. These can be found at
14+
# https://github.com/zenstack-monorepo/blob/develop/CONTRIBUTING.md
15+
# -----
16+
# Code of Conduct: This project abides by the Contributor Covenant, v2.0
17+
# Please interact in ways that contribute to an open, welcoming, diverse,
18+
# inclusive, and healthy community. Our Code of Conduct can be found at
19+
# https://github.com/zenstack-monorepo/blob/develop/CODE_OF_CONDUCT.md
20+
# -----
21+
# Copyright (c) 2024 ZenstackHQ - All Rights Reserved
22+
# LICENSE: MIT License (MIT)
23+
# -----
24+
# This program has been provided under confidence of the copyright holder and
25+
# is licensed for copying, distribution and modification under the terms
26+
# of the MIT License (MIT) published as the License,
27+
# or (at your option) any later version of this license.
28+
# This program is distributed in the hope that it will be useful,
29+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
30+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
31+
# MIT License for more details.
32+
# You should have received a copy of the MIT License
33+
# along with this program. If not, please write to: jonathan@resnovas.com,
34+
# or see https://opensource.org/licenses/MIT
35+
# -----
36+
# DELETING THIS NOTICE AUTOMATICALLY VOIDS YOUR LICENSE
37+
###
38+
39+
# This workflow uses actions that are not certified by GitHub.
40+
# They are provided by a third-party and are governed by
41+
# separate terms of service, privacy policy, and support
42+
# documentation.
43+
#
44+
# Microsoft Security DevOps (MSDO) is a command line application which integrates static analysis tools into the development cycle.
45+
# MSDO installs, configures and runs the latest versions of static analysis tools
46+
# (including, but not limited to, SDL/security and compliance tools).
47+
#
48+
# The Microsoft Security DevOps action is currently in beta and runs on the windows-latest queue,
49+
# as well as Windows self hosted agents. ubuntu-latest support coming soon.
50+
#
51+
# For more information about the action , check out https://github.com/microsoft/security-devops-action
52+
#
53+
# Please note this workflow do not integrate your GitHub Org with Microsoft Defender For DevOps. You have to create an integration
54+
# and provide permission before this can report data back to azure.
55+
# Read the official documentation here : https://learn.microsoft.com/en-us/azure/defender-for-cloud/quickstart-onboard-github
56+
57+
name: Security - Microsoft Defender For Devops
58+
59+
on:
60+
merge_group:
61+
push:
62+
branches:
63+
- main
64+
- develop
65+
- release/*
66+
pull_request:
67+
branches:
68+
- main
69+
- develop
70+
- release/*
71+
schedule:
72+
- cron: '34 12 * * 0'
73+
74+
permissions:
75+
contents: read
76+
security-events: read
77+
78+
jobs:
79+
MSDO:
80+
# currently only windows latest is supported
81+
runs-on: windows-latest
82+
permissions:
83+
security-events: write
84+
85+
steps:
86+
- name: Harden Runner
87+
uses: step-security/harden-runner@eb238b55efaa70779f274895e782ed17c84f2895 # v2.6.1
88+
with:
89+
egress-policy: audit
90+
91+
# checks out the repository
92+
- uses: actions/checkout@v4
93+
94+
- uses: actions/setup-dotnet@3447fd6a9f9e57506b15f895c5b76d3b197dc7c2 # v3.2.0
95+
with:
96+
dotnet-version: |
97+
5.0.x
98+
6.0.x
99+
100+
- name: Run Microsoft Security DevOps
101+
uses: microsoft/security-devops-action@e94440350ed10e2806d47cd0d7504a2c51abdbe9 # v1.6.0
102+
id: msdo
103+
104+
- name: Upload results to Security tab
105+
uses: github/codeql-action/upload-sarif@1500a131381b66de0c52ac28abb13cd79f4b7ecc # v2.22.12
106+
with:
107+
sarif_file: ${{ steps.msdo.outputs.sarifFile }}

0 commit comments

Comments
 (0)