Repository navigation
75 lines (71 loc) · 3.12 KB
/
Copy pathcodeql.yml
File metadata and controls
75 lines (71 loc) · 3.12 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
65
66
67
68
69
70
71
72
73
74
75
name: CodeQL
on:
# Not on PRs or pushes: CodeQL does not gate merges, and a full scan costs ~30
# runner-minutes, most of it JS/TS. Scanning every push ran ~21 times a day
# (~790 runner-minutes) and held runner slots merges were queueing for; a
# finding surfaces after the next daily scan instead.
schedule:
# Daily, all six languages.
- cron: '23 3 * * *'
workflow_dispatch:
# Scheduled and manual scans use separate groups, and neither cancels a running scan.
concurrency:
group: codeql-${{ github.event_name }}-${{ github.ref }}
cancel-in-progress: false
permissions:
contents: read
jobs:
analyze:
name: Analyze (${{ matrix.language }})
if: (github.event_name != 'schedule' || github.repository == 'koala73/worldmonitor')
runs-on: ubuntu-latest
timeout-minutes: 45
# On the default branch codeql-action otherwise builds an overlay-base
# database (~2 GB a day, JS ~1.97 GB) and saves it to the Actions cache.
# Only overlay scans of pull requests restore it, and this workflow has not
# run on pull requests since #9669, so every base was dead weight that
# pushed the shared cache past its 10 GB limit and evicted the caches PRs do
# read. "none" skips both the build and the save.
env:
CODEQL_OVERLAY_DATABASE_MODE: none
permissions:
contents: read
security-events: write
packages: read
strategy:
fail-fast: false
matrix:
language: [actions, go, javascript-typescript, python, ruby, rust]
steps:
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0
with:
persist-credentials: false
- uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6.5.0
if: matrix.language == 'go'
with:
go-version-file: sdk/go/go.mod
cache: false
- uses: github/codeql-action/init@33d7b85da1a04171e211befe2c739303b9a4c066 # v4
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.language == 'go' && 'autobuild' || 'none' }}
# With overlay off, the action turns TRAP caching on by default; default-branch
# runs only upload TRAP caches (they never restore them), so they too would sit
# unread in the shared cache.
trap-caching: false
# Generated upstream @vercel/og + satori bundle (scripts/vendor-vercel-og.mjs).
# Its library internals re-raise ~22 alerts on every re-vendor; the generator
# script and our patched vendor copies (braces, stream-json) stay scanned.
# Test code never ships: fetch stubs and assertion regexes raised about half of
# all dismissed alerts, every one a false positive. Fixtures read by scripts are
# data, not code, so skipping tests/ hides no shipped path.
config: |
paths-ignore:
- vendor/vercel-og/dist
- tests
- e2e
- '**/__tests__'
- '**/*.test.*'
- uses: github/codeql-action/analyze@33d7b85da1a04171e211befe2c739303b9a4c066 # v4
with:
category: /language:${{ matrix.language }}