
Research
/Security News
Critical Vulnerability in NestJS Devtools: Localhost RCE via Sandbox Escape
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
heatmap-pkg
Advanced tools
Heatmaps for node.js and the browser!
const Heatmap = require("heatmap");
const fs = require("fs");
const heat = new Heatmap(500, 500, { radius: 30 });
for (let i = 0; i < 5000; i += 1) {
let rho = Math.random() * 2 * Math.PI;
let z = Math.pow(Math.random(), 2) * 200;
let x = 250 + Math.cos(rho) * z;
let y = 250 + Math.sin(rho) * z;
heat.addPoint(x, y);
}
heat.draw();
fs.writeFileSync("blob.png", heat.canvas.toBuffer());
There are two ways of creating a new heatmap:
Optionally, you can set the opts.radius
and opts.threshold
to control the
rendering a little.
Add a point to the heatmap with a radius
.
params
must be an object and can have:
Scale the canvas by the coefficients x
and y
.
If y
is undefined, scale both x and y by the first parameter, x
.
Render all the points onto the canvas element.
The HTML Canvas element.
Protip: with the canvas module for
node you can heat.canvas.buffer()
to get a Buffer with a PNG file all up in it.
With npm, just do:
npm install heatmap-pkg
Or with yarn:
yarn add heatmap-pkg
FAQs
A package for heatmaps on node.js and the browser
The npm package heatmap-pkg receives a total of 3 weekly downloads. As such, heatmap-pkg popularity was classified as not popular.
We found that heatmap-pkg demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
/Security News
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.