Skip to content

Conversation

@hizzgdev
Copy link
Owner

Potential fix for https://github.com/hizzgdev/jsmind/security/code-scanning/2

To fix this issue, the merge function needs to block the assignment or merging of potentially dangerous special property names (__proto__, constructor, and possibly prototype). The best way to do this is to, inside the loop, skip any keys with those names before assigning or recursing. This can be achieved by adding a simple conditional check at the top of the loop. No external library is required; this can be done inline. Only the function body of util.json.merge (lines 75–92) in src/jsmind.util.js must be changed.


Suggested fixes powered by Copilot Autofix. Review carefully before merging.

…tion

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@hizzgdev hizzgdev marked this pull request as ready for review December 14, 2025 15:42
@hizzgdev hizzgdev merged commit d1dfc4b into master Dec 14, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants