1. @fast-check/poisoning
Set of utilities to ease detection and revert of poisoning
@fast-check/poisoning
Package: @fast-check/poisoning
Created by: dubzzz
Last modified: Wed, 31 Jan 2024 00:03:45 GMT
Version: 0.2.0
License: MIT
Downloads: 421
Repository: https://github.com/dubzzz/fast-check

Install

npm install @fast-check/poisoning
yarn add @fast-check/poisoning

@fast-check/poisoning

fast-check logo

Set of utilities to ease detection and revert of poisoning

npm version
monthly downloads
License


Why?

In JavaScript, "prototype poisoning" is one of the most common source for CVEs or zero days. It allows attackers to change the behaviour of some defaults like Array.prototype.map, Map, Set... so that they behave differently and can be leveraged for evil stuffs. This package can be used in addition to fast-check in order to detect poisoning that may occur during your property based tests.

Easy to use

The package comes with:

  • assertNoPoisoning: assert that the defaults known when first importing the package in your code have not been changed
  • restoreGlobals: restore the defaults so that any change that could have been detected by assertNoPoisoning will be resolved

Minimal requirements

  • Node ≥12.17.0

RELATED POST

10 Must-Know Windows Shortcuts That Will Save You Time

10 Must-Know Windows Shortcuts That Will Save You Time

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Navigating AWS Networking: Essential Hacks for Smooth Operation

Navigating AWS Networking: Essential Hacks for Smooth Operation

Achieving Stunning Visuals with Unity's Global Illumination

Achieving Stunning Visuals with Unity's Global Illumination

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code