Skip to content

Commit

Permalink
doc: mention Object.freeze(globalThis)
Browse files Browse the repository at this point in the history
Note, this likely is a bug on --frozen-intrinsics.
However, while it's not fixed we should keep this mention
  • Loading branch information
RafaelGSS committed Oct 31, 2022
1 parent f50676a commit 744e1dc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions locale/en/docs/guides/security/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,9 @@ existing globals using `globalThis`
4
```

Therefore, `Object.freeze(globalThis)` can be used to guarantee no globals will
be replaced.

### Prototype Pollution Attacks (CWE-1321)

Prototype pollution refers to the possibility to modify or inject properties
Expand Down Expand Up @@ -432,3 +435,4 @@ functionality isn't securely stable. Although, feedback is highly appreciated.
[Module Resolution Algorithm]: https://nodejs.org/api/modules.html#modules_all_together
[policy mechanism with integrity checking]: https://nodejs.org/api/permissions.html#integrity-checks
[experimental-features]: #experimental-features-in-production
[`Socket`]: https://socket.dev/

0 comments on commit 744e1dc

Please sign in to comment.