
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.
@zaml/extract
Advanced tools
Entity extracting helper for ZAML.
Thanks to Github ❤️ ci is integrated with Github Actions
npm install @zaml/extract
A plugin is a function takes a text or Object expose methods for single text or text array
// extracting result structure
interface EntityInfo {
start: number;
end: number;
text: string;
type: string;
data: {};
}
// function plugin
type SingleExtractor = (text: string) => Promise<EntityInfo[]>;
// instance plugin
interface ExtractorInterface {
extract(text: string): Promise<EntityInfo[]>;
extractArray(textList: string[]): Promise<EntityInfo[][]>;
}
Build-in plugin
| Plugin | Type | Options | Description |
|---|---|---|---|
| link | function | none | Extracting domain names, emails |
| mention | function | { users: string[], pattern: RegExp } | Extract user mention |
| rest | Class | { url: string } | Extract entities from third party RESTful API |
type PluginOptions = string | {name: string, options: any} | SingleExtractor | ExtractorInterface;
interface {
constructor(options: {plugins: ExtractorOptions[]}});
extract(text: string | string[]): Promise<EntityInfo[] | EntityInfo[][]>
}
Extractor instance can be created by extract.create(),
It takes a option with plugins as an array of plugin options, each of options can be:
name of build-in plugin name and a options for plugin options.SingleExtractor.ExtractorInterface.You can specify one plugin multi-times with different options, like rest plugin for different API.
Each plugin will take turns to execute the extraction process, in case there is some entity overlap, the former ones will be kept.
import zaml from '@zaml/parser';
import extract from '@zaml/extract';
const extractor = extract.create({
plugins: ['link'],
});
const node = zaml.tokenize('Hello @everyone! this is our web site: www.example.com');
node.extractEntities(extractor);
console.log(JSON.stringify(node, null, 2));
output:
Checkout API Documentation
npm test
Test with more info of tokenizing
DEBUG=verbose npm test
FAQs
Entity extracting helper for ZAML
We found that @zaml/extract demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 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.