Or sandbox-exec (or container/VM) with 1. first denay 'everything', then 2. grant access carefully.