Skip to content

Make PowerPoint import reliable in the App Store sandbox - #81

Merged
f merged 1 commit into
masterfrom
codex/app-store-pptx-sandbox
Aug 10, 2026
Merged

Make PowerPoint import reliable in the App Store sandbox#81
f merged 1 commit into
masterfrom
codex/app-store-pptx-sandbox

Conversation

@f

@f f commented Aug 10, 2026

Copy link
Copy Markdown
Owner

Summary

Copy a user-selected PowerPoint file into Textream’s own temporary directory before invoking the system unzip tool. This preserves the security-scoped read in the app process and makes presenter-note import reliable under the Mac App Store sandbox.

Verification

  • App Store configuration builds successfully for arm64 and x86_64
  • generated PPTX presenter-note fixture imports successfully
  • Developer ID-signed sandbox test app imports the bundled PPTX successfully
  • git diff --check

Prepared with Codex assistance; reviewed and submitted by Fatih.

Copilot AI lite review requested due to automatic review settings August 10, 2026 17:46
@f
f merged commit 1049678 into master Aug 10, 2026
1 check passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Improves PPTX presenter-notes import reliability under the Mac App Store sandbox by ensuring the user-selected archive is first copied into Textream’s own temporary directory before invoking the unzip child process.

Changes:

  • Copy the selected .pptx into a temporary directory owned by the app process.
  • Update the unzip invocation to operate on the copied archive instead of the original security-scoped URL.
Suppressed comments (1)

Textream/Textream/PresentationNotesExtractor.swift:62

  • Using /usr/bin/unzip on a user-selected PPTX without validating archive entry paths can allow “zip slip” path traversal (e.g. ../) and/or symlink tricks, potentially writing files outside the intended extraction directory. Consider switching to a ZIP extraction approach that normalizes each entry path and enforces that the destination stays within the extraction root (or at minimum, validate extracted paths and reject archives with unsafe entries).
        // Unzip using Process
        let process = Process()
        process.executableURL = URL(fileURLWithPath: "/usr/bin/unzip")
        process.arguments = ["-o", "-q", localArchive.path, "-d", tempDir.path]

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +49 to +53
// Copy the security-scoped document into Textream's own temporary
// directory before handing it to a child process. This keeps PPTX
// import reliable inside the Mac App Store sandbox.
let localArchive = tempDir.appendingPathComponent("presentation.pptx")
do {
@f
f deleted the codex/app-store-pptx-sandbox branch August 12, 2026 22:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants