
Research
Malicious npm Package Brand-Squats TanStack to Exfiltrate Environment Variables
A brand-squatted TanStack npm package used postinstall scripts to steal .env files and exfiltrate developer secrets to an attacker-controlled endpoint.
Light-weight package for developers that need a reacting server in a blink of an eye
A powerful and flexible mock API server that automatically generates realistic data based on your specifications using Faker.js, it also optionally integrates with a file-based CSV database "snap4db" to simulate persistent data and accordingly reacts as an API.
npm install snapsrv4u
const { MockApiServer } = require('snapsrv4u');
const server = new MockApiServer(4517); // default value
server.addRoute('/api/users', {
method: 'GET',
count: 10, // number of objects created
properties: { // description of all the objects (created with faker.js)
id: { type: 'id', zeros: 5 },
name: { type: 'name' },
email: { type: 'email' }
}
});
server.start(); // starting the server
| Category | Types |
|---|---|
| Numbers | number, float, id, uuid |
| Strings | string, sentence, paragraph |
| Dates | date, past, future, timestamp |
| Personal | firstname, lastname, fullname, username, email, avatar, phone, gender, jobTitle, bio |
| Location | latitude, longitude, city, country, address, zipcode |
| Internet | url, ipv4, password, useragent |
| Company | company, department, catchPhrase |
| Commerce | product, price, color |
| Boolean | boolean |
| Custom | faker with method and options (e.g., faker: { method: 'music.genre' }) |
const server = new MockApiServer(port); // port defaults to 4517
// POST request
server.addRoute('/sign-up', {
method: 'POST', // required
collection: 'users', // required
properties: {
name: { type: 'name' }, // describes the the property
email: { type: 'email', unique: true } // can be a unique property
}
});
Gets data from body, params or query
// POST request
server.addRoute('/delete-from-known-collection/:id', {
method: 'DELETE',
collection: 'users'
});
server.addRoute('/delete-from-unknown-collection/:id', {
method: 'DELETE'
});
Gets data from body, params or query
// POST request
server.addRoute('/get-from-known-collection/:id', {
method: 'GET',
collection: 'users'
});
server.addRoute('/get-from-unknown-collection/:id', {
method: 'GET'
});
method: HTTP method ('GET', 'POST' or 'DELETE')count: Number of items to generate (1 for single object, >1 for array). will only work with quick startproperties: Object describing the data structure| Type | Description | Options |
|---|---|---|
number | Random number | min, max |
string | Random string | min, max (length) |
boolean | Random true/false | - |
date | Random date | from, to |
name | Random full name | - |
email | Random email address | - |
uuid | Random UUID | - |
id | Numeric ID with padding | zeros (padding length) |
Or anything else from faker.js
Each property can have these configurations:
type: (Required) Data type to generatemin: Minimum value/lengthmax: Maximum value/lengthzeros: Number of digits for IDsfrom: Start date for date rangesto: End date for date rangesFAQs
Light-weight package for developers that need a reacting server in a blink of an eye
The npm package snapsrv4u receives a total of 3 weekly downloads. As such, snapsrv4u popularity was classified as not popular.
We found that snapsrv4u demonstrated a healthy version release cadence and project activity because the last version was released less than 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
A brand-squatted TanStack npm package used postinstall scripts to steal .env files and exfiltrate developer secrets to an attacker-controlled endpoint.

Research
Compromised SAP CAP npm packages download and execute unverified binaries, creating urgent supply chain risk for affected developers and CI/CD environments.

Company News
Socket has acquired Secure Annex to expand extension security across browsers, IDEs, and AI tools.