Skip to content

Commit d13527c

Browse files
authored
1 parent cae6a37 commit d13527c

File tree

1 file changed

+105
-0
lines changed

1 file changed

+105
-0
lines changed

.github/workflows/codeql.yml

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
# https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax
2+
name: CodeQL
3+
4+
on: # https://docs.github.com/en/actions/reference/workflows-and-actions/events-that-trigger-workflows
5+
schedule:
6+
# https://docs.github.com/en/actions/reference/workflows-and-actions/events-that-trigger-workflows#schedule
7+
- cron: "30 18 * * 1" # Mondays 18:30 UTC
8+
push:
9+
branches: [ "master" ]
10+
paths-ignore:
11+
- '**/*.md'
12+
- '.github/*.yml'
13+
- '**/.project'
14+
- '**/.settings/*.prefs'
15+
- '.gitignore'
16+
- '.actrc'
17+
- 'Jenkinsfile'
18+
pull_request:
19+
branches: [ "master" ]
20+
paths-ignore:
21+
- '**/*.md'
22+
- '.github/*.yml'
23+
- '**/.project'
24+
- '**/.settings/*.prefs'
25+
- '.gitignore'
26+
- '.actrc'
27+
- 'Jenkinsfile'
28+
workflow_dispatch:
29+
# https://docs.github.com/en/actions/reference/workflows-and-actions/events-that-trigger-workflows#workflow_dispatch
30+
31+
32+
jobs:
33+
34+
###########################################################
35+
analyze:
36+
###########################################################
37+
38+
strategy:
39+
fail-fast: false
40+
matrix:
41+
include:
42+
# build-mode: https://github.com/github/codeql-action#build-modes
43+
- language: actions
44+
build-mode: none
45+
- language: java-kotlin
46+
build-mode: none
47+
- language: javascript-typescript
48+
build-mode: none
49+
#- language: python
50+
# build-mode: none
51+
52+
name: Analyze (${{ matrix.language }})
53+
runs-on: ubuntu-latest
54+
permissions:
55+
# required for all workflows
56+
security-events: write
57+
58+
# required to fetch internal or private CodeQL packs
59+
packages: read
60+
61+
# only required for workflows in private repositories
62+
actions: read
63+
contents: read
64+
65+
timeout-minutes: 15
66+
67+
steps:
68+
- name: "Show: GitHub context"
69+
env:
70+
GITHUB_CONTEXT: ${{ toJSON(github) }}
71+
run: echo $GITHUB_CONTEXT
72+
73+
74+
- name: "Show: environment variables"
75+
run: env | sort
76+
77+
78+
- name: Git Checkout
79+
uses: actions/checkout@v5 # https://github.com/actions/checkout
80+
81+
82+
# CodeQL executes https://github.com/ferstl/depgraph-maven-plugin
83+
- name: "Install: JDK 25 for Maven/Tycho ☕"
84+
uses: actions/setup-java@v5 # https://github.com/actions/setup-java
85+
if: matrix.language == 'java'
86+
with:
87+
distribution: temurin
88+
java-version: 25
89+
90+
91+
# https://docs.github.com/en/code-security/code-scanning
92+
- name: Initialize CodeQL
93+
uses: github/codeql-action/init@v4 # https://github.com/github/codeql-action
94+
with:
95+
languages: ${{ matrix.language }}
96+
# https://github.com/github/codeql-action#build-modes
97+
build-mode: ${{ matrix.build-mode }}
98+
# https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning#using-queries-in-ql-packs
99+
queries: +security-and-quality
100+
101+
102+
- name: Perform CodeQL Analysis
103+
uses: github/codeql-action/analyze@v4 # https://github.com/github/codeql-action
104+
with:
105+
category: "/language:${{matrix.language}}"

0 commit comments

Comments
 (0)