ci: add CodeQL advanced setup workflow#62
Merged
jcardozo-eth merged 4 commits intomainfrom Mar 24, 2026
Merged
Conversation
Replace CodeQL Default Setup with an explicit workflow to fix the "configurations not found" warning on Dependabot PRs. The key fix is granting security-events: write permission. Scans actions, java-kotlin (with manual build), and python.
Member
Author
|
@copilot review — focus on correctness: permissions, build configuration, and trigger logic. |
Contributor
|
@jcardozo-eth I've opened a new pull request, #65, to work on those changes. Once the pull request is ready, I'll request review from you. |
Co-authored-by: jcardozo-eth <131674798+jcardozo-eth@users.noreply.github.com> Agent-Logs-Url: https://github.com/eth-library/data-archive-models/sessions/178884cc-90b0-481d-bddd-a7b6bbd99c7e
ci: fix CodeQL workflow permissions, build conditions, and trigger scope
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
.github/workflows/codeql.yml)actions,java-kotlin(manual build with Maven), andpythonWhy CodeQL
CodeQL is GitHub's static analysis engine that automatically finds security vulnerabilities and coding errors in source code. For this project it provides:
actionsscanner catches security misconfigurations in our GitHub Actions workflows, such as injection of untrusted input intorun:steps or overly permissive permissions.main.Since this is a library published to GitHub Packages and TestPyPI, ensuring the generated models are free of known vulnerability patterns adds a layer of trust for downstream consumers.
Why Advanced Setup (not Default Setup)
CodeQL Default Setup (configured via the GitHub UI) doesn't grant
security-events: writeto Dependabot PRs. This means CodeQL can't upload SARIF results for the PR branch, so GitHub can't compare them against themainbaseline. Every Dependabot PR shows a warning like:By switching to an Advanced Setup workflow checked into the repository, we explicitly declare
security-events: writeat the job level. GitHub trusts this because the workflow file lives on the base branch (main), so even Dependabot PRs get the permission they need to upload results.What CodeQL covers
actionsjava-kotlinpythonsrc/data_archive/— common security issues in generated Pydantic modelsPre-requisite
Before merging, disable CodeQL Default Setup in repo settings:
Settings > Code security and analysis > Code scanning > CodeQL analysis > switch to "Not configured"
Test plan