UI tests blocked by “bash requesting screen access” popup in Mac OS 15

On macOS, I get a system popup when running UI tests in GitHub saying:

“bash” is requesting to bypass the system private window picker and directly access your screen and audio.

How can I prevent these login and screen access popups from appearing during automated UI tests? Is there an official setup or configuration for running IntelliJ UI tests in CI environments (macOS, Linux, Windows) to avoid such dialogs? My builds run in GitHub Actions VMs, so I can’t manually grant these permissions, and they block the tests.

UI tests blocked by “bash requesting screen access” popup in Mac OS 15
 
 
Q