Skip to content

Commit b2feaac

Browse files
authored
Merge branch 'main' into js/move-cors-query-from-experimental
2 parents d8c4d6d + e719dd9 commit b2feaac

File tree

106 files changed

+12399
-6712
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

106 files changed

+12399
-6712
lines changed

cpp/ql/lib/Options.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class CustomOptions extends Options {
3535
override predicate returnsNull(Call call) { Options.super.returnsNull(call) }
3636

3737
/**
38-
* Holds if a call to this function will never return.
38+
* Holds if a call to the function `f` will never return.
3939
*
4040
* By default, this holds for `exit`, `_exit`, `abort`, `__assert_fail`,
4141
* `longjmp`, `error`, `__builtin_unreachable` and any function with a
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
category: deprecated
3+
---
4+
* The predicate `getAContructorCall` in the class `SslContextClass` has been deprecated. Use `getAConstructorCall` instead.

cpp/ql/lib/experimental/cryptography/CryptoArtifact.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ abstract class CryptographicAlgorithm extends CryptographicArtifact {
127127
/**
128128
* Normalizes a raw name into a normalized name as found in `CryptoAlgorithmNames.qll`.
129129
* Subclassess should override for more api-specific normalization.
130-
* By deafult, converts a raw name to upper-case with no hyphen, underscore, hash, or space.
130+
* By default, converts a raw name to upper-case with no hyphen, underscore, hash, or space.
131131
*/
132132
bindingset[s]
133133
string normalizeName(string s) {

cpp/ql/lib/experimental/cryptography/modules/OpenSSL.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -652,14 +652,14 @@ module KeyGeneration {
652652
* Trace from EVP_PKEY_CTX* at algorithm sink to keygen,
653653
* users can then extrapolatae the matching algorithm from the alg sink to the keygen
654654
*/
655-
module EVP_PKEY_CTX_Ptr_Source_to_KeyGenOperationWithNoSize implements DataFlow::ConfigSig {
655+
module EVP_PKEY_CTX_Ptr_Source_to_KeyGenOperationWithNoSizeConfig implements DataFlow::ConfigSig {
656656
predicate isSource(DataFlow::Node source) { isEVP_PKEY_CTX_Source(source, _) }
657657

658658
predicate isSink(DataFlow::Node sink) { isKeyGen_EVP_PKEY_CTX_Sink(sink, _) }
659659
}
660660

661661
module EVP_PKEY_CTX_Ptr_Source_to_KeyGenOperationWithNoSize_Flow =
662-
DataFlow::Global<EVP_PKEY_CTX_Ptr_Source_to_KeyGenOperationWithNoSize>;
662+
DataFlow::Global<EVP_PKEY_CTX_Ptr_Source_to_KeyGenOperationWithNoSizeConfig>;
663663

664664
/**
665665
* UNKNOWN key sizes to general purpose key generation functions (i.e., that take in no key size and assume

cpp/ql/lib/experimental/cryptography/utils/OpenSSL/CryptoFunction.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ private string privateNormalizeFunctionName(Function f, string algType) {
5959
*
6060
* The predicate attempts to restrict normalization to what looks like an openssl
6161
* library by looking for functions only in an openssl path (see `isPossibleOpenSSLFunction`).
62-
* This may give false postive functions if a directory erronously appears to be openssl;
62+
* This may give false positive functions if a directory erronously appears to be openssl;
6363
* however, we take the stance that if a function
6464
* exists strongly mapping to a known function name in a directory such as these,
6565
* regardless of whether its actually a part of openSSL or not, we will analyze it as though it were.

cpp/ql/lib/experimental/cryptography/utils/OpenSSL/DataBuilders.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ private string privateNormalizeFunctionName(Function f, string algType) {
4949
*
5050
* The predicate attempts to restrict normalization to what looks like an openssl
5151
* library by looking for functions only in an openssl path (see `isPossibleOpenSSLFunction`).
52-
* This may give false postive functions if a directory erronously appears to be openssl;
52+
* This may give false positive functions if a directory erronously appears to be openssl;
5353
* however, we take the stance that if a function
5454
* exists strongly mapping to a known function name in a directory such as these,
5555
* regardless of whether its actually a part of openSSL or not, we will analyze it as though it were.

cpp/ql/lib/experimental/cryptography/utils/OpenSSL/PassthroughFunction.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ predicate knownPassthroughFunction(Function f, int inInd, int outInd) {
3131

3232
/**
3333
* `c` is a call to a function that preserves the algorithm but changes its form.
34-
* `onExpr` is the input argument passing through to, `outExpr` is the next expression in a dataflow step associated with `c`
34+
* `inExpr` is the input argument passing through to, `outExpr` is the next expression in a dataflow step associated with `c`
3535
*/
3636
predicate knownPassthoughCall(Call c, Expr inExpr, Expr outExpr) {
3737
exists(int inInd, int outInd |

cpp/ql/lib/experimental/semmle/code/cpp/rangeanalysis/RangeAnalysis.qll

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -298,10 +298,11 @@ private predicate boundFlowStep(Instruction i, NonPhiOperand op, int delta, bool
298298
else
299299
if strictlyNegative(x)
300300
then upper = true and delta = -1
301-
else
302-
if negative(x)
303-
then upper = true and delta = 0
304-
else none()
301+
else (
302+
negative(x) and
303+
upper = true and
304+
delta = 0
305+
)
305306
)
306307
or
307308
exists(Operand x |
@@ -321,10 +322,11 @@ private predicate boundFlowStep(Instruction i, NonPhiOperand op, int delta, bool
321322
else
322323
if strictlyNegative(x)
323324
then upper = false and delta = 1
324-
else
325-
if negative(x)
326-
then upper = false and delta = 0
327-
else none()
325+
else (
326+
negative(x) and
327+
upper = false and
328+
delta = 0
329+
)
328330
)
329331
or
330332
i.(RemInstruction).getRightOperand() = op and positive(op) and delta = -1 and upper = true

cpp/ql/lib/semmle/code/cpp/Concept.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ class ConceptIdExpr extends Expr, @concept_id {
198198
final Locatable getATemplateArgumentKind() { result = this.getTemplateArgumentKind(_) }
199199

200200
/**
201-
* Gets the `i`th template argument passed to the concept.
201+
* Gets template argument at index `index` passed to the concept, if any.
202202
*
203203
* For example, if:
204204
* ```cpp
@@ -219,7 +219,7 @@ class ConceptIdExpr extends Expr, @concept_id {
219219
}
220220

221221
/**
222-
* Gets the kind of the `i`th template argument value passed to the concept.
222+
* Gets the kind of the template argument value at index `index` passed to the concept, if any.
223223
*
224224
* For example, if:
225225
* ```cpp

cpp/ql/lib/semmle/code/cpp/Declaration.qll

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -223,8 +223,8 @@ class Declaration extends Locatable, @declaration {
223223
final Locatable getATemplateArgumentKind() { result = this.getTemplateArgumentKind(_) }
224224

225225
/**
226-
* Gets the `i`th template argument used to instantiate this declaration from a
227-
* template.
226+
* Gets the template argument at index `index` used to instantiate this declaration from a
227+
* template, if any.
228228
*
229229
* For example:
230230
*
@@ -245,9 +245,9 @@ class Declaration extends Locatable, @declaration {
245245
}
246246

247247
/**
248-
* Gets the `i`th template argument value used to instantiate this declaration
249-
* from a template. When called on a template, this will return the `i`th template
250-
* parameter value if it exists.
248+
* Gets the template argument value at index `index` used to instantiate this declaration
249+
* from a template. When called on a template, this will return the template
250+
* parameter value at index `index` if it exists.
251251
*
252252
* For example:
253253
*

0 commit comments

Comments
 (0)