Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .github/codeql/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Security analysis

The CodeQL workflow runs the `security-extended` query suite for the SDK language and GitHub Actions on pull requests, pushes, merge queues and a weekly schedule. It can also be started manually.

The SDK scan traces a clean Maven reactor build with the `with-auth-api` profile, which includes the authentication API, and test compilation disabled.

Results are published to **Security and quality → Code scanning**, with a separate category for each language. Review initial findings and record a reason for every dismissed alert.

After merging, require both **CodeQL (java-kotlin)** and **CodeQL (actions)** job checks for supported branches. Also enable **Require code scanning results → CodeQL → Security alerts: High or higher** in the branch ruleset. Successful workflow execution alone does not enforce this threshold. Track the latest analysis commit/date, extraction errors and open findings by security severity.
4 changes: 4 additions & 0 deletions .github/codeql/actions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
name: GitHub Actions security baseline

queries:
- uses: security-extended
4 changes: 4 additions & 0 deletions .github/codeql/sdk.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
name: SDK security baseline

queries:
- uses: security-extended
65 changes: 65 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: CodeQL

on:
push:
branches: ["master", "develop", "release*"]
pull_request:
branches: ["master", "develop", "release*"]
merge_group:
schedule:
- cron: '23 3 * * 1'
workflow_dispatch:

permissions:
contents: read

concurrency:
group: codeql-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
analyze:
name: CodeQL (${{ matrix.language }})
runs-on: ubuntu-24.04
timeout-minutes: 45
permissions:
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
include:
- language: java-kotlin
build-mode: manual
config: .github/codeql/sdk.yml
- language: actions
build-mode: none
config: .github/codeql/actions.yml
steps:
- name: Checkout
uses: actions/checkout@v6

- name: Set up Java
if: matrix.language == 'java-kotlin'
uses: actions/setup-java@v5
with:
distribution: temurin
java-version: '17'
cache: maven

- name: Initialize CodeQL
uses: github/codeql-action/init@v4
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
config-file: ${{ matrix.config }}

- name: Build Java SDK and authentication API
if: matrix.language == 'java-kotlin'
run: |
mvn --batch-mode --no-transfer-progress -Pwith-auth-api -Dmaven.test.skip=true clean package

- name: Analyze and upload results
uses: github/codeql-action/analyze@v4
with:
category: /language:${{ matrix.language }}
Loading