ci: fix CodeQL workflow permissions, build conditions, and trigger scope#65
Merged
jcardozo-eth merged 2 commits intoci/codeql-advanced-setupfrom Mar 24, 2026
Merged
Conversation
4 tasks
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
Copilot
AI
changed the title
[WIP] ci: add CodeQL advanced setup workflow
ci: fix CodeQL workflow permissions, build conditions, and trigger scope
Mar 24, 2026
jcardozo-eth
approved these changes
Mar 24, 2026
Member
jcardozo-eth
left a comment
There was a problem hiding this comment.
LGTM — all changes are reasonable: explicit PR event types, actions: read for visibility, generic build-mode condition, and maven caching. Squash and merge.
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.
Three correctness issues in the CodeQL Advanced Setup workflow added in the previous commit.
Permissions
Added
actions: readto job-level permissions — required by theactionslanguage scanner and present in GitHub's official CodeQL starter template.Build configuration
if: matrix.language == 'java-kotlin'→if: matrix.build-mode == 'manual'on both Java steps. The condition should reflect the build-mode requirement; the language-name check silently breaks if a second manually-built language is added.cache: maventoactions/setup-javato avoid re-downloading dependencies on every run.Trigger scope
Added explicit
types: [opened, synchronize, reopened]to thepull_requesttrigger. Without this, GitHub fires on all 13 activity types (labeled,assigned,closed, …), causing redundant scans on non-code-change events.💬 Send tasks to Copilot coding agent from Slack and Teams to turn conversations into code. Copilot posts an update in your thread when it's finished.