I'm trying to run Kotlin tests in Safari on macOS Big Sur and each time I'm stuck on following dialog:

enter image description here

It looks like that after enabling "Develop > Disable Local File restrictions" option from menu I at least can click "Open" and tests will proceed. However for obvious reasons I don't want to submit this form manually each time I'm rerunning tests. My question would be: Is there's any way to force Safari to open local html files and get rid of any confirmation dialog completely?

What I've tried so far is to add Safari to the "System Preference > Security & Privacy > Privacy > Full Disk Access" settings section, as it described here - unfortunately that doesn't seem to help.

Safari version is: Version 14.0.3 (16610.| MacOS version is: Version 11.2.1 (Big Sur)

  • 1
    Super question. I’ve made macOS explicit with an edit - if you care to detail which exact version of macOS it may help as security is a bit of a moving target in the last few months and years especially with Safari and CVE patching pace has ramped up
    – bmike
    Jun 22 '21 at 10:59
  • @bmike thanks for editing and adding relevant tags. I've updated the question with information on versioning.
    – shabunc
    Jun 22 '21 at 11:06
  • Are you saying that "Disable Local File Restrictions" fixes it? If so, then you can just run defaults write to set that value, and restart Safari.
    – benwiggy
    Jun 22 '21 at 11:33
  • @benwiggy - unfortunately it looks like "Disable Local File Restrictions" does not fix it.
    – shabunc
    Jun 22 '21 at 11:46

You must log in to answer this question.

Browse other questions tagged .