Skip to content

Commit 8eddc26

Browse files
committed
Customize the CodeQL workflow
- Give the workflow a shorter name - Also trigger on "run-ci" branches (in addition to main) - Also allow to be triggered from Actions tab - Comment out currently unneeded permissions - Use v5 of actions/checkout (rather than v4) - Don't persist auth token after checkout (see #2187)
1 parent 25354bd commit 8eddc26

File tree

1 file changed

+14
-7
lines changed

1 file changed

+14
-7
lines changed

.github/workflows/codeql.yml

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,20 @@
99
# the `language` matrix defined below to confirm you have the correct set of
1010
# supported CodeQL languages.
1111
#
12-
name: "CodeQL Advanced"
12+
name: CodeQL
1313

1414
on:
1515
push:
16-
branches: [ "main" ]
16+
branches:
17+
- main
18+
- 'run-ci/**'
19+
- '**/run-ci/**'
1720
pull_request:
18-
branches: [ "main" ]
21+
branches:
22+
- main
1923
schedule:
2024
- cron: '32 3 * * 6'
25+
workflow_dispatch:
2126

2227
jobs:
2328
analyze:
@@ -33,11 +38,11 @@ jobs:
3338
security-events: write
3439

3540
# required to fetch internal or private CodeQL packs
36-
packages: read
41+
# packages: read
3742

3843
# only required for workflows in private repositories
39-
actions: read
40-
contents: read
44+
# actions: read
45+
# contents: read
4146

4247
strategy:
4348
fail-fast: false
@@ -57,7 +62,9 @@ jobs:
5762
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
5863
steps:
5964
- name: Checkout repository
60-
uses: actions/checkout@v4
65+
uses: actions/checkout@v5
66+
with:
67+
persist-credentials: false
6168

6269
# Add any setup steps before running the `github/codeql-action/init` action.
6370
# This includes steps like installing compilers or runtimes (`actions/setup-node`

0 commit comments

Comments
 (0)