Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
@ucast/core
Advanced tools
This package contains classes and functions that helps to create parsers, conditions AST, interpreters and translators.
npm i @ucast/core
# or
yarn add @ucast/core
# or
pnpm add @ucast/core
Parser is a function that translates conditions from any language into conditions AST. For example, MongoQueryParser
parses MongoQuery into AST which then can be interpreted by JavaScriptInterpreter
that returns a boolean value based on passed in object.
Abstract Syntax Tree of any condition. What is condition?
x > 4
is a condition, x === 4
is a condition as well, { x: { $eq: 4 } }
is a MongoQuery condition.
There are few types of AST nodes that allow us to represent any condition:
x > 4
, x
is a field, 4
is a value and >
is operator$where
operator and in SQL it's EXISTS
).An interpreter is a function that interprets conditions AST in a specific way. For example, it can:
WHERE
statementCombines Parser and Interpreter and returns a factory function:
const parse = (query) => /* to conditions AST */
const interpreter = createInterpreter({ /* condition interpreters */ });
const translate = (query, ...args) => interpreter.bind(null, parse(query));
Want to file a bug, contribute some code, or improve documentation? Excellent! Read up on guidelines for contributing
FAQs
git@github.com:stalniy/ucast.git
We found that @ucast/core 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
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.