
Security News
The Hidden Blast Radius of the Axios Compromise
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.
gak.EventRank provides an implementation of the EventRank algorithm put forth by O’Madadhain & Smyth, 2005.npm install --save gak
bower install --save gak
See http://crosslead.github.io/gak for esdoc generated documentation.
To calculate EventRanks of correspondents involved in a series of events sorted by time...
import { EventRank } from 'gak';
/**
* Events should be an Array of objects of the form...
* { time: <Number>, to: <String|Array<String>>, from: <String> }
* sorted by the time property.
*
* NOTE: default parameters assume time is in milliseconds since the epoch
*/
const events = [ /* Add events here... */ ];
const R = new EventRank({ events });
// compute EventRank values
R.compute();
console.log(R.ranks); // => { ranks... }
/**
* To lazily compute a stream of events, call step()...
*
* Note, the model will need to be initially fed a set of
* correspondents to track
*/
const correspondents = [
// email address (or whatever is in the to/from properties of the events) 1...
// email address 2...
];
const R = new EventRank({ correspondents });
eventStream.on('event', event => {
R.step(event);
});
// if lazily computing, the ranks need to be finished by calling done();
R.done();
console.log(R.ranks); // => { ranks... }
/**
* If 2 (or more) events can occur at the exact same time,
* EventRank can process "bucketed" events...
*/
const correspondents = [
// email address 1...
// email address 2...
];
const R = new EventRank({ correspondents });
let bucket;
eventStream.on('event', event => {
if (bucket && bucket.time !== event.time) {
R.step(bucket);
bucket = { events: [ event ], time: event.time };
} else if (!bucket) {
bucket = { events: [ event ], time: event.time };
} else {
bucket.events.push(event);
}
});
// include last bucket...
R.step(bucket);
// if lazily computing, the ranks need to be finished by calling done();
R.done();
console.log(R.ranks); // => { ranks... }
FAQs
Graph Analysis Kit for NodeJS
We found that gak 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.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

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.