forked from microsoft/security-devops-action
-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (33 loc) · 1.01 KB
/
on-push-verification.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
# pull request action verification
name: MSDO On Push Verification
on:
push:
branches:
- '**'
permissions:
id-token: write # This is required for federation to Defender for DevOps
security-events: write # This is required to upload SARIF files
jobs:
sample:
name: MSDO on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, ubuntu-latest]
steps:
# Checkout your code repository to scan
- uses: actions/checkout@v3
# Run analyzers
- uses: ./
id: msdo
# Upload alerts to the Security tab
- name: Upload alerts to Security tab
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: ${{ steps.msdo.outputs.sarifFile }}
# Upload alerts file as a workflow artifact
- name: Upload alerts file as a workflow artifact
uses: actions/upload-artifact@v3
with:
name: alerts
path: ${{ steps.msdo.outputs.sarifFile }}