deno run -R script.ts
deno run --allow-read script.ts | Allow all reads from file system. |
deno run --allow-read=foo.txt,bar.txt script.ts | Allow reads from file foo.txt and bar.txt only. |
deno run --allow-read=node_modules script.ts | Allow reads from any file in any subdirectory of ./node_modules . |
deno run --allow-read=/etc --deny-read=/etc/hosts script.ts | Allow reading files in /etc but disallow reading /etc/hosts . |
deno run --deny-read script.ts | Deny all read access to disk, disabling permission prompts for reads. |
deno run -W script.ts
deno run --allow-write script.ts | Allow all writes to file system. |
deno run --allow-write=foo.txt,bar.txt script.ts | Allow writes to file foo.txt and bar.txt only. |
deno run --allow-write=./ --deny-write=./secrets script.ts | Allow reading files in current working directory but disallow writing to ./secrets directory. |
deno run --deny-write script.ts | Deny all write access to disk, disabling permission prompts. |
deno run -N script.ts
deno run --allow-net script.ts | Allow network access. |
deno run --allow-net=github.com,jsr.io script.ts | Allow network access to github.com and jsr.io . |
deno run --allow-net=example.com:80 script.ts | Allow a hostname at port 80. |
deno run --allow-net=1.1.1.1:443 script.ts | Allow an IPv4 address on port 443. |
deno run --allow-net=[2606:4700:4700::1111] script.ts | Allow an IPv6 address, all ports allowed. |
deno run --allow-net --deny-net=github.com,jsr.io script.ts | Allow access to network, but deny access to github.com and jsr.io . |
deno run --deny-net script.ts | Deny all network access, disabling permission prompts. |
deno run -E script.ts
deno run --allow-env script.ts | Allow access to all environment variables. |
deno run --allow-env=HOME,FOO script.ts | Allow HOME and FOO environment variables. |
deno run --allow-env="AWS_*" script.ts | Allow access to all environment variables starting with AWS_ . |
deno run --allow-env --deny-env=AWS_ACCESS_KEY_ID,AWS_SECRET_ACCESS_KEY script.ts | Allow all environment variables except AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY . |
deno run --deny-env script.ts | Deny all access to env variables, disabling permission prompts. |
deno run -S script.ts
deno run --allow-sys script.ts | Allow all system information APIs. |
deno run --allow-sys="systemMemoryInfo,osRelease" script.ts | Allow systemMemoryInfo and osRelease APIs. |
deno run --allow-sys --deny-sys="networkInterfaces" script.ts | Allow accessing all system information but networkInterfaces . |
deno run --deny-sys script.ts | Deny all access to system information, disabling permission prompts. |
deno run --allow-run script.ts | Allow running all subprocesses. |
deno run --allow-run="curl,whoami" script.ts | Allow running curl and whoami subprocesses. |
deno run --allow-run --deny-run="whoami,ps" script.ts | Allow running running all programs, but whoami and ps . |
deno run --deny-run script.ts | Deny all access for spawning subprocessing, disabling permission prompts. |
deno run --allow-ffi script.ts | Allow loading dynamic all libraries |
deno run --allow-ffi=./libfoo.so script.ts | Allow loading dynamic libraries from a specific path. |
deno run --allow-ffi --deny-ffi=./libfoo.so script.ts | Allow loading all dynamic libraries, but ./libfoo.so . |
deno run --deny-ffi script.ts | Deny loading all dynamic libraries, disabling permission prompts. |