Skip to content

Conversation

@Ayoub-Mabrouk
Copy link

Replace native array methods (.push, .pop, .splice, .slice) withprimordials (ArrayPrototypePush, ArrayPrototypePop, ArrayPrototypeSplice,ArrayPrototypeSlice) throughout lib/internal/util/inspect.js for consistency and security.

This improves protection against prototype pollution and aligns with the primordials pattern used throughout the codebase.

Replace native array methods (.push, .pop, .splice, .slice) with
primordials (ArrayPrototypePush, ArrayPrototypePop, ArrayPrototypeSplice,
ArrayPrototypeSlice) throughout lib/internal/util/inspect.js for
consistency and security.

This improves protection against prototype pollution and aligns with
the primordials pattern used throughout the codebase.
@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. util Issues and PRs related to the built-in util module. labels Dec 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-ci PRs that need a full CI run. util Issues and PRs related to the built-in util module.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants