Skip to content

ci: fix CodeQL setup - #177

Merged
riderodd merged 3 commits into
mainfrom
ci/codeql-workflow-permissions
Nov 9, 2026
Merged

riderodd merged 3 commits into
mainfrom
ci/codeql-workflow-permissions

Conversation

@riderodd

@riderodd riderodd commented Nov 9, 2026 •

Copy link
Copy Markdown
Owner

This makes GitHub's automatic security scanning check the Android code as well, and closes the five security warnings it raised about our CI configuration.

  • Add .github/workflows/codeql.yml (CodeQL advanced setup) scanning actions, javascript-typescript and java-kotlin. Kotlin needs a real build, so the workflow compiles the library module through the example Android project. The default setup only covered actions and JS/TS, and its autobuild couldn't build the native code because it never runs yarn install.
  • Set permissions: contents: read at the top level of ci.yml. This fixes 5 open actions/missing-workflow-permissions alerts.
  • No iOS scanning: the library's iOS code is Objective-C++, which CodeQL doesn't analyze (c-cpp finds no sources). The only Swift is the example app's boilerplate, which isn't worth a macOS build.

Note: CodeQL default setup was turned off in repo settings because it conflicts with advanced setup.

Copilot AI balanced review requested due to automatic review settings November 9, 2026 10:39
@github-advanced-security

Copy link
Copy Markdown

You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool.

What Enabling Code Scanning Means:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The CodeQL workflow uses build-mode: none for java-kotlin, which does not support Kotlin extraction and leaves the Android library implementation unscanned.

1 open issue
What changed in this PR

This PR introduces advanced CodeQL configuration intended to expand security scanning to Android and restricts CI token permissions to address workflow security alerts.

Changes:

  • Adds a CodeQL matrix for Actions, JavaScript/TypeScript, Java/Kotlin, and C/C++, triggered on pushes, pull requests, and a weekly schedule.
  • Sets top-level CI permissions to contents: read.
File Description
.github/​workflows/​codeql.yml Adds the advanced CodeQL workflow and language matrix.
.github/​workflows/​ci.yml Restricts default workflow token permissions to read-only repository access.

Review effort: Balanced

Comment thread .github/workflows/codeql.yml Resolved
@riderodd
riderodd merged commit 3221db1 into main Nov 9, 2026
9 checks passed
@riderodd
riderodd deleted the ci/codeql-workflow-permissions branch November 9, 2026 12:41
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.

3 participants