Skip to content

Commit

Permalink
document areas of the codebase with prototype pollution
Browse files Browse the repository at this point in the history
  • Loading branch information
aduh95 committed Jul 2, 2024
1 parent feb87e1 commit 6e0c0f0
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions doc/contributing/primordials.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,13 @@ The file `lib/internal/per_context/primordials.js` subclasses and stores the JS
built-ins that come from the VM so that Node.js built-in modules do not need to
later look these up from the global proxy, which can be mutated by users.

Usage of primordials should be preferred for any new code, but replacing current
code with primordials should be
For some area of the codebase, performance and code readability are deemed more
important than reliability against prototype pollution:

* `node:http2`

Usage of primordials should be preferred for new code in other areas, but
replacing current code with primordials should be
[done with care](#primordials-with-known-performance-issues). It is highly
recommended to ping the relevant team when reviewing a pull request that touches
one of the subsystems they "own".
Expand Down

0 comments on commit 6e0c0f0

Please sign in to comment.