Skip to content

Commit d883c1c

Browse files
committed
adding bundle tests
1 parent 84e02c8 commit d883c1c

File tree

13 files changed

+86
-1
lines changed

13 files changed

+86
-1
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
lockVersion: 1.0.0
3+
dependencies:
4+
codeql/cpp-all:
5+
version: 0.12.2
6+
codeql/dataflow:
7+
version: 0.1.5
8+
codeql/rangeanalysis:
9+
version: 0.0.4
10+
codeql/ssa:
11+
version: 0.2.5
12+
codeql/tutorial:
13+
version: 0.2.5
14+
codeql/typetracking:
15+
version: 0.2.5
16+
codeql/util:
17+
version: 0.2.5
18+
compiled: false
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
library: true
2+
name: qlt/cpp-customizations
3+
version: 0.0.1
4+
dependencies:
5+
"codeql/cpp-all": "0.12.2"
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import cpp
2+
private import semmle.code.cpp.security.FlowSources
3+
4+
module FooSources {
5+
private class FooExternalSourceFunction extends RemoteFlowSourceFunction {
6+
FooExternalSourceFunction() { this.hasName("foo") }
7+
8+
override predicate hasRemoteFlowSource(FunctionOutput output, string description) {
9+
output.isReturnValue() and
10+
description = "value returned by " + this.getName()
11+
}
12+
}
13+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
lockVersion: 1.0.0
3+
dependencies:
4+
codeql/cpp-all:
5+
version: 0.12.2
6+
codeql/dataflow:
7+
version: 0.1.5
8+
codeql/rangeanalysis:
9+
version: 0.0.4
10+
codeql/ssa:
11+
version: 0.2.5
12+
codeql/tutorial:
13+
version: 0.2.5
14+
codeql/typetracking:
15+
version: 0.2.5
16+
codeql/util:
17+
version: 0.2.5
18+
compiled: false
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
| test.c:4:13:4:15 | call to foo |
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import cpp
2+
import qlt.Customizations
3+
import semmle.code.cpp.security.FlowSources
4+
5+
select any(RemoteFlowSource s)
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
int foo();
2+
3+
int main(int argc, char** argv) {
4+
int i = foo();
5+
6+
return i;
7+
}

example/cpp/customizations/test/pre-bundle/FooExternalSourceFunction/Foo.expected

Whitespace-only changes.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import cpp
2+
import semmle.code.cpp.security.FlowSources
3+
4+
select any(RemoteFlowSource s)
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
int foo();
2+
3+
int main(int argc, char** argv) {
4+
int i = foo();
5+
6+
return i;
7+
}

0 commit comments

Comments
 (0)