I am simply trying to repackage some drag and drop apps as flat packages using Composer. We do this so we can use them in our provisioning workflows via Jamf Pro. Note: I have tried composer 10.44 to 10.48 and get the same results.
Using FileZilla as an example:

 That is pretty much it. No postinstall, but I am signing with my developer installer ID.

 I have tried to notarize and staple the .pkg's, but Apple does not like something in the .app file so I get "Invalid Package".

 I have tried all kinds of things to try and clear any security flag, but nothing seems to work. The only thing that does work is control clicking and selecting Open, then open anyway. That does not work when attempting to deploy to thousands of computers. Our help desk will get overwhelmed with calls.
I have tried all of the following to fix the issue via script (kitchen sink from various how to's I found):
# disable gatekeeper
sudo spctl --master-disable
# The applications final destination, should always be used.
problemApp='/Applications/Filezilla.app'
# chown app to root
sudo chown -R root:wheel $problemApp
# chmod permissions to correct
sudo chmod -R 755 $problemApp
sudo chmod +x $problemApp
# remove quarantine attribute
sudo xattr -r -d com.apple.quarantine $problemApp
sudo xattr -c $problemApp
sudo xattr -cr $problemApp
# touch the file
sudo touch -m $problemApp
# open the file
sudo open $problemApp
# enable gatekeeper
sudo spctl --master-enable
I have about a dozen drag and drop apps that I can no longer install via a pkg for redistribution on 13.4.1 because they all trigger a security flag and ask to be moved to the trash. My biggest headache is Mathematica, which requires I insert a license file within the drag and drop .app for lab distribution.
Any advice?
 





