Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions .github/workflows/security.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,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