The issue was addressed with improved checks. This issue is fixed in macOS Sonoma 14.5, macOS Ventura 13.6.7, iOS 17.5 and iPadOS 17.5, iOS 16.7.8 and iPadOS 16.7.8. A shortcut may be able to use sensitive data with certain actions without prompting the user.
https://support.apple.com/kb/HT214107
https://support.apple.com/kb/HT214106
https://support.apple.com/kb/HT214101
https://support.apple.com/kb/HT214100
https://support.apple.com/en-us/HT214107
https://support.apple.com/en-us/HT214106