forked from ChelseaKR/fare-policy-assistant
-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (46 loc) · 1.69 KB
/
Copy pathcodeql.yml
File metadata and controls
50 lines (46 loc) · 1.69 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
47
48
49
50
name: CodeQL
# SAST over two languages: python (the assistant, evals, and tools) and actions
# (the workflows, for the template-injection and permission classes CodeQL's
# actions pack understands). Closes the "no CodeQL" half of the
# Security & Supply-Chain row in the README's standards table.
#
# Semgrep already runs in security.yml. This is not redundant: Semgrep matches
# patterns, CodeQL does dataflow, and they miss different things. Both are cheap
# enough to keep.
#
# Trigger shape: PRs into main plus a weekly schedule. No push trigger, because
# the pull_request run already analyzed the same changes before merge.
on:
pull_request:
schedule:
- cron: "41 6 * * 1" # weekly, Monday 06:41 UTC, off the hour and off
# corpus-freshness (09:xx) and the other weekly crons
workflow_dispatch:
# Cancel superseded runs of the same ref.
concurrency:
group: codeql-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
analyze:
name: analyze (${{ matrix.language }})
runs-on: ubuntu-latest
timeout-minutes: 20
permissions:
contents: read
security-events: write # required to upload SARIF to code scanning
strategy:
fail-fast: false
matrix:
language: ["python", "actions"]
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: github/codeql-action/init@f205ea1c3313d32999d8d6a48b4f6530d4437b38 # v4.37.4
with:
languages: ${{ matrix.language }}
- uses: github/codeql-action/analyze@f205ea1c3313d32999d8d6a48b4f6530d4437b38 # v4.37.4
with:
category: "/language:${{ matrix.language }}"