Skip to content

Commit 0048a18

Browse files
chore: Configure advanced CodeQL setup (#819)
The basic setup doesn't allow scanning on PRs coming from external forks: github/codeql#19698 (comment).
1 parent 1942036 commit 0048a18

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

.github/workflows/codeql.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: "CodeQL Advanced"
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
schedule:
9+
- cron: '31 9 * * 4'
10+
11+
jobs:
12+
analyze:
13+
name: Analyze (${{ matrix.language }})
14+
runs-on: ubuntu-latest
15+
permissions:
16+
# required for all workflows
17+
security-events: write
18+
19+
# required to fetch internal or private CodeQL packs
20+
packages: read
21+
22+
# only required for workflows in private repositories
23+
actions: read
24+
contents: read
25+
26+
strategy:
27+
fail-fast: false
28+
matrix:
29+
include:
30+
- language: actions
31+
build-mode: none
32+
- language: go
33+
build-mode: autobuild
34+
steps:
35+
- name: Checkout repository
36+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
37+
- name: Initialize CodeQL
38+
uses: github/codeql-action/init@89a39a4e59826350b863aa6b6252a07ad50cf83e # v4.32.4
39+
with:
40+
languages: ${{ matrix.language }}
41+
build-mode: ${{ matrix.build-mode }}
42+
- name: Perform CodeQL Analysis
43+
uses: github/codeql-action/analyze@89a39a4e59826350b863aa6b6252a07ad50cf83e # v4.32.4
44+
with:
45+
category: "/language:${{matrix.language}}"

0 commit comments

Comments
 (0)