Skip to content

Commit b51c855

Browse files
authored
Merge pull request github#7529 from erik-krogh/fixup-library-deps
QL: recognize dependecies of the form: libraryPathDependencies: library-name
2 parents b02fecf + cc5e9fe commit b51c855

File tree

4 files changed

+16
-0
lines changed

4 files changed

+16
-0
lines changed

ql/ql/src/codeql_ql/ast/Ast.qll

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2460,6 +2460,9 @@ module YAML {
24602460
name = entry.getListItem().getValue().getValue().trim() and
24612461
version = "\"*\""
24622462
)
2463+
or
2464+
name = this.getProperty("libraryPathDependencies") and
2465+
version = "\"*\""
24632466
}
24642467

24652468
/** Gets the database scheme of this qlpack */

ql/ql/test/callgraph/callgraph.expected

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,12 @@ getTarget
1818
| Overrides.qll:24:39:24:48 | MemberCall | Overrides.qll:22:12:22:44 | ClassPredicate bar |
1919
| Overrides.qll:28:3:28:9 | MemberCall | Overrides.qll:6:3:6:29 | ClassPredicate bar |
2020
| Overrides.qll:29:3:29:10 | MemberCall | Overrides.qll:8:3:8:41 | ClassPredicate baz |
21+
| packs/other/OtherThing.qll:5:3:5:8 | PredicateCall | packs/lib/LibThing/Foo.qll:1:1:1:30 | ClasslessPredicate foo |
22+
| packs/other/OtherThing.qll:6:3:6:8 | PredicateCall | packs/src/SrcThing.qll:8:1:8:30 | ClasslessPredicate bar |
2123
| packs/src/SrcThing.qll:4:3:4:8 | PredicateCall | packs/lib/LibThing/Foo.qll:1:1:1:30 | ClasslessPredicate foo |
2224
| packs/src/SrcThing.qll:5:3:5:8 | PredicateCall | packs/src/SrcThing.qll:8:1:8:30 | ClasslessPredicate bar |
2325
dependsOn
26+
| packs/other/qlpack.yml:1:1:1:4 | ql-other-pack-thing | packs/src/qlpack.yml:1:1:1:4 | ql-testing-src-pack |
2427
| packs/src/qlpack.yml:1:1:1:4 | ql-testing-src-pack | packs/lib/qlpack.yml:1:1:1:4 | ql-testing-lib-pack |
2528
exprPredicate
2629
| Foo.qll:24:22:24:31 | predicate | Foo.qll:22:3:22:32 | ClasslessPredicate myThing0 |
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import LibThing.Foo
2+
import SrcThing
3+
4+
predicate otherThing(int i) {
5+
foo(i) and
6+
bar(i)
7+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
name: ql-other-pack-thing
2+
version: 0.1.0
3+
libraryPathDependencies: ql-testing-src-pack

0 commit comments

Comments
 (0)