GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — doc: describe how the permission model grants the entrypoint · nodejs/node@97dfaed

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • doc
    • api
      • cli.md
      • permissions.md
    • node.1
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎doc/api/cli.md‎

Copy file name to clipboardExpand all lines: doc/api/cli.md
+4-2Lines changed: 4 additions & 2 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -252,8 +252,10 @@ The valid arguments for the `--allow-fs-read` flag are:
252252

253253
Examples can be found in the [File System Permissions][] documentation.
254254

255-
The initializer module and custom `--require` modules has a implicit
256-
read permission.
255+
The initializer module and custom `--require` modules have an implicit
256+
read permission. The entrypoint is granted as passed on the command line,
257+
without the module loader's resolution; see the [File System Permissions][]
258+
documentation for details.
257259

258260
```console
259261
$ node --permission -r custom-require.js -r custom-require-2.js index.js
Collapse file

‎doc/api/permissions.md‎

Copy file name to clipboardExpand all lines: doc/api/permissions.md
+7Lines changed: 7 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,13 @@ $ node -r /path/to/custom-require.js --permission index.js
226226
list.
227227
* `index.js` will be included in the allowed file system read list.
228228

229+
The entrypoint is granted as passed on the command line, without the module
230+
loader's resolution. If it is a directory, such as in `node --permission .`,
231+
read access is granted to everything inside that directory, recursively. If it
232+
omits the file extension, such as in `node --permission index`, the resolved
233+
`index.js` is not granted. Pass the full path of the file, or use
234+
[`--allow-fs-read`][], to grant exactly what the application needs.
235+
229236
The valid arguments for both flags are:
230237

231238
* `*` - To allow all `FileSystemRead` or `FileSystemWrite` operations,
Collapse file

‎doc/node.1‎

Copy file name to clipboardExpand all lines: doc/node.1
+4-2Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,10 @@ Multiple paths can be allowed using multiple \fB--allow-fs-read\fR flags.
150150
Example \fB--allow-fs-read=/folder1/ --allow-fs-read=/folder2/\fR
151151
.El
152152
Examples can be found in the File System Permissions documentation.
153-
The initializer module and custom \fB--require\fR modules has a implicit
154-
read permission.
153+
The initializer module and custom \fB--require\fR modules have an implicit
154+
read permission. The entrypoint is granted as passed on the command line,
155+
without the module loader's resolution; see the File System Permissions
156+
documentation for details.
155157
.Bd -literal
156158
$ node --permission -r custom-require.js -r custom-require-2.js index.js
157159
.Ed

0 commit comments

Comments
0 (0)
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.