macos-codesign-sidecar-strip
Installation
SKILL.md
Strip the ._* companions before signing a macOS bundle
macOS stores extended attributes on files. When a file with attributes is written into an archive
format that has no place for them, macOS writes them out as a companion file named ._<name>
sitting next to <name>. Unpack that archive and both files land on disk.
If they land inside an app bundle before it is signed, the chain that follows is unavoidable:
- The signer walks the bundle and treats each
._nameas an ordinary bundle member — it signs them and lists them in the bundle's signature manifest (_CodeSignature/CodeResources). - The user unzips the app, or drags it out of a disk image. The moment the file manager touches
it, macOS folds each
._nameback into the extended attributes ofnameand deletes the companion. - The launched bundle is now missing members its own seal still expects. macOS reports the app as damaged and refuses to open it; strict signature verification says a sealed resource is missing or invalid.