mirror of
https://github.com/github/codeql.git
synced 2026-01-18 17:04:50 +01:00
Merge pull request #15607 from geoffw0/unsafeunpack
Swift: Trivial changes to swift/unsafe-unpacking
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
---
|
||||
category: newQuery
|
||||
---
|
||||
* Added a new query, `swift/unsafe-unpacking`, that detects unpacking user controlled zips without validating the destination file path is within the destination directory.
|
||||
* Added a new experimental query, `swift/unsafe-unpacking`, that detects unpacking user controlled zips without validating the destination file path is within the destination directory.
|
||||
|
||||
@@ -27,7 +27,7 @@ The following examples unpacks a remote zip using `Zip.unzipFile()` which is vul
|
||||
<p>
|
||||
The following examples unpacks a remote zip using `fileManager.unzipItem()` which is vulnerable to symlink path traversal.
|
||||
</p>
|
||||
<sample src="ZIPFoundationBad.swift" />
|
||||
<sample src="ZipFoundationBad.swift" />
|
||||
|
||||
|
||||
<p>Consider using a safer module, such as: <code>ZIPArchive</code></p>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
edges
|
||||
| UnsafeUnpack.swift:62:9:62:48 | call to Data.init(contentsOf:options:) | UnsafeUnpack.swift:62:60:62:60 | source |
|
||||
| UnsafeUnpack.swift:62:60:62:60 | source | UnsafeUnpack.swift:64:27:64:27 | source |
|
||||
| UnsafeUnpack.swift:62:60:62:60 | source | UnsafeUnpack.swift:67:39:67:39 | source |
|
||||
| UnsafeUnpack.swift:62:9:62:48 | call to Data.init(contentsOf:options:) | UnsafeUnpack.swift:62:60:62:60 | source | provenance | |
|
||||
| UnsafeUnpack.swift:62:60:62:60 | source | UnsafeUnpack.swift:64:27:64:27 | source | provenance | |
|
||||
| UnsafeUnpack.swift:62:60:62:60 | source | UnsafeUnpack.swift:67:39:67:39 | source | provenance | |
|
||||
nodes
|
||||
| UnsafeUnpack.swift:62:9:62:48 | call to Data.init(contentsOf:options:) | semmle.label | call to Data.init(contentsOf:options:) |
|
||||
| UnsafeUnpack.swift:62:60:62:60 | source | semmle.label | source |
|
||||
Reference in New Issue
Block a user