Repository navigation
53 lines (53 loc) · 1.88 KB
/
Copy pathcodeql.yaml
File metadata and controls
53 lines (53 loc) · 1.88 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
name: CodeQL
on:
workflow_call:
inputs:
languages:
description: JSON array of CodeQL languages; each language gets its own analysis job
type: string
default: '["actions","python"]'
paths-ignore:
description: JSON array of path patterns CodeQL skips, written to its configuration
type: string
default: "[]"
queries:
description: Query suite or comma-separated query list for CodeQL init
type: string
default: security-extended
config-file:
description: Repository path to a CodeQL configuration file; when set, paths-ignore has no effect
type: string
default: ""
build-mode:
description: CodeQL build mode for each language, such as none or autobuild
type: string
default: none
permissions: {}
jobs:
analyze:
name: 🛡️ Analyze ${{ matrix.language }}
runs-on: ubuntu-26.04
permissions:
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: ${{ fromJSON(inputs.languages) }}
steps:
- name: 📥 Check out repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: 🛡️ Initialize CodeQL
uses: github/codeql-action/init@9b3254085494b55a0f7c4c2b3d2d52cc712ce370 # v4.39.1
with:
languages: ${{ matrix.language }}
build-mode: ${{ inputs.build-mode }}
queries: ${{ inputs.queries }}
config-file: ${{ inputs.config-file }}
config: "${{ inputs.config-file == '' && format('paths-ignore: {0}', inputs.paths-ignore) || '' }}"
- name: 🛡️ Analyze
uses: github/codeql-action/analyze@9b3254085494b55a0f7c4c2b3d2d52cc712ce370 # v4.39.1
with:
category: "/language:${{ matrix.language }}"