-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Python: Fix some Ql4Ql violations. #20330
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
53cd6f9
to
dbd3125
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes various Ql4Ql violations across multiple Python CodeQL files, focusing on code quality improvements such as simplifying conditions, renaming parameters for consistency, fixing typos, and removing unused variables.
- Simplified conditional expressions by removing unnecessary variables and if-then-else constructs
- Fixed parameter naming inconsistencies in documentation and function signatures
- Corrected spelling errors in comments and documentation
Reviewed Changes
Copilot reviewed 9 out of 10 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
TarSlipImprov.ql | Simplified exists condition by removing unused variable |
FluentApiModel.qll | Renamed module for naming convention compliance and added deprecated alias |
FunctionObject.qll | Renamed parameter for consistency and simplified function signature |
ObjectInternal.qll | Fixed parameter naming in documentation |
Stdlib.qll | Removed unused field variable and simplified condition |
DataFlowPrivate.qll | Fixed parameter names in documentation comments |
HashlibModule.qll | Fixed typo in comment |
CryptographyModule.qll | Simplified if-then-else conditions |
CryptoArtifact.qll | Fixed typo in comment |
*/ | ||
deprecated module InsecureContextConfiguration = InsecureContextConfig; | ||
|
||
private module InsecureContextFlow = DataFlow::GlobalWithState<InsecureContextConfig>; | ||
|
||
/** | ||
* Holds if `conectionCreation` marks the creation of a connection based on the contex |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are spelling errors in the comment: 'conectionCreation' should be 'connectionCreation' and 'contex' should be 'context'.
* Holds if `conectionCreation` marks the creation of a connection based on the contex | |
* Holds if `connectionCreation` marks the creation of a connection based on the context |
Copilot uses AI. Check for mistakes.
Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com>
Fix some Ql4Ql violations based on the following checks
ql/field-only-used-in-charpred
ql/could-be-cast
ql/counting-to-zero
ql/dataflow-module-naming-convention
ql/if-with-none
ql/missing-parameter-qldoc
ql/misspelling
DCA looks good.