
Research
Supply Chain Attack on Axios Pulls Malicious Dependency from npm
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.
random-helpers
Advanced tools
Random Helpers provides random helper functions.
npm install random-helpers
var randomHelpers = require("random-helpers");
console.log('Coin flip:');
if (randomHelpers.randomBoolean()) console.log('Heads');
else console.log('Tails');
Returns a subset of array consisting of a random combination of sub-elements.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| array | array | The array to generate a subset from |
Generates a random boolean.
Parameters: None
Generates a random integer in the range [0, array.length).
Parameters:
| Parameter | Type | Description |
|---|---|---|
| array | array | The array to generate an index from |
Generates a random integer in the range [min, max].
Parameters:
| Parameter | Type | Description |
|---|---|---|
| min | integer | The minimum integer value to generate |
| max | integer | The maximum integer value to generate |
Returns a random item from array.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| array | array | The array to return an item from |
Returns a random number in the range [min, max).
Parameters:
| Parameter | Type | Description |
|---|---|---|
| min | number | The minimum number value to generate |
| max | number | The maximum number value to generate |
Returns a random variable, of type boolean, null, undefined, number, string, function, or object. If the variable is of type object, it will either be an array, or plain object.
Parameters: None
Returns a random variable as in randomHelpers.randomVariable, but will not return a variable with a type specified in typesToExclude.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| typesToExclude | string or array of strings | The data types that the random variable should not be. Valid types include boolean, null, undefined, number, string, function, object, array, and plainObject. If typesToExclude includes object, then array and plainObject are both implicitly excluded. If typesToExclude is undefined, then no data types will be excluded. |
FAQs
Random helper functions
We found that random-helpers 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
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.

Security News
TeamPCP is partnering with ransomware group Vect to turn open source supply chain attacks on tools like Trivy and LiteLLM into large-scale ransomware operations.