Skip to content

Conversation

@kimtaejin3
Copy link
Contributor

Use StringPrototypeStartsWith from primordials instead of String.prototype.startsWith to prevent prototype pollution.

Use StringPrototypeStartsWith from primordials instead of
String.prototype.startsWith to prevent prototype pollution.

Refs: nodejs#59699
@nodejs-github-bot nodejs-github-bot added the needs-ci PRs that need a full CI run. label Jan 23, 2026
@codecov
Copy link

codecov bot commented Jan 23, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.80%. Comparing base (5d39030) to head (16ead22).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #61492      +/-   ##
==========================================
- Coverage   89.82%   89.80%   -0.03%     
==========================================
  Files         667      672       +5     
  Lines      203693   203908     +215     
  Branches    39163    39198      +35     
==========================================
+ Hits       182963   183111     +148     
- Misses      13061    13118      +57     
- Partials     7669     7679      +10     
Files with missing lines Coverage Δ
lib/internal/locks.js 95.10% <100.00%> (+0.01%) ⬆️

... and 42 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@aduh95 aduh95 added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. request-ci Add this label to start a Jenkins CI on a PR. labels Jan 23, 2026
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jan 23, 2026
@nodejs-github-bot
Copy link
Collaborator

}

if (name.startsWith('-')) {
if (StringPrototypeStartsWith(name, '-')) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (StringPrototypeStartsWith(name, '-')) {
if (name[0] === '-') {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs that have at least one approval, no pending requests for changes, and a CI started. needs-ci PRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants