Skip to content

Commit 7bdf2b8

Browse files
dandvthisisjofrank
andauthored
Mention recursing into subdirectories for --allow-read in security.md (#1331)
Co-authored-by: Jo Franchetti <jofranchetti@gmail.com>
1 parent b8bc883 commit 7bdf2b8

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

runtime/fundamentals/security.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ existence of a given file, and opening or connecting to Unix sockets.
104104
Access to read files is granted using the `--allow-read` (or `-R`) flag, and
105105
access to write files is granted using the `--allow-write` (or `-W`) flag. These
106106
flags can be specified with a list of paths to allow access to specific files or
107-
directories.
107+
directories and any subdirectories in them.
108108

109109
Definition: `--allow-read[=<PATH>...]` or `-R[=<PATH>...]`
110110

@@ -116,6 +116,9 @@ deno run --allow-read script.ts
116116

117117
# Allow reads from file foo.txt and bar.txt only
118118
deno run --allow-read=foo.txt,bar.txt script.ts
119+
120+
# Allow reads from any file in any subdirectory of ./node_modules
121+
deno run --allow-read=node_modules script.ts
119122
```
120123

121124
Definition: `--deny-read[=<PATH>...]`

0 commit comments

Comments
 (0)