Crypto: Fix QL-for-QL alerts and refactor type standardization#19814
Merged
nicolaswill merged 8 commits intogithub:mainfrom Jun 26, 2025
Merged
Crypto: Fix QL-for-QL alerts and refactor type standardization#19814nicolaswill merged 8 commits intogithub:mainfrom
nicolaswill merged 8 commits intogithub:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
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
.qllfiles 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 |
Comment on lines
33
to
34
| name = "GCM" and type instanceof Crypto::GCM | ||
| or |
There was a problem hiding this comment.
This entry for GCM is duplicated later in the OR chain; consider removing the redundant clause to reduce code duplication and simplify maintenance.
Suggested change
| name = "GCM" and type instanceof Crypto::GCM | |
| or |
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 <175728472+Copilot@users.noreply.github.com>
Contributor
Author
|
Other than the ql-for-ql message above LGTM @nicolaswill |
Contributor
|
That was a Copilot review that I've since addressed. |
nicolaswill
approved these changes
Jun 26, 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.
Failing code scanning alert fixes affecting experimental crypto CPP code specifically.