Skip to content

ci(codeql): enable Java (java-kotlin) analysis#274

Closed
balajinvda wants to merge 1 commit into
mainfrom
codeql/enable-java
Closed

ci(codeql): enable Java (java-kotlin) analysis#274
balajinvda wants to merge 1 commit into
mainfrom
codeql/enable-java

Conversation

@balajinvda

@balajinvda balajinvda commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Why

The monorepo already contains Java source (examples/java-spring-boot-service) and gains more with the incoming nv-boot-parent import, but CodeQL only scanned Go and Rust. Java should get the same security coverage.

What changed

  • Add java-kotlin to the CodeQL matrix with build-mode: none. Java supports buildless (source-only) extraction, so it scans on PRs like Rust, with no Bazel/Maven build required.
  • Trigger the workflow on **/*.java changes in addition to Go/Rust paths.

Customer Release Notes

Not customer visible. CI security scanning.

Plan Summary

Not applicable.

Usage

Not applicable. Runs automatically on push/PR touching Java (and the weekly full scan).

Testing

.github/workflows/codeql.yml parses as valid YAML. CodeQL java-kotlin + build-mode: none is the standard buildless Java configuration; findings surface in the Security tab and as PR comments, non-blocking during rollout (fail-on-findings: false), same as Go/Rust.

Notes

Buildless keeps Java analysis cheap and avoids the autobuild complexity that makes Go expensive. If deeper analysis is later wanted, it can move to a built mode once the root Bazel Java integration lands.

References

NO-REF

Related Merge Requests/Pull Requests

None

Dependencies

None

Summary by CodeRabbit

  • Chores
    • Expanded security analysis coverage to include Java source changes.
    • Added buildless analysis support for Java and Kotlin code.

Add java-kotlin to the CodeQL matrix with build-mode none. Java supports
buildless extraction, so it scans on PRs like rust without a Bazel/Maven
build. Trigger on *.java changes as well.

The monorepo already contains Java source (examples/java-spring-boot-service)
and gains more with the nv-boot-parent import, so Java should be covered by
the same security scan as Go and Rust.

Co-authored-by: Balaji Ganesan <bganesan@nvidia.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@balajinvda
balajinvda requested a review from a team as a code owner July 20, 2026 21:04
@coderabbitai

coderabbitai Bot commented Jul 20, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The CodeQL workflow now triggers for Java file changes on pushes and pull requests, and analyzes Java/Kotlin sources using buildless extraction.

Changes

Java CodeQL Coverage

Layer / File(s) Summary
Java CodeQL workflow coverage
.github/workflows/codeql.yml
Push and pull request path filters include **/*.java, and the CodeQL analysis matrix adds java-kotlin with build-mode: none.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Suggested reviewers: cr7258

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: enabling CodeQL analysis for Java via the java-kotlin matrix entry.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codeql/enable-java

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Jul 20, 2026

Copy link
Copy Markdown

🛡️ CodeQL Analysis

🚨 Found 2 issue(s)

Severity Breakdown:

  • 🔴 Errors: 0
  • 🟡 Warnings: 0
  • 🔵 Notes: 0
📋 Top Issues

🔗 View full details in Security tab

🕐 Last updated: 2026-07-20 21:07:28 UTC | Commit: f647e2e

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/codeql.yml:
- Line 13: Update the CodeQL workflow path filters to include both Kotlin
patterns, **/*.kt and **/*.kts, alongside **/*.java in each applicable filter.
Ensure both filter entries use the same Java-and-Kotlin coverage so Kotlin-only
changes trigger the workflow.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 6e536499-d812-4d0b-a027-c6f5b1316984

📥 Commits

Reviewing files that changed from the base of the PR and between ef92e94 and f647e2e.

📒 Files selected for processing (1)
  • .github/workflows/codeql.yml

- "src/**"
- "**/*.go"
- "**/*.rs"
- "**/*.java"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Trigger CodeQL for Kotlin source changes too.

Because the matrix claims Java/Kotlin coverage, add **/*.kt and **/*.kts to both path filters. Otherwise Kotlin-only changes will not run this workflow.

Also applies to: 25-25

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/codeql.yml at line 13, Update the CodeQL workflow path
filters to include both Kotlin patterns, **/*.kt and **/*.kts, alongside
**/*.java in each applicable filter. Ensure both filter entries use the same
Java-and-Kotlin coverage so Kotlin-only changes trigger the workflow.

@balajinvda

Copy link
Copy Markdown
Contributor Author

Folded into #269 (cherry-picked the ci(codeql): enable Java commit onto feat/java-nv-boot-parent) so the Java source import and its CodeQL coverage land together.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant