Skip to content

Commit 3230931

Browse files
authored
ci: Create codeql.yml
1 parent 605d995 commit 3230931

File tree

1 file changed

+72
-0
lines changed

1 file changed

+72
-0
lines changed

.github/workflows/codeql.yml

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
name: "CodeQL Advanced"
2+
on:
3+
push:
4+
branches: [ "main" ]
5+
pull_request:
6+
branches: [ "main" ]
7+
schedule:
8+
- cron: '35 2 * * 2'
9+
10+
jobs:
11+
analyze:
12+
name: Analyze (${{ matrix.language }})
13+
# Runner size impacts CodeQL analysis time. To learn more, please see:
14+
# - https://gh.io/recommended-hardware-resources-for-running-codeql
15+
# - https://gh.io/supported-runners-and-hardware-resources
16+
# - https://gh.io/using-larger-runners (GitHub.com only)
17+
# Consider using larger runners or machines with greater resources for possible analysis time improvements.
18+
runs-on: 'ubuntu-latest'
19+
permissions:
20+
# required for all workflows
21+
security-events: write
22+
23+
# required to fetch internal or private CodeQL packs
24+
packages: read
25+
26+
# only required for workflows in private repositories
27+
actions: read
28+
contents: read
29+
30+
strategy:
31+
fail-fast: false
32+
matrix:
33+
include:
34+
- language: java-kotlin
35+
build-mode: autobuild
36+
steps:
37+
- name: Checkout repository
38+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
39+
40+
# Initializes the CodeQL tools for scanning.
41+
- name: Initialize CodeQL
42+
uses: github/codeql-action/init@cbe18979603527f12c7871a6eb04833ecf1548c7
43+
with:
44+
languages: ${{ matrix.language }}
45+
build-mode: ${{ matrix.build-mode }}
46+
# If you wish to specify custom queries, you can do so here or in a config file.
47+
# By default, queries listed here will override any specified in a config file.
48+
# Prefix the list here with "+" to use these queries and those in the config file.
49+
50+
# For more details on CodeQL's query packs, refer to: 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
51+
# queries: security-extended,security-and-quality
52+
53+
# If the analyze step fails for one of the languages you are analyzing with
54+
# "We were unable to automatically build your code", modify the matrix above
55+
# to set the build mode to "manual" for that language. Then modify this step
56+
# to build your code.
57+
# ℹ️ Command-line programs to run using the OS shell.
58+
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
59+
- if: matrix.build-mode == 'manual'
60+
shell: bash
61+
run: |
62+
echo 'If you are using a "manual" build mode for one or more of the' \
63+
'languages you are analyzing, replace this with the commands to build' \
64+
'your code, for example:'
65+
echo ' make bootstrap'
66+
echo ' make release'
67+
exit 1
68+
69+
- name: Perform CodeQL Analysis
70+
uses: github/codeql-action/analyze@cbe18979603527f12c7871a6eb04833ecf1548c7
71+
with:
72+
category: "/language:${{matrix.language}}"

0 commit comments

Comments
 (0)