Skip to content

Scan Java with CodeQL advanced setup and a Gradle build [no-new-version] - #18

Merged
simonebortolin merged 2 commits into
masterfrom
claude/codeql-advanced-setup
Oct 25, 2026
Merged

simonebortolin merged 2 commits into
masterfrom
claude/codeql-advanced-setup

Conversation

@simonebortolin

@simonebortolin simonebortolin commented Oct 25, 2026 •

Copy link
Copy Markdown
Owner

Summary

The CodeQL default setup scans this Java-only project with build-mode: none. Buildless extraction tries to download the dependencies as .jar files, but the AndroidX libraries on Google Maven are AARs, so 13 fetches fail (androidx.recyclerview:recyclerview:jar:1.4.0, ...). RecyclerView stays unresolved and CodeQL reports Low Java analysis quality (calls with call target: 82 %, threshold 85 %).

MaterialSeekArc does not have the problem because it contains Kotlin, so the default setup builds it with autobuild.

This PR adds .github/workflows/codeql.yml (advanced setup):

  • java-kotlin with build-mode: autobuild (Gradle build on JDK 17, so the dependencies are resolved by Gradle)
  • actions with build-mode: none, as today
  • runs on push and pull requests to master, weekly, and manually

It also changes ci.yml: a push to master that keeps an already released VERSION_NAME left the release commit status pending forever. When a pushed commit message contains [no-new-version], the Report release status step now reports success instead. This PR does not bump the version and carries the tag, so its merge already reports success.

⚠️ Before merging

Disable the CodeQL default setup in Settings → Code security → CodeQL analysis. While it is enabled, GitHub rejects the results uploaded by an advanced workflow, so the Analyze jobs of this PR fail until then.

Testing

  • YAML validated locally; [no-new-version] detection checked in bash.
  • The Analyze (java-kotlin) job already builds with Gradle (BUILD SUCCESSFUL) without the low-quality diagnostics; only the upload is rejected while the default setup is enabled.

🤖 Generated with Claude Code

https://claude.ai/code/session_0178vjPYCurDqWnpvkLsVmZ1

The CodeQL default setup extracts this Java-only project with build-mode
none, which cannot fetch the AndroidX AARs from Google Maven: RecyclerView
stays unresolved and the analysis quality drops below the thresholds.
Build it with Gradle (autobuild) as the default setup already does for
MaterialSeekArc, which contains Kotlin.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0178vjPYCurDqWnpvkLsVmZ1

Copy link
Copy Markdown
Owner Author

Analyze (actions) and Analyze (java-kotlin) fail only at the upload step: Code Scanning could not process the submitted SARIF file: CodeQL analyses from advanced configurations cannot be processed when the default setup is enabled.

The analysis itself works (the Gradle build ends with BUILD SUCCESSFUL and the low-quality diagnostics are gone). Blocked on a repository setting that cannot be changed from this PR: disable the CodeQL default setup (Settings → Code security → CodeQL analysis), then re-run the failed jobs.


Generated by Claude Code

A push that keeps an already released version left the release commit
status pending forever. A commit message with [no-new-version] now marks
it as intentional and reports success.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0178vjPYCurDqWnpvkLsVmZ1
@simonebortolin simonebortolin changed the title Scan Java with CodeQL advanced setup and a Gradle build Scan Java with CodeQL advanced setup and a Gradle build [no-new-version] Oct 25, 2026
@simonebortolin
simonebortolin merged commit 4593c52 into master Oct 25, 2026
15 checks passed
@simonebortolin
simonebortolin deleted the claude/codeql-advanced-setup branch October 25, 2026 21:52
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.

2 participants