-
Notifications
You must be signed in to change notification settings - Fork 104
38 lines (31 loc) · 926 Bytes
/
scan.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
---
name: Code Scanning
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
scan:
name: scan
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install dependencies
run: |
sudo apt-get install -qq shellcheck
sudo curl -sSL -o /usr/local/bin/shellcheck-sarif \
https://github.com/psastras/sarif-rs/releases/download/shellcheck-sarif-latest/shellcheck-sarif-x86_64-unknown-linux-gnu
sudo chmod +x /usr/local/bin/shellcheck-sarif
- name: Run Shellcheck
run: |
shellcheck -f json gh-repo-stats | shellcheck-sarif > results.sarif
- name: Upload SARIF file
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: results.sarif