Place this script at the very top of your entry file so that you can enfore that you are always using an allow-list for each of the permission flags deno provides.
it will exit with error code 1 if:
- you use
--allow-all
- if you use any flag without providing a list:
--allow-write
instead of--allow-write=./tmp
- you use
--allow-hrtime
hrtime
- This one does not use a list but I've included it because Deno's documentation states that "High-resolution time can be used in timing attacks and fingerprinting".
This script was written for Deno's permissions as of version v1.32.3.