mirror of
https://github.com/rudrankriyam/App-Store-Connect-CLI.git
synced 2026-04-25 07:35:48 +03:00
[GH-ISSUE #523] Publish hardening: reject symlink IPA paths to prevent unintended uploads #147
Labels
No labels
bug
bug
documentation
enhancement
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/App-Store-Connect-CLI#147
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @rudrankriyam on GitHub (Feb 14, 2026).
Original GitHub issue: https://github.com/rudrankriyam/App-Store-Connect-CLI/issues/523
Summary
publishIPA validation follows symlinks (os.Stat+os.Open), allowing an unintended target file to be uploaded via symlink path.Why this matters
Upload commands should be explicit and safe. Following symlinks can lead to accidental upload of the wrong artifact.
Current behavior
internal/cli/publish/publish.gousesos.StatinvalidateIPAPath.internal/asc/upload.gousesos.OpeninExecuteUploadOperations.Expected behavior
Reproduction
ln -s /path/to/other.ipa app.ipaDetailed implementation plan
os.Lstatand reject symlink mode.Acceptance criteria
cc @cursor please implement this end-to-end.
@rudrankriyam commented on GitHub (Feb 14, 2026):
@cursor please implement this issue end-to-end using the checklist and acceptance criteria.
@cursor[bot] commented on GitHub (Feb 14, 2026):
Implemented end-to-end on
cursor/ipa-symlink-rejection-a2e3and pushed commit8e7819b(Harden publish IPA handling against symlink paths).internal/cli/publish/publish.gonow usesos.LstatinvalidateIPAPathand explicitly errors on symlinks (refusing to read symlink "...") before any upload work starts.internal/asc/upload.gonow opens source files through a newopenUploadSourceFileflow that checks symlinks and uses a no-follow open helper.internal/asc/secure_open_unix.gousesO_NOFOLLOWon Unix platforms.internal/asc/secure_open_other.gokeeps platform-compatible fallback behavior.internal/cli/publish/publish_test.go(reject symlink, allow regular file)internal/asc/upload_test.go(reject symlink upload source)internal/cli/cmdtest/commands_test.go(CLI-level regression for bothpublish testflightandpublish appstoresymlink IPA paths)Validation I ran (with runtime evidence):
make format,make lint,make testall pass./tmp/asc publish testflight ... --ipa <symlink> ...→Error: publish testflight: refusing to read symlink "...",exit_code=1/tmp/asc publish appstore ... --ipa <symlink> ...→Error: publish appstore: refusing to read symlink "...",exit_code=1@rudrankriyam commented on GitHub (Feb 14, 2026):
Fixed in #531 (merged to main), with non-Unix follow-up in #536.