Skip to content

fix(safari): avoid shell interpolation during upload - #982

Open
WNZhao wants to merge 2 commits into
profullstack:masterfrom
WNZhao:fix/safari-upload-no-shell
Open

fix(safari): avoid shell interpolation during upload#982
WNZhao wants to merge 2 commits into
profullstack:masterfrom
WNZhao:fix/safari-upload-no-shell

Conversation

@WNZhao

@WNZhao WNZhao commented Aug 24, 2026

Copy link
Copy Markdown

Summary

  • invoke xcrun altool with execFileSync and a literal argv array
  • pass the upload secret only in the child environment
  • stop falling back to notarytool, which notarizes Developer ID artifacts but does not upload App Store builds
  • add a regression with shell metacharacters in the artifact path and Apple ID

Bug

The Safari target interpolated artifact paths, Apple IDs, key IDs, issuers, and a private key into shell command strings. Values containing command substitution or quotes could execute unintended shell code, and the private key was embedded in a second command. If the real upload failed, the adapter then ran an unrelated notarization command and could falsely report that the App Store upload succeeded.

Validation

  • failing-before regression captured the interpolated $(...) shell command
  • pnpm exec vitest run packages/targets/browser-safari/src/index.test.ts --reporter=dot (6/6)
  • pnpm --filter @profullstack/sh1pt-target-browser-safari typecheck
  • git diff --check

Comment thread packages/targets/browser-safari/src/index.test.ts Fixed
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