forked from terrablue/devdb
-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (40 loc) · 1.25 KB
/
Copy pathsecurity.yml
File metadata and controls
46 lines (40 loc) · 1.25 KB
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
name: Security
on:
push:
branches: [master]
pull_request:
schedule:
# Rules change more often than this repository does, so a weekly run
# catches a new rule against unchanged code.
- cron: '0 6 * * 1'
permissions:
contents: read
jobs:
scan:
name: ThreatCrush
runs-on: ubuntu-latest
permissions:
contents: read
security-events: write
steps:
- uses: actions/checkout@v5
- uses: actions/setup-node@v6
with:
node-version: '22'
# Pinned rather than floating: a scanner that updates itself in CI is a
# third party with write access to the build.
- name: Scan
run: >
npx --yes @profullstack/threatcrush@0.11.9 scan .
--format sarif
--output threatcrush.sarif
--fail-on critical,high
# Only on push and schedule. A pull request from a fork gets a read-only
# token, so uploading there would fail for reasons unrelated to the code;
# the --fail-on gate above is what reports on a pull request.
- name: Upload SARIF
if: always() && github.event_name != 'pull_request'
uses: github/codeql-action/upload-sarif@v4
with:
sarif_file: threatcrush.sarif
category: threatcrush