Skip to content

Commit e01c871

Browse files
committed
Rust: Accept changes to the dataflow/sources/file test.
1 parent 3ad014b commit e01c871

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

rust/ql/test/library-tests/dataflow/sources/file/TaintSources.expected

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@
44
| test.rs:17:31:17:38 | ...::read | Flow source 'FileSource' of type file (DEFAULT). |
55
| test.rs:22:22:22:39 | ...::read_to_string | Flow source 'FileSource' of type file (DEFAULT). |
66
| test.rs:22:22:22:39 | ...::read_to_string | Flow source 'FileSource' of type file (DEFAULT). |
7+
| test.rs:26:18:26:29 | ...::read_dir | Flow source 'FileSource' of type file (DEFAULT). |
78
| test.rs:29:22:29:25 | path | Flow source 'FileSource' of type file (DEFAULT). |
89
| test.rs:43:27:43:35 | file_name | Flow source 'FileSource' of type file (DEFAULT). |
10+
| test.rs:51:52:51:59 | read_dir | Flow source 'FileSource' of type file (DEFAULT). |
911
| test.rs:54:22:54:25 | path | Flow source 'FileSource' of type file (DEFAULT). |
1012
| test.rs:55:27:55:35 | file_name | Flow source 'FileSource' of type file (DEFAULT). |
1113
| test.rs:65:22:65:34 | ...::read_link | Flow source 'FileSource' of type file (DEFAULT). |

rust/ql/test/library-tests/dataflow/sources/file/test.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ fn test_fs() -> Result<(), Box<dyn std::error::Error>> {
2323
sink(buffer); // $ hasTaintFlow="file.txt"
2424
}
2525

26-
for entry in fs::read_dir("directory")? {
26+
for entry in fs::read_dir("directory")? { // $ Alert[rust/summary/taint-sources]
2727
let e = entry?;
2828

2929
let path = e.path(); // $ Alert[rust/summary/taint-sources]
@@ -48,7 +48,7 @@ fn test_fs() -> Result<(), Box<dyn std::error::Error>> {
4848
sink(file_name.clone().as_encoded_bytes()); // $ MISSING: hasTaintFlow
4949
sink(file_name); // $ hasTaintFlow
5050
}
51-
for entry in std::path::Path::new("directory").read_dir()? {
51+
for entry in std::path::Path::new("directory").read_dir()? { // $ Alert[rust/summary/taint-sources]
5252
let e = entry?;
5353

5454
let path = e.path(); // $ Alert[rust/summary/taint-sources]

0 commit comments

Comments
 (0)