Also happened to me once with code that I downloaded from GitHub instead of cloning it. When downloading, many Browsers add the com.apple.quarantine attribure to the files, which will be rejected by the App Store.
You can remove it by running this command: xattr -dr com.apple.quarantine /path/to/the/folder.
Topic:
App Store Distribution & Marketing
SubTopic:
TestFlight
Tags: