Skip to content

Commit f437a6f

Browse files
authored
Merge branch 'main' into maikypedia/ldap-injection
2 parents 558238a + 1c64fb1 commit f437a6f

File tree

472 files changed

+18768
-4066
lines changed

Some content is hidden

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

472 files changed

+18768
-4066
lines changed

cpp/ql/lib/CHANGELOG.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,23 @@
1+
## 0.8.1
2+
3+
### Deprecated APIs
4+
5+
* The library `semmle.code.cpp.dataflow.DataFlow` has been deprecated. Please use `semmle.code.cpp.dataflow.new.DataFlow` instead.
6+
7+
### New Features
8+
9+
* The `DataFlow::StateConfigSig` signature module has gained default implementations for `isBarrier/2` and `isAdditionalFlowStep/4`.
10+
Hence it is no longer needed to provide `none()` implementations of these predicates if they are not needed.
11+
12+
### Minor Analysis Improvements
13+
14+
* Data flow configurations can now include a predicate `neverSkip(Node node)`
15+
in order to ensure inclusion of certain nodes in the path explanations. The
16+
predicate defaults to the end-points of the additional flow steps provided in
17+
the configuration, which means that such steps now always are visible by
18+
default in path explanations.
19+
* The `IRGuards` library has improved handling of pointer addition and subtraction operations.
20+
121
## 0.8.0
222

323
### New Features

cpp/ql/lib/change-notes/2023-07-07-irguards-compares-pointers.md

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

cpp/ql/lib/change-notes/2023-07-12-default-stateconfigsig-predicates.md

Lines changed: 0 additions & 6 deletions
This file was deleted.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
category: breaking
3+
---
4+
* The `shouldPrintFunction` predicate from `PrintAstConfiguration` has been replaced by `shouldPrintDeclaration`. Users should now override `shouldPrintDeclaration` if they want to limit the declarations that should be printed.
5+
* The `shouldPrintFunction` predicate from `PrintIRConfiguration` has been replaced by `shouldPrintDeclaration`. Users should now override `shouldPrintDeclaration` if they want to limit the declarations that should be printed.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
category: majorAnalysis
3+
---
4+
* The `PrintAST` library now also prints global and namespace variables and their initializers.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
## 0.8.1
2+
3+
### Deprecated APIs
4+
5+
* The library `semmle.code.cpp.dataflow.DataFlow` has been deprecated. Please use `semmle.code.cpp.dataflow.new.DataFlow` instead.
6+
7+
### New Features
8+
9+
* The `DataFlow::StateConfigSig` signature module has gained default implementations for `isBarrier/2` and `isAdditionalFlowStep/4`.
10+
Hence it is no longer needed to provide `none()` implementations of these predicates if they are not needed.
11+
12+
### Minor Analysis Improvements
13+
14+
* Data flow configurations can now include a predicate `neverSkip(Node node)`
15+
in order to ensure inclusion of certain nodes in the path explanations. The
16+
predicate defaults to the end-points of the additional flow steps provided in
17+
the configuration, which means that such steps now always are visible by
18+
default in path explanations.
19+
* The `IRGuards` library has improved handling of pointer addition and subtraction operations.

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.8.0
2+
lastReleaseVersion: 0.8.1

cpp/ql/lib/printAst.ql

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ external string selectedSourceFile();
1818

1919
class Cfg extends PrintAstConfiguration {
2020
/**
21-
* Holds if the AST for `func` should be printed.
22-
* Print All functions from the selected file.
21+
* Holds if the AST for `decl` should be printed.
22+
* Print All declarations from the selected file.
2323
*/
24-
override predicate shouldPrintFunction(Function func) {
25-
func.getFile() = getFileBySourceArchiveName(selectedSourceFile())
24+
override predicate shouldPrintDeclaration(Declaration decl) {
25+
decl.getFile() = getFileBySourceArchiveName(selectedSourceFile())
2626
}
2727
}

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.8.1-dev
2+
version: 0.8.2-dev
33
groups: cpp
44
dbscheme: semmlecode.cpp.dbscheme
55
extractor: cpp

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,9 @@ private import PrintAST
66
* that requests that function, or no `PrintASTConfiguration` exists.
77
*/
88
private predicate shouldPrintDeclaration(Declaration decl) {
9-
not decl instanceof Function
9+
not (decl instanceof Function or decl instanceof GlobalOrNamespaceVariable)
1010
or
11-
not exists(PrintAstConfiguration c)
12-
or
13-
exists(PrintAstConfiguration config | config.shouldPrintFunction(decl))
11+
exists(PrintAstConfiguration config | config.shouldPrintDeclaration(decl))
1412
}
1513

1614
/**

0 commit comments

Comments
 (0)