Skip to content

Commit 15bcbb7

Browse files
authored
Merge pull request #2740 from jandubois/codeql
Configure code scanning with GitHub CodeQL
2 parents ff89881 + 8292d6d commit 15bcbb7

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed

.github/workflows/codeql.yaml

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

0 commit comments

Comments
 (0)