
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.
Node OpenFaas connector that utilises async/await and node-fetch
This library is inspired by the work of Austin Frey.
npm i nodefaas
const faas = new NodeFaas();
console.log(await faas.invoke('figlet', 'Hello World'));
const FAAS_HOST = 'http://127.0.0.1:8080';
const FAAS_OPTIONS = {
username: '{your admin username}',
password: '{your admin password}',
agentSettings: { // Settings as per Node HTTP/HTTPS agent, e.g.:
keepAlive: true,
keepAliveMsecs: 1500,
};
};
const faas = new NodeFaas(FAAS_HOST, FAAS_OPTIONS);
let response;
try {
response = await faas.deploy('my-figlet', 'functions/figlet:latest');
console.log(await faas.invoke('my-figlet', 'Hello World'));
console.log(await faas.inspect('my-figlet'));
response = await faas.remove('my-figlet');
} catch (e) {
console.error(e);
}
All errors are thrown with a NodeFaasError object that extends the node Error object:
class NodeFaasError extends Error {
constructor(message, status, statusText) {
super(message);
this.name = "NodeFaasError";
this.status = status; // HTML Status codes
this.statusText = statusText;
}
}
faas.invoke(funcName, data, {options});
Returns the data from the FAAS function
faas.list();
Returns a list of the available FAAS functions in a JSON object
faas.inspect(funcName);
Returns statistics about a specific function as a JSON object
faas.deploy(funcName, image, {options});
Returns deployment status
faas.remove(funcName);
Returns removal status
I have yet to create any unit tests for this project!
In the root of the project there is a file called
test-figlet.js
This file deploys a figlet to your server, runs some speed tests against it, and then removes it.
To execute this file, you will need to add an .env file to the root of the project (sample below)
FAASHOST = http://127.0.0.1:8080
FAASUSERNAME = admin
FAASPASSWORD = adminpasswordadminpassword
FAASITERATIONS = 1000
Once run, it will output something similar to the following:
...
Running test: 999
Time to run 1 figlet: 5.67ms
Time to run 10 figlets: 48.61ms
{
name: 'nodefaas-figlet-99d9f6e3-e881-4131-9267-505c29766b98',
image: 'functions/figlet:latest',
invocationCount: 10803,
replicas: 20,
envProcess: '',
availableReplicas: 1,
labels: {
faas_function: 'nodefaas-figlet-99d9f6e3-e881-4131-9267-505c29766b98'
},
annotations: { 'prometheus.io.scrape': 'false' },
namespace: 'openfaas-fn'
}
Average time to run 1000 iterations:
Executing one: 22.76ms
Executing 10: 60.22ms
Removing test figlet
{ status: 202, statusText: 'Accepted', body: '' }
FAQs
Node OpenFaas connector
We found that nodefaas 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.