2022-02-18 03:40:40 +01:00
|
|
|
# Based on default config generated by GitHub, see also https://github.com/github/codeql-action
|
|
|
|
|
|
|
|
name: "CodeQL"
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2023-06-12 17:46:38 +02:00
|
|
|
branches: [ main ]
|
2022-02-18 03:40:40 +01:00
|
|
|
pull_request:
|
2023-06-12 17:46:38 +02:00
|
|
|
branches: [ main ]
|
2022-02-18 03:40:40 +01:00
|
|
|
schedule:
|
|
|
|
# Run every Monday at 16:10
|
|
|
|
- cron: '10 16 * * 1'
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
analyze:
|
|
|
|
name: Analyze
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
permissions:
|
|
|
|
security-events: write
|
|
|
|
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
language: [ 'java' ]
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
2024-01-29 18:00:13 +01:00
|
|
|
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
|
|
|
|
|
|
|
- name: Set up JDK 17
|
2024-03-01 16:30:52 +01:00
|
|
|
uses: actions/setup-java@9704b39bf258b59bc04b50fa2dd55e9ed76b47a8 # v4.1.0
|
2024-01-29 18:00:13 +01:00
|
|
|
with:
|
|
|
|
distribution: 'temurin'
|
|
|
|
java-version: '17'
|
|
|
|
cache: 'maven'
|
2022-02-18 03:40:40 +01:00
|
|
|
|
|
|
|
# Initializes the CodeQL tools for scanning
|
|
|
|
- name: Initialize CodeQL
|
2024-03-01 16:30:52 +01:00
|
|
|
uses: github/codeql-action/init@8a470fddafa5cbb6266ee11b37ef4d8aae19c571 # v3.24.6
|
2022-02-18 03:40:40 +01:00
|
|
|
with:
|
|
|
|
languages: ${{ matrix.language }}
|
|
|
|
# Run all security queries and maintainability and reliability queries
|
|
|
|
queries: +security-and-quality
|
|
|
|
|
|
|
|
# Only compile main sources, but ignore test sources because findings for them might not
|
|
|
|
# be that relevant (though GitHub security view also allows filtering by source type)
|
|
|
|
# Can replace this with github/codeql-action/autobuild action to run complete build
|
|
|
|
- name: Compile sources
|
|
|
|
run: |
|
2022-09-28 08:05:49 +02:00
|
|
|
mvn compile --batch-mode --no-transfer-progress
|
2022-02-18 03:40:40 +01:00
|
|
|
|
|
|
|
- name: Perform CodeQL Analysis
|
2024-03-01 16:30:52 +01:00
|
|
|
uses: github/codeql-action/analyze@8a470fddafa5cbb6266ee11b37ef4d8aae19c571 # v3.24.6
|