mirror of
https://github.com/github/codeql.git
synced 2026-04-30 11:15:13 +02:00
Swift: Make the 'completePath' models work.
This commit is contained in:
@@ -103,8 +103,8 @@ private class NsStringSummaries extends SummaryModelCsv {
|
||||
";NSString;true;data(using:);;;Argument[-1];ReturnValue;taint",
|
||||
";NSString;true;data(using:allowLossyConversion:);;;Argument[-1];ReturnValue;taint",
|
||||
";NSString;true;path(withComponents:);;;Argument[0];ReturnValue;taint",
|
||||
";NSString;true;completePath(into:caseSensitive:matchesInto:filterTypes:);;;Argument[-1];Argument[0];taint",
|
||||
";NSString;true;completePath(into:caseSensitive:matchesInto:filterTypes:);;;Argument[-1];Argument[2];taint",
|
||||
";NSString;true;completePath(into:caseSensitive:matchesInto:filterTypes:);;;Argument[-1];Argument[0].CollectionElement;taint",
|
||||
";NSString;true;completePath(into:caseSensitive:matchesInto:filterTypes:);;;Argument[-1];Argument[2].CollectionElement.CollectionElement;taint",
|
||||
";NSString;true;getFileSystemRepresentation(_:maxLength:);;;Argument[-1];Argument[0];taint",
|
||||
";NSString;true;appendingPathComponent(_:);;;Argument[-1..0];ReturnValue;taint",
|
||||
";NSString;true;appendingPathComponent(_:conformingTo:);;;Argument[-1..0];ReturnValue;taint",
|
||||
|
||||
@@ -45,8 +45,8 @@ private class StringSummaries extends SummaryModelCsv {
|
||||
";StringProtocol;true;applyingTransform(_:reverse:);;;Argument[-1];ReturnValue;taint",
|
||||
";StringProtocol;true;cString(using:);;;Argument[-1];ReturnValue;taint",
|
||||
";StringProtocol;true;capitalized(with:);;;Argument[-1];ReturnValue;taint",
|
||||
";StringProtocol;true;completePath(into:caseSensitive:matchesInto:filterTypes:);;;Argument[-1];Argument[0].OptionalSome.CollectionElement;taint",
|
||||
";StringProtocol;true;completePath(into:caseSensitive:matchesInto:filterTypes:);;;Argument[-1];Argument[2].OptionalSome.CollectionElement.CollectionElement;taint",
|
||||
";StringProtocol;true;completePath(into:caseSensitive:matchesInto:filterTypes:);;;Argument[-1];Argument[0].CollectionElement;taint",
|
||||
";StringProtocol;true;completePath(into:caseSensitive:matchesInto:filterTypes:);;;Argument[-1];Argument[2].CollectionElement.CollectionElement;taint",
|
||||
";StringProtocol;true;components(separatedBy:);;;Argument[-1];ReturnValue;taint",
|
||||
";StringProtocol;true;data(using:allowLossyConversion:);;;Argument[-1];ReturnValue;taint",
|
||||
";StringProtocol;true;folding(options:locale:);;;Argument[-1];ReturnValue;taint",
|
||||
|
||||
@@ -479,7 +479,7 @@ func testPathInjection2(s1: UnsafeMutablePointer<String>, s2: UnsafeMutablePoint
|
||||
|
||||
_ = remoteString.completePath(into: s3, caseSensitive: false, matchesInto: nil, filterTypes: nil)
|
||||
_ = NSData().write(toFile: s3.pointee, atomically: true) // $ MISSING: hasPathInjection=445
|
||||
_ = NSData().write(toFile: s3[0], atomically: true) // $ MISSING: hasPathInjection=445
|
||||
_ = NSData().write(toFile: s3[0], atomically: true) // $ hasPathInjection=445
|
||||
|
||||
_ = fm.fileAttributes(atPath: remoteString, traverseLink: true) // $ hasPathInjection=445
|
||||
_ = try fm.attributesOfItem(atPath: remoteString) // $ hasPathInjection=445
|
||||
|
||||
Reference in New Issue
Block a user