After a lot of googling, I'm still unable to find an answer. We are building our product within Azure Pipelines with macOS hosts. After the pipeline is done, we get corrupted packages out of it. I could reproduce it locally with 12.3.1.
As you can see below, after overwriting the code sign, it fails to validate. Anyone got any idea how this can happen?
Btw, we don't have any embedded bundles, same result without --deep, the notarization reports on the same file: The signature of the binary is invalid.
# Force to override any codesign
codesign --force --deep --sign "xxx" --timestamp --options=runtime xxx.app
# Verify the codesign
codesign -vvv --deep --strict xxx.app
xxx.app: a sealed resource is missing or invalid
file modified: /Users/xxx/Desktop/xxx.app/Contents/MacOs/xxx
Only one file is having this issue, that is the main binary that is specified in the Info.plist as the startup program.