-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (60 loc) · 2.59 KB
/
Copy pathcodeql.yml
File metadata and controls
68 lines (60 loc) · 2.59 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
# Generic CodeQL code-scanning template (ADVANCED setup: workflow committed in-repo).
#
# This is a STARTING TEMPLATE (like ci-python.yml, unlike content-guards.yml):
# copy to .github/workflows/codeql.yml and EDIT THE LANGUAGE MATRIX per repo —
# it is not copied verbatim. Advanced setup (committed YAML) is deliberate over
# GitHub's dashboard-configured "default setup": the fleet rule is codify-in-repo,
# so the scan config stays visible, reviewable, SHA-pinned, and Dependabot-bumped.
#
# PUBLIC repos only — code scanning on private repos requires paid GitHub
# Advanced Security.
#
# Actions are SHA-pinned (a re-pointed tag can't change what runs); Dependabot
# keeps the pins fresh (grouped, monthly). Refresh the SHAs here when the live
# repos bump.
name: CodeQL
on:
push:
branches: [main]
pull_request:
branches: [main]
schedule:
- cron: '17 6 * * 1' # Mondays 06:17 UTC — fixed quiet hour, off the :00 rush
permissions:
contents: read
jobs:
analyze:
name: Analyze (${{ matrix.language }})
runs-on: ubuntu-latest
permissions:
contents: read # checkout
security-events: write # upload SARIF results to code scanning
# GitHub's starter also grants `packages: read` (private CodeQL packs) and
# `actions: read` (private repos only) — neither applies to this fleet.
strategy:
fail-fast: false
# PER-REPO LANGUAGE MATRIX — edit for each repo; do not copy verbatim.
# Supported identifiers (docs: "Customizing your advanced setup for code
# scanning"): actions, c-cpp, csharp, go, java-kotlin,
# javascript-typescript, python, ruby, rust, swift.
# build-mode is `none` for interpreted languages (python,
# javascript-typescript, ruby, actions); compiled languages need
# none/autobuild/manual — `manual` also needs a build step before the
# analyze step (see GitHub's starter workflow).
matrix:
include:
- language: actions # scans .github/workflows/ itself — keep everywhere
build-mode: none
- language: python
build-mode: none
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Initialize CodeQL
uses: github/codeql-action/init@e4fba868fa4b1b91e1fdab776edc8cfbe6e9fb81 # v4.37.3
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
- name: Perform CodeQL analysis
uses: github/codeql-action/analyze@e4fba868fa4b1b91e1fdab776edc8cfbe6e9fb81 # v4.37.3
with:
category: "/language:${{ matrix.language }}"