[GH-ISSUE #765] App bundle executable filename whitespace is lost during plist decoding #334

Closed
opened 2026-10-15 18:24:02 +00:00 by bsakaguchi · 1 comment
Owner

Originally created by @rudycelekli on GitHub (Oct 6, 2026).
Original GitHub issue: https://github.com/morluto/rea/issues/765

An ordinary macOS app bundle can declare a CFBundleExecutable with meaningful leading or trailing whitespace. Both XML and binary Info.plist forms preserve that value, as native plutil confirms.

Actual Clang-generated Mach-O programs named App exist under Contents/MacOS, but the public inspect-macho command currently reports app program file missing for both forms. Ordinary App controls succeed. BinaryTargetResolver trims the declared string in both decoding paths.

Preserve the XML string and use native plutil -n to suppress its producer newline while retaining the executable value. Existing name and containment checks should remain intact. This is file resolution; no target execution or deep provider claim.

Originally created by @rudycelekli on GitHub (Oct 6, 2026). Original GitHub issue: https://github.com/morluto/rea/issues/765 An ordinary macOS app bundle can declare a CFBundleExecutable with meaningful leading or trailing whitespace. Both XML and binary Info.plist forms preserve that value, as native plutil confirms. Actual Clang-generated Mach-O programs named ` App ` exist under Contents/MacOS, but the public inspect-macho command currently reports app program file missing for both forms. Ordinary `App` controls succeed. BinaryTargetResolver trims the declared string in both decoding paths. Preserve the XML string and use native plutil -n to suppress its producer newline while retaining the executable value. Existing name and containment checks should remain intact. This is file resolution; no target execution or deep provider claim.
bsakaguchi 2026-10-15 18:24:02 +00:00
Author
Owner

@kaoru0822-kitauji commented on GitHub (Oct 7, 2026):

Fixed on main (#815), after 4.1.0. The XML path uses the decoded CFBundleExecutable string unchanged. The binary path uses plutil -extract CFBundleExecutable raw -n, so plutil's newline is suppressed and the value is never trimmed. The existing name-safety and containment checks are unchanged.

Checked on current main: inspect-macho on an .app whose CFBundleExecutable is App resolves Contents/MacOS/ App (subject name App) for both xml1 and binary1 Info.plist forms. The App controls still resolve.

This ships in the next release (release PR #771).

<!-- gh-comment-id:6041892895 --> @kaoru0822-kitauji commented on GitHub (Oct 7, 2026): Fixed on `main` (#815), after 4.1.0. The XML path uses the decoded `CFBundleExecutable` string unchanged. The binary path uses `plutil -extract CFBundleExecutable raw -n`, so plutil's newline is suppressed and the value is never trimmed. The existing name-safety and containment checks are unchanged. Checked on current `main`: `inspect-macho` on an `.app` whose `CFBundleExecutable` is ` App ` resolves `Contents/MacOS/ App ` (subject name ` App `) for both `xml1` and `binary1` Info.plist forms. The `App` controls still resolve. This ships in the next release (release PR #771).
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#334
No description provided.