-
Notifications
You must be signed in to change notification settings - Fork 66
55 lines (51 loc) · 1.34 KB
/
security_checks.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: "[auto] Security Checks"
on:
schedule:
- cron: '0 6 * * *'
push:
branches:
- dev
- feature/*
workflow_call:
inputs:
continue-on-error:
type: boolean
required: false
default: false
permissions: {}
jobs:
sdl:
continue-on-error: ${{ inputs.continue-on-error || false }}
name: SDL Compliance Checks
runs-on: windows-latest
permissions:
# needed to write security info to repository
security-events: write
contents: read
steps:
- uses: actions/checkout@v4
# Install dotnet, used by MSDO
- uses: actions/setup-dotnet@v4
with:
dotnet-version: |
5.0.x
6.0.x
# Run analyzers
- name: Run Microsoft Security DevOps Analysis
uses: microsoft/security-devops-action@v1
id: msdo
env:
# file path to analyze
GDN_BANDIT_TARGET: 'azext_iot'
GDN_BANDIT_RECURSIVE: true
# Upload alerts to the Security tab
- name: Upload alerts to Security tab
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: ${{ steps.msdo.outputs.sarifFile }}
# Upload alerts file as a workflow artifact
- name: Upload alerts artifact
uses: actions/upload-artifact@v4
with:
name: alerts
path: ${{ steps.msdo.outputs.sarifFile }}