Skip to content

Commit 14d73d6

Browse files
committed
chore(gh): update codeql workflow
Updates to Codeql workflow: - Limits workflow permissions. - Simplifies single branch reference. - Adds workflow dispatch option. - Pins actions to release commit hash. - Removes superfluous quotes. Signed-off-by: Ryan Johnson <ryan.johnson@broadcom.com>
1 parent 060d9d0 commit 14d73d6

1 file changed

Lines changed: 13 additions & 15 deletions

File tree

.github/workflows/codeql-analysis.yml

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,33 @@
1-
name: CodeQL
2-
"on":
1+
name: CodeQL Analysis
2+
3+
permissions:
4+
contents: read
5+
6+
on:
37
push:
4-
branches:
5-
- main
8+
branches: main
69
pull_request:
7-
branches:
8-
- main
10+
branches: main
911
schedule:
1012
- cron: 30 23 * * 06
13+
workflow_dispatch:
14+
1115
jobs:
1216
analyze:
1317
name: Analyze
1418
runs-on: ubuntu-latest
15-
permissions:
16-
actions: read
17-
contents: read
18-
security-events: write
1919
strategy:
2020
fail-fast: false
2121
matrix:
2222
language:
23-
- go
23+
- go
2424
steps:
25-
- name: Checkout repository
25+
- name: Checkout Repository
2626
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
27-
# Workaround for Go 1.21 compatibility.
28-
# TODO: Remove when GitHub Action runners Support Go 1.21+.
2927
- name: Setup Go
3028
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
3129
with:
32-
go-version-file: "go.mod"
30+
go-version-file: go.mod
3331
cache: false
3432
- name: Initialize CodeQL
3533
uses: github/codeql-action/init@c4fb451437765abf5018c6fbf22cce1a7da1e5cc # codeql-bundle-v2.17.1

0 commit comments

Comments
 (0)