Skip to content

CodeQL - Java

CodeQL - Java #3

Workflow file for this run

# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
name: "CodeQL - Java"
env:
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
PROFILES: frankframework,ci
USE_PROPRIETARY: ${{ (github.event_name != 'pull_request' || github.event.pull_request.head.repo.owner.login == 'frankframework') && github.actor != 'dependabot[bot]' }}
MAVEN_GOALS: package
on:
push:
branches: [master]
paths-ignore:
- "**.md"
- "**.yml"
- "**.txt"
- "**.png"
- ".github/**"
- "docker/**"
pull_request:
# The branches below must be a subset of the branches above
branches: [master]
paths-ignore:
- "**.md"
- "**.yml"
- "**.txt"
- "**.png"
- ".github/**"
- "docker/**"
schedule:
- cron: '0 23 * * 1'
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
java: [ '17' ]
# Override automatic language detection by changing the below list
# Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python']
language: ['java']
# Learn more...
# https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Create cached directories
run: |
mkdir -p ~/.m2/repository
mkdir -p ~/.sonar/cache
mkdir -p console/frontend/src/main/frontend/node_modules
- name: Restore cached directories
uses: actions/cache/restore@v4
with:
path: |
~/.m2/repository
~/.sonar/cache
console/frontend/src/main/frontend/node_modules
key: project-cache-
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
- name: Set up Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: 20.x
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main
# Use Maven Wrapper, so we can build with an older version of Maven, see PR #4579.
- name: Build with Maven
env:
CI_SERVICE: GITHUB
TZ: Europe/Amsterdam
JAVA_OPTS: "-Xms1G -XX:+UseParallelGC"
run: ./mvnw -B -V -T1 ${{env.MAVEN_GOALS}} -P${{env.PROFILES}}
# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language
#- run: |
# make bootstrap
# make release
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3