-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (56 loc) · 2.26 KB
/
Copy pathcodeql.yml
File metadata and controls
64 lines (56 loc) · 2.26 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# CodeQL: static analysis for the two languages this repo actually ships.
#
# The reason to have it is not the Scorecard point. The gateway parses untrusted input from a browser
# (a scope query, a merge patch) and hands back objects it has projected; the client merges a stream
# into a document a user is editing. That is where taint tracking earns its runtime.
name: codeql
on:
push:
branches: [main]
pull_request:
branches: [main]
schedule:
# The schedule matters: it re-runs the current queries against unchanged code, which is how a
# newly-published query finds an old bug that no push would have re-examined.
- cron: "40 4 * * 2"
permissions: read-all
jobs:
analyze:
name: analyze (${{ matrix.language }})
runs-on: ubuntu-latest
timeout-minutes: 20
permissions:
security-events: write # the whole point: write the findings to code scanning
packages: read
contents: read
strategy:
fail-fast: false
matrix:
include:
- language: go
build-mode: autobuild
- language: javascript-typescript
build-mode: none # interpreted; CodeQL reads the source directly
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
# go.work ties gateway/ and gateway/kube/ together and autobuild honours it, so both modules are
# analysed. kube being a separate module must not make it the one nobody scans.
- uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6.5.0
if: matrix.language == 'go'
with:
go-version-file: gateway/go.mod
cache: false
- name: initialize codeql
uses: github/codeql-action/init@99df26d4f13ea111d4ec1a7dddef6063f76b97e9 # v4.37.0
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
# security-extended, not the default suite: here a false positive costs a few minutes and a
# missed leak costs a Secret.
queries: security-extended
- name: analyze
uses: github/codeql-action/analyze@99df26d4f13ea111d4ec1a7dddef6063f76b97e9 # v4.37.0
with:
category: /language:${{ matrix.language }}