diff --git a/java/ql/src/Security/CWE/CWE-190/ArithmeticTainted.ql b/java/ql/src/Security/CWE/CWE-190/ArithmeticTainted.ql index 99d9879d19e..c4294e92ef0 100644 --- a/java/ql/src/Security/CWE/CWE-190/ArithmeticTainted.ql +++ b/java/ql/src/Security/CWE/CWE-190/ArithmeticTainted.ql @@ -37,7 +37,8 @@ module RemoteUserInputOverflow = TaintTracking::Make; module Flow = - DataFlow::MergePathGraph; + DataFlow::MergePathGraph; import Flow::PathGraph diff --git a/java/ql/src/Security/CWE/CWE-200/TempDirLocalInformationDisclosure.ql b/java/ql/src/Security/CWE/CWE-200/TempDirLocalInformationDisclosure.ql index 76998b40b50..6d99eba59c2 100644 --- a/java/ql/src/Security/CWE/CWE-200/TempDirLocalInformationDisclosure.ql +++ b/java/ql/src/Security/CWE/CWE-200/TempDirLocalInformationDisclosure.ql @@ -261,7 +261,9 @@ module InsecureMethodPathGraph implements DataFlow::PathGraphSig; + DataFlow::MergePathGraph; import Flow::PathGraph diff --git a/swift/ql/src/diagnostics/SuccessfullyExtractedFiles.ql b/swift/ql/src/diagnostics/SuccessfullyExtractedFiles.ql new file mode 100644 index 00000000000..e65734a1d88 --- /dev/null +++ b/swift/ql/src/diagnostics/SuccessfullyExtractedFiles.ql @@ -0,0 +1,15 @@ +/** + * @name Successfully extracted files + * @description Lists all files in the source code directory that were extracted without encountering a problem in the file. + * @kind diagnostic + * @id swift/diagnostics/successfully-extracted-files + * @tags successfully-extracted-files + */ + +import swift + +from File f +where + not exists(CompilerError e | e.getFile() = f) and + f.getBaseName().regexpMatch(".*\\.swift\\z") +select f, "File successfully extracted." diff --git a/swift/ql/test/query-tests/Diagnostics/SuccessfullyExtractedFiles.expected b/swift/ql/test/query-tests/Diagnostics/SuccessfullyExtractedFiles.expected new file mode 100644 index 00000000000..6f7928d5adb --- /dev/null +++ b/swift/ql/test/query-tests/Diagnostics/SuccessfullyExtractedFiles.expected @@ -0,0 +1 @@ +| main.swift:0:0:0:0 | main.swift | File successfully extracted. | diff --git a/swift/ql/test/query-tests/Diagnostics/SuccessfullyExtractedFiles.qlref b/swift/ql/test/query-tests/Diagnostics/SuccessfullyExtractedFiles.qlref new file mode 100644 index 00000000000..5cdfe870715 --- /dev/null +++ b/swift/ql/test/query-tests/Diagnostics/SuccessfullyExtractedFiles.qlref @@ -0,0 +1 @@ +diagnostics/SuccessfullyExtractedFiles.ql diff --git a/swift/ql/test/query-tests/Diagnostics/error.swift b/swift/ql/test/query-tests/Diagnostics/error.swift new file mode 100644 index 00000000000..3f153f68bc3 --- /dev/null +++ b/swift/ql/test/query-tests/Diagnostics/error.swift @@ -0,0 +1,2 @@ +//codeql-extractor-expected-status: 1 +#error("Uh oh") \ No newline at end of file diff --git a/swift/ql/test/query-tests/Diagnostics/main.swift b/swift/ql/test/query-tests/Diagnostics/main.swift new file mode 100644 index 00000000000..e69de29bb2d