Skip to content

How safe is the Deno sandbox? Can i execute arbitrary code in a subprocess? #13249

Answered by firstdorsal
firstdorsal asked this question in Q&A
Discussion options

You must be logged in to vote

Thank you for the quick response!
I dont fully understand it: I tried and found that I cannot execute anything from within my deno subprocess:

console.log(Deno.run({ cmd: ['touch xd.txt']}));

returns

PermissionDenied: Requires run access to \"touch xd.txt\", run again with the --allow-run flag\n

To clarify:
I am spawning a deno process without permissions from a deno process with run permissions

Replies: 3 comments 5 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
5 replies
@bartlomieju
Comment options

@firstdorsal
Comment options

@firstdorsal
Comment options

@bartlomieju
Comment options

@firstdorsal
Comment options

Answer selected by firstdorsal
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants