Skip to content

Commit 7a6ea6d

Browse files
committed
build: Add CodeQL workflow
Signed-off-by: Paulo Gomes <[email protected]>
1 parent e09a3c8 commit 7a6ea6d

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed

.github/workflows/codeql.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: CodeQL
2+
on:
3+
workflow_call:
4+
pull_request:
5+
6+
push:
7+
branches:
8+
- main
9+
10+
schedule:
11+
- cron: '00 9 * * 2'
12+
13+
permissions: {}
14+
15+
jobs:
16+
analyze:
17+
name: Analyze
18+
runs-on: ubuntu-latest
19+
20+
permissions:
21+
actions: read
22+
contents: read
23+
security-events: write
24+
25+
strategy:
26+
fail-fast: false
27+
matrix:
28+
language: [ 'go', 'actions' ]
29+
30+
steps:
31+
- name: Checkout code
32+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
33+
34+
- name: Initialize CodeQL
35+
uses: github/codeql-action/init@ff79de67cc25c7617163ae1e4b8aa23b902fdf15 # v2.22.11
36+
with:
37+
languages: ${{ matrix.language }}
38+
# xref: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
39+
# xref: https://codeql.github.com/codeql-query-help/go/
40+
queries: security-and-quality
41+
42+
- name: Manual Build
43+
run: go build ./...
44+
45+
- name: Perform CodeQL Analysis
46+
uses: github/codeql-action/analyze@ff79de67cc25c7617163ae1e4b8aa23b902fdf15 # v2.22.11
47+
with:
48+
category: "/language:${{matrix.language}}"

0 commit comments

Comments
 (0)