Skip to content

Internal - Add CodeQL scanning for GitHub Actions workflows#492

Merged
cleverchuk merged 1 commit into
mainfrom
cc/NH-138409
May 20, 2026
Merged

Internal - Add CodeQL scanning for GitHub Actions workflows#492
cleverchuk merged 1 commit into
mainfrom
cc/NH-138409

Conversation

@cleverchuk
Copy link
Copy Markdown
Contributor

TLDR

Extends the existing CodeQL security scanning to also analyze GitHub Actions workflow files for vulnerabilities such as script injection and unsafe use of untrusted input.

Details

CodeQL supports an actions language target that statically analyzes workflow YAML files for security anti-patterns — most notably ${{ }} expression injection in run: blocks, use of mutable tags, and overly broad permissions.

The actions language does not require a build step, so the existing Java build steps (JDK setup, Gradle setup, Gradle build) are now conditional on matrix.language == 'java' to avoid unnecessary work in the actions analysis job.

The language matrix now produces two parallel jobs:

  • java — compiles the project and runs CodeQL semantic analysis on Java source
  • actions — runs CodeQL static analysis on workflow definitions without a build

Test services data

  1. e-1712644058766987264
  2. e-1712643928659124224
  3. e-1742334541200846848
  4. e-1777406072376840192

Copilot AI review requested due to automatic review settings May 20, 2026 15:12
@cleverchuk cleverchuk requested review from a team as code owners May 20, 2026 15:12
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Extends the existing CodeQL code-scanning workflow to also analyze GitHub Actions workflow YAML files (the actions CodeQL language), while avoiding unnecessary Java build steps for the actions scan.

Changes:

  • Expand the CodeQL language matrix from java to java + actions.
  • Make JDK/Gradle setup and the Gradle build conditional so they only run for the java matrix entry.

Copy link
Copy Markdown

@jerrytfleung jerrytfleung left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@cleverchuk cleverchuk merged commit b024f5e into main May 20, 2026
21 checks passed
@cleverchuk cleverchuk deleted the cc/NH-138409 branch May 20, 2026 18:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants