Skip to content

Commit 31667b4

Browse files
committed
org.apache.commons.io tests
1 parent 720cf0a commit 31667b4

File tree

7 files changed

+431
-174
lines changed

7 files changed

+431
-174
lines changed

java/ql/test/query-tests/security/CWE-022/semmle/tests/TaintedPath.expected

Lines changed: 176 additions & 171 deletions
Large diffs are not rendered by default.

java/ql/test/query-tests/security/CWE-022/semmle/tests/mad/Test.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import java.nio.file.Files;
1111
import java.nio.file.Path;
1212
import javax.xml.transform.stream.StreamResult;
13+
import org.apache.commons.io.FileUtils;
1314
import org.codehaus.cargo.container.installer.ZipURLInstaller;
1415

1516
public class Test {
@@ -83,6 +84,8 @@ void test() throws IOException {
8384
Files.writeString((Path) source(), (CharSequence) null, (Charset) null);
8485
// "javax.xml.transform.stream;StreamResult";true;"StreamResult;(File);;Argument[0];create-file;ai-generated"
8586
new StreamResult((File) source());
87+
// "org.apache.commons.io;FileUtils;true;openInputStream;(File);;Argument[0];read-file;ai-generated"
88+
FileUtils.openInputStream((File) source());
8689
// "org.codehaus.cargo.container.installer;ZipURLInstaller;true;ZipURLInstaller;(URL,String,String);;Argument[1];create-file;ai-generated"
8790
new ZipURLInstaller((URL) null, (String) source(), "");
8891
// "org.codehaus.cargo.container.installer;ZipURLInstaller;true;ZipURLInstaller;(URL,String,String);;Argument[2];create-file;ai-generated"

java/ql/test/stubs/apache-commons-io-2.6/org/apache/commons/io/FileUtils.java

Lines changed: 173 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

java/ql/test/stubs/apache-commons-io-2.6/org/apache/commons/io/LineIterator.java

Lines changed: 20 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

java/ql/test/stubs/apache-commons-io-2.6/org/apache/commons/io/file/PathFilter.java

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

java/ql/test/stubs/apache-commons-io-2.6/org/apache/commons/io/filefilter/IOFileFilter.java

Lines changed: 22 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

java/ql/test/stubs/apache-commons-io-2.6/org/apache/commons/io/output/LockableFileWriter.java

Lines changed: 25 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)