
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.
sequencer.js
Advanced tools
A simple but powerful and extensible JavaScript task sequencer.
npm install --save sequencer.js
// Create a handle and release it after some time has passed.
// The sequence will block at `doWaitForHandle(blockUntilLaterHandle)` until the handle is released.
var blockUntilLaterHandle = new Handle();
setTimeout(blockUntilLaterHandle.release, 10000);
var sequencer = new Sequencer();
// Enqueue a simple synchronous action
sequencer.do(() => log("1st instantly"));
// Waits for one second then performs an action after the delay has elapsed.
// This also demonstrates "do" task chaining.
sequencer.doWait(1000).do(() => log("2nd after 1 second"));
// Performs an action and waits until release() is called
sequencer.doWaitForRelease(release => setTimeout(release, 3000));
sequencer.do(() => log("3rd after waiting for a release() call"));
// Block until the handle is released
sequencer.doWaitForHandle(blockUntilLaterHandle);
sequencer.do(() => log("4th after waiting for a manually-created handle to be released"));
// Performs an action and waits until release() is called a certain number of times.
// The sequencer proceeds after 5 seconds (when two releases have been performed).
sequencer.doWaitForReleases(2, release => {
setTimeout(release, 5000);
setTimeout(release, 3000);
});
sequencer.do(() => log("5th after waiting for two release() calls"));
// Wait for a promise to be fulfilled.
// You can optionally obtain the promise's value and/or rejection reason.
var url = "https://cors-test.appspot.com/test";
sequencer.doWaitForPromise(fetch(url), response => log(`(Promise Resolved : HTTP ${response.status} from ${url})`));
sequencer.do(() => log("6th after waiting for a promise to be resolved"));
sequencer.doSequence(s => {
s.doWait(1000);
s.do(() => log(`> Subsequence : First`));
s.doWait(1000);
s.do(() => log(`> Subsequence : Second`));
s.doWait(1000);
s.do(() => log(`> Subsequence : Third`));
s.doWait(1000);
});
sequencer.do(() => log("7th after waiting for a subsequence to complete"));
An external sequencer.js extension looks like this:
var DoSomethingTask = function (someValue) {
this.perform = function (handle) {
// Do something, synchronously or asynchronously
setTimeout(() => {
console.log("Task performed after 2 seconds with value " + someValue);
handle.release(); // Then release the handle to indicate that the task is complete
}, 2000);
};
};
Sequencer.prototype.doSomething = function (someValue) {
this.push(new DoSomethingTask(someValue));
return this;
}
Take a look at core extensions in the sequencer.js source for concrete examples. The way the extensions are installed is slightly different from external extensions, but they still serve as appropriate examples.
FAQs
A simple but powerful and extensible JavaScript task sequencer
We found that sequencer.js demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers 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.