-
Notifications
You must be signed in to change notification settings - Fork 7
67 lines (58 loc) · 1.99 KB
/
Copy pathcodeql.yml
File metadata and controls
67 lines (58 loc) · 1.99 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
# CodeQL static analysis for PARTHA.
#
# Part of the dependency, secret, and code scanning baseline. Intended to become
# a required status check on `dev` and `main` once branch protection is enabled.
name: CodeQL
on:
pull_request:
branches:
- dev
- main
schedule:
# Weekly, Monday 03:17 UTC. Off-the-hour on purpose: GitHub drops scheduled
# runs when too many land on the same minute.
#
# Note: scheduled workflows only ever run on the DEFAULT branch. Until `dev`
# becomes the default (§2.2 / E3.1), this weekly scan analyses stale `main`.
# The pull_request trigger above is what actually guards day-to-day work.
- cron: '17 3 * * 1'
# Least privilege by default; the analyze job widens only what it needs.
permissions:
contents: read
# A newer push to the same PR makes an in-flight scan irrelevant.
concurrency:
group: codeql-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
analyze:
name: Analyze (${{ matrix.language }})
runs-on: ubuntu-latest
timeout-minutes: 30
permissions:
# Required to upload results to the Security tab.
security-events: write
# Required by the CodeQL action to look up workflow run status.
actions: read
contents: read
strategy:
fail-fast: false
matrix:
include:
# `build-mode: none` is correct for interpreted languages — CodeQL
# analyses the source directly and no compilation step is needed.
- language: javascript-typescript
build-mode: none
- language: python
build-mode: none
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{ matrix.language }}"