Actions: Fix some Ql4Ql violations.#20324
Merged
michaelnebel merged 1 commit intogithub:mainfrom Sep 3, 2025
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR fixes Ql4Ql violations across various security-related query files in the GitHub Actions CodeQL library. The changes primarily address code quality issues by removing unused variables, simplifying conditional logic, and correcting minor documentation issues.
- Eliminates unused variables in class constructors and predicates
- Simplifies conditional logic patterns using
existsclauses instead ofif-then-elseconstructs - Fixes a spelling error in documentation
Reviewed Changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| ArtifactPoisoningPathTraversal.ql | Refactors upload artifact check to use instanceof instead of exists |
| UseOfUnversionedImmutableAction.qll | Removes unused immutable_action field |
| OutputClobberingQuery.qll | Removes unused variables and moves them to exists scope |
| EnvVarInjectionQuery.qll | Moves unused variables to exists scope in class constructors |
| ControlChecks.qll | Moves unused condition variable to exists scope |
| ArtifactPoisoningQuery.qll | Removes unused variables and refactors if-then-else to conditional logic |
| ArgumentInjectionQuery.qll | Removes unused argument variables |
| FlowSources.qll | Moves unused variables to exists scope |
| ExternalFlow.qll | Refactors if-then-else to conditional logic |
| BasicBlocks.qll | Fixes typo in comment from bb to bbStart |
| Ast.qll | Refactors if-then-else constructs and fixes spelling error |
| Locations.qll | Updates parameter names in documentation comment |
owen-mc
approved these changes
Sep 3, 2025
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.
Fix some Ql4Ql violations based on the following checks
ql/field-only-used-in-charpredql/could-be-castql/counting-to-zeroql/dataflow-module-naming-conventionql/if-with-noneql/missing-parameter-qldocql/misspellingDCA looks good.