-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Crypto: Fix QL-for-QL alerts and refactor type standardization #19814
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
base: main
Are you sure you want to change the base?
Conversation
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 addresses code scanning alert failures in the experimental C++ quantum/OpenSSL QL libraries by improving documentation, standardizing string-matching logic, and renaming modules/classes for consistency.
- Refactored comments and grammar in various
.qll
files for clarity. - Replaced
matches()
calls with exact string equality for known algorithm constants. - Renamed modules and classes (e.g.,
RSAPadding…
→RsaPadding…
,NID…
→Nid…
) and adjusted class names (e.g.,OAEPPaddingAlgorithmInstance
→OaepPaddingAlgorithmInstance
).
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
cpp/ql/lib/experimental/quantum/OpenSSL/Operations/EVPCipherOperation.qll | Reformatted and clarified top-level doc comments |
cpp/ql/lib/experimental/quantum/OpenSSL/AlgorithmValueConsumers/HashAlgorithmValueConsumer.qll | Adjusted article in doc comment for consistency |
cpp/ql/lib/experimental/quantum/OpenSSL/AlgorithmValueConsumers/DirectAlgorithmValueConsumer.qll | Reworded doc comment to improve readability |
cpp/ql/lib/experimental/quantum/OpenSSL/AlgorithmInstances/PaddingAlgorithmInstance.qll | Switched from matches() to = and renamed padding instance class |
cpp/ql/lib/experimental/quantum/OpenSSL/AlgorithmInstances/KnownAlgorithmConstants.qll | Rephrased comment headings |
cpp/ql/lib/experimental/quantum/OpenSSL/AlgorithmInstances/HashAlgorithmInstance.qll | Standardized constant checks from matches() to = |
cpp/ql/lib/experimental/quantum/OpenSSL/AlgorithmInstances/BlockAlgorithmInstance.qll | Standardized constant checks and renamed conditions |
cpp/ql/lib/experimental/quantum/OpenSSL/AlgorithmInstances/AlgToAVCFlow.qll | Renamed modules and classes to consistent PascalCase |
cpp/ql/lib/experimental/quantum/Language.qll | Refined comment and class-brace formatting |
name = "GCM" and type instanceof Crypto::GCM | ||
or |
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.
This entry for GCM is duplicated later in the OR chain; consider removing the redundant clause to reduce code duplication and simplify maintenance.
name = "GCM" and type instanceof Crypto::GCM | |
or |
Copilot uses AI. Check for mistakes.
cpp/ql/lib/experimental/quantum/OpenSSL/AlgorithmInstances/KnownAlgorithmConstants.qll
Outdated
Show resolved
Hide resolved
cpp/ql/lib/experimental/quantum/OpenSSL/AlgorithmInstances/PaddingAlgorithmInstance.qll
Fixed
Show fixed
Hide fixed
…wnAlgorithmConstants.qll Co-authored-by: Copilot <[email protected]>
Failing code scanning alert fixes affecting experimental crypto CPP code specifically.