Skip to content

Commit 3a8de31

Browse files
authored
ci(build): enable CodeQL scanning (#9073)
[CodeQL](https://codeql.github.com/) is a code vulnerability scanner made available for free by GitHub for open source projects
1 parent 57aa5c4 commit 3a8de31

File tree

1 file changed

+53
-0
lines changed

1 file changed

+53
-0
lines changed

.github/workflows/codeql.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: "CodeQL"
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- release/**
8+
pull_request:
9+
branches:
10+
- main
11+
- release/**
12+
schedule:
13+
- cron: '0 0 * * *'
14+
15+
jobs:
16+
analyze:
17+
name: Analyze (${{ matrix.language }})
18+
runs-on: warp-ubuntu-latest-x64-16x
19+
timeout-minutes: 360
20+
permissions:
21+
security-events: write
22+
packages: read
23+
24+
strategy:
25+
fail-fast: false
26+
matrix:
27+
include:
28+
- language: go
29+
build-mode: autobuild
30+
31+
steps:
32+
- name: Checkout repository
33+
uses: actions/checkout@v4
34+
35+
- name: Initialize CodeQL
36+
uses: github/codeql-action/init@v3
37+
with:
38+
languages: ${{ matrix.language }}
39+
build-mode: ${{ matrix.build-mode }}
40+
41+
- if: matrix.build-mode == 'manual'
42+
run: |
43+
echo 'If you are using a "manual" build mode for one or more of the' \
44+
'languages you are analyzing, replace this with the commands to build' \
45+
'your code, for example:'
46+
echo ' make bootstrap'
47+
echo ' make release'
48+
exit 1
49+
50+
- name: Perform CodeQL Analysis
51+
uses: github/codeql-action/analyze@v3
52+
with:
53+
category: "/language:${{matrix.language}}"

0 commit comments

Comments
 (0)