Repository navigation
feat: Deeplinks hardenning - #1988
Conversation
8866917 to
93bacfc
Compare
There was a problem hiding this comment.
Pull request overview
Hardens inter-app file-sharing deeplinks by strictly validating routes, paths, filesystem objects, and symlinks.
Changes:
- Adds strict file-sharing deeplink validation.
- Adds security-focused parser tests.
- Requires ios-core 19.1.3.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
Tuist/Package.swift |
Updates the ios-core dependency requirement. |
kDriveCore/Utils/DeeplinkParser.swift |
Validates shared-file deeplinks and filesystem containment. |
kDriveTests/kDriveCore/DeepLinks/UTFileSharingDeeplink.swift |
Tests valid files and key rejection cases. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
One quick change.
Also i wonder if some of this code should be moved in iOS-core in the DeeplinkService and the GroupContainerService which does the actual writing.
We can share the scheme and other static strings, also protect the writing directly in GroupContainerService
f311320 to
90c2ea3
Compare
# Conflicts: # Tuist/Package.resolved
29cf57f to
351a6b2
Compare
|
This PR/issue depends on:
|
|
|
I did check the mail to drive share on device, all works fine |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Suppressed comments (1)
kDriveTests/kDriveCore/DeepLinks/UTFileSharingDeeplink.swift:54
- The tests exercise only five acceptance/rejection paths, leaving security-critical branches unverified: unexpected path/credentials/port/fragment, empty or unknown query items, the 100-file boundary, relative and malformed/repeatedly encoded paths, symlinked handoff/UUID directories, and all-or-nothing rejection for mixed requests. Add focused negative and boundary cases so future parser changes cannot silently widen this contract.
func testRejectsWrongRoute() throws {



Description
Hardens shared-file deeplinks with a deliberately narrow scope:
Hardening Methods
kdrive-file-sharing://fileroute.urlquery parameters.safeLastPathComponent.Library/Caches/file-sharing/<UUID>/<filename>.Scope
This hardening applies only to the inter-application file-sharing deeplink. It does not introduce a generic file importer, additional staging, network downloads, or changes to other upload flows.
Dependency
Requires
ios-core19.1.3 for the hardenedsafeLastPathComponentimplementation.depends on Infomaniak/ios-core#205
Tests
Coverage includes: