
Research
Namastex.ai npm Packages Hit with TeamPCP-Style CanisterWorm Malware
Malicious Namastex.ai npm packages appear to replicate TeamPCP-style Canister Worm tradecraft, including exfiltration and self-propagation.
@kanaries/ml
Advanced tools
@kanaries/ml is a JavaScript/TypeScript library that provides a set of machine learning algorithms with an API similar to scikit-learn. It works in both browsers and Node.js environments.
# using yarn
yarn add @kanaries/ml
# or npm
npm install @kanaries/ml
import { Neighbors } from '@kanaries/ml';
const trainX = [
[0.12, 0.2, /* ... */ 0.2],
[0.21, 0.3, /* ... */ 0.2],
];
const trainY = [0, 1];
const knn = new Neighbors.KNearstNeighbors(3, 'distance', '2-norm');
knn.fit(trainX, trainY);
const testX = [
[0.52, 0.72, /* ... */ 0.24],
[0.11, 0.98, /* ... */ 0.32],
];
const result = knn.predict(testX);
console.log(result);
The library exposes several categories of algorithms:
DecisionTreeClassifier, DecisionTreeRegressor, ExtraTreeClassifier, ExtraTreeRegressorKNearstNeighbors, BallTree, KDTreeLinearRegression, LogisticRegressionSVC, NuSVC, LinearSVCBernoulliNB, CategoricalNBKMeans, kmeansPlusPlus, DBScan, OPTICS, MeanShift, HDBScanPCASpectralEmbedding, MDS, LocallyLinearEmbedding, TSNEIsolationForest, AdaBoostClassifierasyncMode runs a synchronous function in a worker (Web Worker or Node.js worker thread) and returns a Promise.
import { utils } from '@kanaries/ml';
const heavy = (x: number) => x * x;
const runAsync = utils.asyncMode(heavy);
const result = await runAsync(5);
# Install dependencies
yarn
# Run tests
npm run test
# Build the library
yarn build
# Start the example development server
yarn dev
FAQs
machine learning lib in javascript
The npm package @kanaries/ml receives a total of 6 weekly downloads. As such, @kanaries/ml popularity was classified as not popular.
We found that @kanaries/ml 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
Malicious Namastex.ai npm packages appear to replicate TeamPCP-style Canister Worm tradecraft, including exfiltration and self-propagation.

Product
Explore exportable charts for vulnerabilities, dependencies, and usage with Reports, Socket’s new extensible reporting framework.

Product
Socket for Jira lets teams turn alerts into Jira tickets with manual creation, automated ticketing rules, and two-way sync.