• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

ambar / concat-merge / 20185952435
87%

Build:
DEFAULT BRANCH: main
Ran 13 Dec 2025 03:15AM UTC
Jobs 1
Files 1
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

13 Dec 2025 03:15AM UTC coverage: 82.09% (-3.6%) from 85.714%
20185952435

push

github

web-flow
fix: Fix possible prototype pollution vulerability on `concatMerge()` (#1)

* fix: prevent constructor pollution by enforcing own-property checks

This patch fixes a vulnerability where global built-in properties (like the Object constructor) could be modified during a merge operation.

The previous implementation accessed properties from the prototype chain (e.g., 'constructor' from Object.prototype) when iterating over keys present in the source object. This allowed an attacker to retrieve the global `Object` function and pass it as the target to the mutation sink (`Object.assign`).

The fix ensures that only an object's own properties are considered for merging by implementing a safe check: `Object.prototype.hasOwnProperty.call(a, key)` before accessing `a[key]`. This prevents global built-in functions from being exposed and subsequently polluted.

Security-Severity: High

* fix: Exclude special properties from object merge

Skip merging special object properties like '__proto__', 'constructor', and 'prototype'.

* Simplify property access for object 'a'

14 of 20 branches covered (70.0%)

Branch coverage included in aggregate %.

2 of 4 new or added lines in 1 file covered. (50.0%)

41 of 47 relevant lines covered (87.23%)

17.83 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
2
82.09
-3.62% index.js
Jobs
ID Job ID Ran Files Coverage
1 20185952435.1 13 Dec 2025 03:15AM UTC 1
82.09
GitHub Action Run
Source Files on build 20185952435
  • Tree
  • List 1
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #20185952435
  • b8200438 on github
  • Prev Build on main (#10401847465)
  • Next Build on main (#20186138262)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc