Skip to content

CodeQL

CodeQL #1435

# 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.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"
on:
push:
branches: [ main, delta-oauth2.0 ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "main" ]
schedule:
- cron: '26 20 * * 4'
workflow_dispatch:
jobs:
analyze:
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: [ 'java' ]
distribution: [ 'temurin', 'oracle' ]
java: [ '21', '22' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby', 'swift' ]
# Use only 'java' to analyze code written in Java, Kotlin or both
# Use only 'javascript' to analyze code written in JavaScript, TypeScript or both
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
name: Analyze Java ${{ matrix.Java }} (${{ matrix.distribution }}) Build
steps:
- name: Checkout repository
uses: actions/checkout@v4
# see: https://github.com/marketplace/actions/setup-java-jdk
- name: Setup Java JDK
uses: actions/setup-java@v4
with:
# The Java version to set up. Takes a whole or semver Java version. See examples of supported syntax in README file
java-version: ${{ matrix.java }}
# Java distribution. See the list of supported distributions in README file
distribution: ${{ matrix.distribution }}
# The package type (jdk, jre, jdk+fx, jre+fx)
#java-package: # optional, default is jdk
# The architecture of the package
#architecture: # optional, default is x64
# Path to where the compressed JDK is located
#jdkFile: # optional
# Set this option if you want the action to check for the latest available version that satisfies the version spec
check-latest: true # optional
# ID of the distributionManagement repository in the pom.xml file. Default is `github`
#server-id: # optional, default is github
# Environment variable name for the username for authentication to the Apache Maven repository. Default is $GITHUB_ACTOR
#server-username: # optional, default is GITHUB_ACTOR
# Environment variable name for password or token for authentication to the Apache Maven repository. Default is $GITHUB_TOKEN
#server-password: # optional, default is GITHUB_TOKEN
# Path to where the settings.xml file will be written. Default is ~/.m2.
#settings-path: # optional
# Overwrite the settings.xml file if it exists. Default is "true".
#overwrite-settings: # optional, default is true
# GPG private key to import. Default is empty string.
#gpg-private-key: # optional
# Environment variable name for the GPG private key passphrase. Default is $GPG_PASSPHRASE.
#gpg-passphrase: # optional
# Name of the build platform to cache dependencies. It can be "maven" or "gradle".
#cache: 'maven' # optional
# Workaround to pass job status to post job step. This variable is not intended for manual setting
#job-status: # optional, default is ${{ job.status }}
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
# This means your workflow will download the latest stable CodeQL version instead of using the cache.
# tools: latest
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.
# 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
# queries: security-extended,security-and-quality
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v3
# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
# - run: |
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"