Skip to content

Commit dc55b30

Browse files
authored
Create codeql.yml (#36)
* Create codeql.yml * Update codeql.yml
1 parent e58b90e commit dc55b30

File tree

1 file changed

+55
-0
lines changed

1 file changed

+55
-0
lines changed

.github/workflows/codeql.yml

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

0 commit comments

Comments
 (0)