Sorry but i really need to understand something: I have compiled a binary with gcc on a M1 mac.
I have no apple developer program account on this computer. I am not an identified developper.
As you said, this binary has an adhoc signature (i don't really understand what is an "adhoc" signature, but i suppose this is a self signed mechanism ?)
I have sent this binary to another computer with an USB key.
This mac is running on Sonoma too. The security configuration on this mac is "Allow applications downloaded from App Store and identified developers".
I had no gatekeeper popup when i tried to run this binary on this other computer.
The binary has been run.
I was expecting to get a confirmation popup because this binary is not signed by an identified developer...