Skip to content

Commit 28b2a08

Browse files
committed
build: Add CodeQL workflow
Signed-off-by: Paulo Gomes <[email protected]>
1 parent 44e1eb1 commit 28b2a08

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

.github/workflows/codeql.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: CodeQL
2+
3+
on:
4+
push:
5+
branches: [ "master", "main" ]
6+
pull_request:
7+
workflow_dispatch:
8+
schedule:
9+
- cron: '00 1 * * 1'
10+
11+
permissions: {}
12+
13+
jobs:
14+
analyze:
15+
name: Analyze
16+
runs-on: ubuntu-latest
17+
permissions:
18+
actions: read
19+
contents: read
20+
security-events: write
21+
22+
strategy:
23+
fail-fast: false
24+
matrix:
25+
language: [ 'go', 'actions' ]
26+
27+
steps:
28+
- name: Checkout code
29+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
30+
31+
# Initializes the CodeQL tools for scanning.
32+
- name: Initialize CodeQL
33+
uses: github/codeql-action/init@b56ba49b26e50535fa1e7f7db0f4f7b4bf65d80d # v3.28.10
34+
with:
35+
languages: ${{ matrix.language }}
36+
# 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
37+
# xref: https://codeql.github.com/codeql-query-help/go/
38+
queries: security-and-quality
39+
40+
- name: Manual Build
41+
run: go build ./...
42+
43+
- name: Perform CodeQL Analysis
44+
uses: github/codeql-action/analyze@b56ba49b26e50535fa1e7f7db0f4f7b4bf65d80d # v3.28.10
45+
with:
46+
category: "/language:${{matrix.language}}"

0 commit comments

Comments
 (0)