Skip to content

Commit b147bac

Browse files
authored
Merge branch 'main' into amammad-go-fastHttp
2 parents 2ad59a5 + 4f7fde7 commit b147bac

File tree

2,935 files changed

+132646
-32782
lines changed

Some content is hidden

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

2,935 files changed

+132646
-32782
lines changed

CODEOWNERS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
/swift/ @github/codeql-swift
99
/misc/codegen/ @github/codeql-swift
1010
/java/kotlin-extractor/ @github/codeql-kotlin
11+
/java/ql/test/kotlin/ @github/codeql-kotlin
12+
/java/ql/test-kotlin2/ @github/codeql-kotlin
1113

1214
# ML-powered queries
1315
/javascript/ql/experimental/adaptivethreatmodeling/ @github/codeql-ml-powered-queries-reviewers

codeql-workspace.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
provide:
22
- "*/ql/src/qlpack.yml"
33
- "*/ql/lib/qlpack.yml"
4-
- "*/ql/test/qlpack.yml"
4+
- "*/ql/test*/qlpack.yml"
55
- "*/ql/examples/qlpack.yml"
66
- "*/ql/consistency-queries/qlpack.yml"
77
- "*/ql/automodel/src/qlpack.yml"

cpp/autobuilder/Semmle.Autobuild.Cpp.Tests/BuildScripts.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,9 +145,9 @@ IEnumerable<string> IBuildActions.EnumerateDirectories(string dir)
145145

146146
bool IBuildActions.IsMacOs() => IsMacOs;
147147

148-
public bool IsArm { get; set; }
148+
public bool IsRunningOnAppleSilicon { get; set; }
149149

150-
bool IBuildActions.IsArm() => IsArm;
150+
bool IBuildActions.IsRunningOnAppleSilicon() => IsRunningOnAppleSilicon;
151151

152152
string IBuildActions.PathCombine(params string[] parts)
153153
{

cpp/ql/lib/CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
## 0.12.0
2+
3+
### Breaking Changes
4+
5+
* The expressions `AssignPointerAddExpr` and `AssignPointerSubExpr` are no longer subtypes of `AssignBitwiseOperation`.
6+
7+
### Minor Analysis Improvements
8+
9+
* The "Returning stack-allocated memory" (`cpp/return-stack-allocated-memory`) query now also detects returning stack-allocated memory allocated by calls to `alloca`, `strdupa`, and `strndupa`.
10+
* Added models for `strlcpy` and `strlcat`.
11+
* Added models for the `sprintf` variants from the `StrSafe.h` header.
12+
* Added SQL API models for `ODBC`.
13+
* Added taint models for `realloc` and related functions.
14+
115
## 0.11.0
216

317
### Breaking Changes

cpp/ql/lib/change-notes/2023-10-30-realloc-flow.md

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

cpp/ql/lib/change-notes/2023-10-31-assign-pointer-add-sub-expr.md

Lines changed: 0 additions & 4 deletions
This file was deleted.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
## 0.12.0
2+
3+
### Breaking Changes
4+
5+
* The expressions `AssignPointerAddExpr` and `AssignPointerSubExpr` are no longer subtypes of `AssignBitwiseOperation`.
6+
7+
### Minor Analysis Improvements
8+
9+
* The "Returning stack-allocated memory" (`cpp/return-stack-allocated-memory`) query now also detects returning stack-allocated memory allocated by calls to `alloca`, `strdupa`, and `strndupa`.
10+
* Added models for `strlcpy` and `strlcat`.
11+
* Added models for the `sprintf` variants from the `StrSafe.h` header.
12+
* Added SQL API models for `ODBC`.
13+
* Added taint models for `realloc` and related functions.

cpp/ql/lib/codeql-pack.release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
lastReleaseVersion: 0.11.0
2+
lastReleaseVersion: 0.12.0

cpp/ql/lib/qlpack.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: codeql/cpp-all
2-
version: 0.11.1-dev
2+
version: 0.12.1-dev
33
groups: cpp
44
dbscheme: semmlecode.cpp.dbscheme
55
extractor: cpp

cpp/ql/lib/semmle/code/cpp/ir/dataflow/MustFlow.qll

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@ abstract class MustFlowConfiguration extends string {
3131
*/
3232
abstract predicate isSink(Operand sink);
3333

34+
/**
35+
* Holds if data flow through `instr` is prohibited.
36+
*/
37+
predicate isBarrier(Instruction instr) { none() }
38+
3439
/**
3540
* Holds if the additional flow step from `node1` to `node2` must be taken
3641
* into account in the analysis.
@@ -48,18 +53,21 @@ abstract class MustFlowConfiguration extends string {
4853
*/
4954
final predicate hasFlowPath(MustFlowPathNode source, MustFlowPathSink sink) {
5055
this.isSource(source.getInstruction()) and
51-
source.getASuccessor+() = sink
56+
source.getASuccessor*() = sink
5257
}
5358
}
5459

5560
/** Holds if `node` flows from a source. */
5661
pragma[nomagic]
5762
private predicate flowsFromSource(Instruction node, MustFlowConfiguration config) {
58-
config.isSource(node)
59-
or
60-
exists(Instruction mid |
61-
step(mid, node, config) and
62-
flowsFromSource(mid, pragma[only_bind_into](config))
63+
not config.isBarrier(node) and
64+
(
65+
config.isSource(node)
66+
or
67+
exists(Instruction mid |
68+
step(mid, node, config) and
69+
flowsFromSource(mid, pragma[only_bind_into](config))
70+
)
6371
)
6472
}
6573

0 commit comments

Comments
 (0)