Skip to content

Commit 4f6b698

Browse files
committed
Merge branch 'main' into moresensitive2
2 parents 918700f + f432cf9 commit 4f6b698

File tree

381 files changed

+18475
-9017
lines changed

Some content is hidden

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

381 files changed

+18475
-9017
lines changed

actions/ql/lib/CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
## 0.4.13
22

3-
No user-facing changes.
3+
### Bug Fixes
4+
5+
* The `actions/artifact-poisoning/critical` and `actions/artifact-poisoning/medium` queries now exclude artifacts downloaded to `$[{ runner.temp }}` in addition to `/tmp`.
46

57
## 0.4.12
68

actions/ql/lib/change-notes/2025-07-11-artifact-poisoning.md

Lines changed: 0 additions & 4 deletions
This file was deleted.
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
## 0.4.13
22

3-
No user-facing changes.
3+
### Bug Fixes
4+
5+
* The `actions/artifact-poisoning/critical` and `actions/artifact-poisoning/medium` queries now exclude artifacts downloaded to `$[{ runner.temp }}` in addition to `/tmp`.

config/identical-files.json

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -231,35 +231,10 @@
231231
"java/ql/src/experimental/Security/CWE/CWE-400/LocalThreadResourceAbuse.qhelp",
232232
"java/ql/src/experimental/Security/CWE/CWE-400/ThreadResourceAbuse.qhelp"
233233
],
234-
"CryptoAlgorithms Python/JS/Ruby": [
235-
"javascript/ql/lib/semmle/javascript/security/CryptoAlgorithms.qll",
236-
"python/ql/lib/semmle/python/concepts/CryptoAlgorithms.qll",
237-
"ruby/ql/lib/codeql/ruby/security/CryptoAlgorithms.qll",
238-
"rust/ql/lib/codeql/rust/security/CryptoAlgorithms.qll"
239-
],
240-
"CryptoAlgorithmNames Python/JS/Ruby": [
241-
"javascript/ql/lib/semmle/javascript/security/internal/CryptoAlgorithmNames.qll",
242-
"python/ql/lib/semmle/python/concepts/internal/CryptoAlgorithmNames.qll",
243-
"ruby/ql/lib/codeql/ruby/security/internal/CryptoAlgorithmNames.qll",
244-
"rust/ql/lib/codeql/rust/security/internal/CryptoAlgorithmNames.qll"
245-
],
246-
"SensitiveDataHeuristics Python/JS": [
247-
"javascript/ql/lib/semmle/javascript/security/internal/SensitiveDataHeuristics.qll",
248-
"python/ql/lib/semmle/python/security/internal/SensitiveDataHeuristics.qll",
249-
"ruby/ql/lib/codeql/ruby/security/internal/SensitiveDataHeuristics.qll",
250-
"swift/ql/lib/codeql/swift/security/internal/SensitiveDataHeuristics.qll",
251-
"rust/ql/lib/codeql/rust/security/internal/SensitiveDataHeuristics.qll"
252-
],
253234
"IncompleteUrlSubstringSanitization": [
254235
"javascript/ql/src/Security/CWE-020/IncompleteUrlSubstringSanitization.qll",
255236
"ruby/ql/src/queries/security/cwe-020/IncompleteUrlSubstringSanitization.qll"
256237
],
257-
"Concepts Python/Ruby/JS": [
258-
"python/ql/lib/semmle/python/internal/ConceptsShared.qll",
259-
"ruby/ql/lib/codeql/ruby/internal/ConceptsShared.qll",
260-
"javascript/ql/lib/semmle/javascript/internal/ConceptsShared.qll",
261-
"rust/ql/lib/codeql/rust/internal/ConceptsShared.qll"
262-
],
263238
"ApiGraphModels": [
264239
"javascript/ql/lib/semmle/javascript/frameworks/data/internal/ApiGraphModels.qll",
265240
"ruby/ql/lib/codeql/ruby/frameworks/data/internal/ApiGraphModels.qll",

cpp/ql/lib/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,13 @@
44

55
* The `UnknownDefaultLocation`, `UnknownExprLocation`, and `UnknownStmtLocation` classes have been deprecated. Use `UnknownLocation` instead.
66

7+
### New Features
8+
9+
* Added a `isFinalValueOfParameter` predicate to `DataFlow::Node` which holds when a dataflow node represents the final value of an output parameter of a function.
10+
711
### Minor Analysis Improvements
812

13+
* The `FunctionWithWrappers` library (`semmle.code.cpp.security.FunctionWithWrappers`) no longer considers calls through function pointers as wrapper functions.
914
* The analysis of C/C++ code targeting 64-bit Arm platforms has been improved. This includes support for the Arm-specific builtin functions, support for the `arm_neon.h` header and Neon vector types, and support for the `fp8` scalar type. The `arm_sve.h` header and scalable vectors are only partially supported at this point.
1015
* Added support for `__fp16 _Complex` and `__bf16 _Complex` types
1116
* Added `sql-injection` sink models for the Oracle Call Interface (OCI) database library functions `OCIStmtPrepare` and `OCIStmtPrepare2`.

cpp/ql/lib/change-notes/2025-07-10-final.md

Lines changed: 0 additions & 4 deletions
This file was deleted.

cpp/ql/lib/change-notes/released/5.3.0.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,13 @@
44

55
* The `UnknownDefaultLocation`, `UnknownExprLocation`, and `UnknownStmtLocation` classes have been deprecated. Use `UnknownLocation` instead.
66

7+
### New Features
8+
9+
* Added a `isFinalValueOfParameter` predicate to `DataFlow::Node` which holds when a dataflow node represents the final value of an output parameter of a function.
10+
711
### Minor Analysis Improvements
812

13+
* The `FunctionWithWrappers` library (`semmle.code.cpp.security.FunctionWithWrappers`) no longer considers calls through function pointers as wrapper functions.
914
* The analysis of C/C++ code targeting 64-bit Arm platforms has been improved. This includes support for the Arm-specific builtin functions, support for the `arm_neon.h` header and Neon vector types, and support for the `fp8` scalar type. The `arm_sve.h` header and scalable vectors are only partially supported at this point.
1015
* Added support for `__fp16 _Complex` and `__bf16 _Complex` types
1116
* Added `sql-injection` sink models for the Oracle Call Interface (OCI) database library functions `OCIStmtPrepare` and `OCIStmtPrepare2`.

cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/SsaInternals.qll

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,10 @@ private predicate isGlobalDefImpl(
153153
GlobalLikeVariable v, IRFunction f, int indirection, int indirectionIndex
154154
) {
155155
exists(VariableAddressInstruction vai |
156+
// The right-hand side of an initialization of a global variable
157+
// creates its own `IRFunction`. We don't want flow into that `IRFunction`
158+
// since the variable is only initialized once.
159+
not vai.getEnclosingFunction() = v and
156160
vai.getEnclosingIRFunction() = f and
157161
vai.getAstVariable() = v and
158162
isUse(_, _, vai, indirection, indirectionIndex) and

cpp/ql/lib/semmle/code/cpp/ir/implementation/Opcode.qll

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ private newtype TOpcode =
4242
TCompareGT() or
4343
TCompareLE() or
4444
TCompareGE() or
45+
TSpaceship() or
4546
TPointerAdd() or
4647
TPointerSub() or
4748
TPointerDiff() or
@@ -92,7 +93,9 @@ private newtype TOpcode =
9293
TUninitializedGroup() or
9394
TInlineAsm() or
9495
TUnreached() or
95-
TNewObj()
96+
TNewObj() or
97+
TTypeidExpr() or
98+
TTypeidType()
9699

97100
/**
98101
* An opcode that specifies the operation performed by an `Instruction`.
@@ -763,6 +766,15 @@ module Opcode {
763766
final override string toString() { result = "CompareGE" }
764767
}
765768

769+
/**
770+
* The `Opcode` for a `SpaceshipInstruction`.
771+
*
772+
* See the `SpaceshipInstruction` documentation for more details.
773+
*/
774+
class Spaceship extends BinaryOpcode, TSpaceship {
775+
final override string toString() { result = "Spaceship" }
776+
}
777+
766778
/**
767779
* The `Opcode` for a `PointerAddInstruction`.
768780
*
@@ -1281,4 +1293,29 @@ module Opcode {
12811293
class NewObj extends Opcode, TNewObj {
12821294
final override string toString() { result = "NewObj" }
12831295
}
1296+
1297+
/**
1298+
* The `Opcode` for a `TypeidInstruction`.
1299+
*
1300+
* See the `TypeidInstruction` documentation for more details.
1301+
*/
1302+
abstract class Typeid extends Opcode { }
1303+
1304+
/**
1305+
* The `Opcode` for a `TypeidExprInstruction`.
1306+
*
1307+
* See the `TypeidExprInstruction` documentation for more details.
1308+
*/
1309+
class TypeidExpr extends Typeid, UnaryOpcode, TTypeidExpr {
1310+
final override string toString() { result = "TypeidExpr" }
1311+
}
1312+
1313+
/**
1314+
* The `Opcode` for a `TypeidTypeInstruction`.
1315+
*
1316+
* See the `TypeidTypeInstruction` documentation for more details.
1317+
*/
1318+
class TypeidType extends Typeid, TTypeidType {
1319+
final override string toString() { result = "TypeidType" }
1320+
}
12841321
}

cpp/ql/lib/semmle/code/cpp/ir/implementation/aliased_ssa/Instruction.qll

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1604,6 +1604,13 @@ class CompareGEInstruction extends RelationalInstruction {
16041604
override predicate isStrict() { none() }
16051605
}
16061606

1607+
/**
1608+
* An instruction that represents a three-way comparison operator.
1609+
*/
1610+
class SpaceshipInstruction extends BinaryInstruction {
1611+
SpaceshipInstruction() { this.getOpcode() instanceof Opcode::Spaceship }
1612+
}
1613+
16071614
/**
16081615
* An instruction that branches to one of multiple successor instructions based on the value of an
16091616
* integer operand.
@@ -2293,3 +2300,26 @@ class NextVarArgInstruction extends UnaryInstruction {
22932300
class NewObjInstruction extends Instruction {
22942301
NewObjInstruction() { this.getOpcode() instanceof Opcode::NewObj }
22952302
}
2303+
2304+
/**
2305+
* An instruction that returns the type info for its operand.
2306+
*/
2307+
class TypeidInstruction extends Instruction {
2308+
TypeidInstruction() { this.getOpcode() instanceof Opcode::Typeid }
2309+
}
2310+
2311+
/**
2312+
* An instruction that returns the type info for its operand, where the
2313+
* operand occurs as an expression in the AST.
2314+
*/
2315+
class TypeidExprInstruction extends TypeidInstruction, UnaryInstruction {
2316+
TypeidExprInstruction() { this.getOpcode() instanceof Opcode::TypeidExpr }
2317+
}
2318+
2319+
/**
2320+
* An instruction that returns the type info for its operand, where the
2321+
* operand occurs as a type in the AST.
2322+
*/
2323+
class TypeidTypeInstruction extends TypeidInstruction {
2324+
TypeidTypeInstruction() { this.getOpcode() instanceof Opcode::TypeidType }
2325+
}

0 commit comments

Comments
 (0)