Those examples are very reasonable. However I also had Mac OS suddenly treat all m4a files on the system as potential malware and it blocked any attempt at opening them. Why did it do that? Because I checked the "set as default app" option, one minute after I had already opened the same file using the same application. The only way to open the files was by entering the password in the settings app each time - but re-setting the same app as default in the file's Get Info dialog got rid of that "protection" system-wide without any password prompts or extra permissions. I don't see how that was supposed to help with security.
This has been a thing long enough for online guides to exist that explain how to get rid of it. Fortunately, because setting the default program in a second place to get rid of a security barrier wasn't my first guess. When does a bug start to become an undocumented feature?