Skip to content

Commit 9bb87da

Browse files
committed
Shared: Use final aliases in ConcentsShared.qll
1 parent 6e90823 commit 9bb87da

File tree

1 file changed

+2
-44
lines changed

1 file changed

+2
-44
lines changed

shared/concepts/codeql/concepts/ConceptsShared.qll

Lines changed: 2 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -46,27 +46,7 @@ module ConceptsMake<LocationSig Location, DF::InputSig<Location> DataFlowLang> {
4646
* Extend this class to refine existing API models. If you want to model new APIs,
4747
* extend `CryptographicOperation::Range` instead.
4848
*/
49-
class CryptographicOperation extends DataFlowNode instanceof CryptographicOperation::Range {
50-
/** Gets the algorithm used, if it matches a known `CryptographicAlgorithm`. */
51-
CryptographicAlgorithm getAlgorithm() { result = super.getAlgorithm() }
52-
53-
/** Gets the data flow node where the cryptographic algorithm used in this operation is configured. */
54-
DataFlowNode getInitialization() { result = super.getInitialization() }
55-
56-
/** Gets an input the algorithm is used on, for example the plain text input to be encrypted. */
57-
DataFlowNode getAnInput() { result = super.getAnInput() }
58-
59-
/**
60-
* Gets the block mode used to perform this cryptographic operation.
61-
*
62-
* This predicate is only expected to have a result if two conditions hold:
63-
* 1. The operation is an encryption operation, i.e. the algorithm used is an `EncryptionAlgorithm`, and
64-
* 2. The algorithm used is a block cipher (not a stream cipher).
65-
*
66-
* If either of these conditions do not hold, then this predicate should have no result.
67-
*/
68-
BlockMode getBlockMode() { result = super.getBlockMode() }
69-
}
49+
final class CryptographicOperation = CryptographicOperation::Range;
7050

7151
/** Provides classes for modeling new applications of a cryptographic algorithms. */
7252
module CryptographicOperation {
@@ -133,29 +113,7 @@ module ConceptsMake<LocationSig Location, DF::InputSig<Location> DataFlowLang> {
133113
* Extend this class to refine existing API models. If you want to model new APIs,
134114
* extend `Http::Client::Request::Range` instead.
135115
*/
136-
class Request extends DataFlowNode instanceof Request::Range {
137-
/**
138-
* Gets a data flow node that contributes to the URL of the request.
139-
* Depending on the framework, a request may have multiple nodes which contribute to the URL.
140-
*/
141-
DataFlowNode getAUrlPart() { result = super.getAUrlPart() }
142-
143-
/** Gets a string that identifies the framework used for this request. */
144-
string getFramework() { result = super.getFramework() }
145-
146-
/**
147-
* Holds if this request is made using a mode that disables SSL/TLS
148-
* certificate validation, where `disablingNode` represents the point at
149-
* which the validation was disabled, and `argumentOrigin` represents the origin
150-
* of the argument that disabled the validation (which could be the same node as
151-
* `disablingNode`).
152-
*/
153-
predicate disablesCertificateValidation(
154-
DataFlowNode disablingNode, DataFlowNode argumentOrigin
155-
) {
156-
super.disablesCertificateValidation(disablingNode, argumentOrigin)
157-
}
158-
}
116+
final class Request = Request::Range;
159117

160118
/** Provides a class for modeling new HTTP requests. */
161119
module Request {

0 commit comments

Comments
 (0)