.o files aren't notarised. Only the executable files that will be run by other people are.
Nearly any file can be set as an executable, and surely a bash script set to launch an un notarized app in your application folder wouldn't magically bypass the gatekeeper security prompt for that app.