Skip to content

Commit b2edf6c

Browse files
committed
add Inline Expectations Test, update tests accordingly
1 parent a1c384c commit b2edf6c

File tree

4 files changed

+820
-536
lines changed

4 files changed

+820
-536
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
testFailures
2+
| test.go:637:31:637:57 | comment | Missing result:hasValueFlow="tarRead" |
3+
failures
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import go
2+
import TestUtilities.InlineExpectationsTest
3+
import experimental.frameworks.DecompressionBombs::DecompressionBomb
4+
5+
module TestDecompressionBombs implements TestSig {
6+
string getARelevantTag() { result = "hasValueFlow" }
7+
8+
predicate hasActualResult(Location location, string element, string tag, string value) {
9+
tag = "hasValueFlow" and
10+
exists(DataFlow::Node sink | Flow::flowTo(sink) |
11+
sink.hasLocationInfo(location.getFile().getAbsolutePath(), location.getStartLine(),
12+
location.getStartColumn(), location.getEndLine(), location.getEndColumn()) and
13+
element = sink.toString() and
14+
value = "\"" + sink.toString() + "\""
15+
)
16+
}
17+
}
18+
19+
import MakeTest<TestDecompressionBombs>

0 commit comments

Comments
 (0)