
Research
/Security News
9 Malicious NuGet Packages Deliver Time-Delayed Destructive Payloads
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.
This is a modified version of js-xpath. It is adapted for use with TypeScript and is compiled using npm run build.
npm install ts-xpath
import { XPathParser } from 'ts-xpath';
let parser = new XPathParser();
let parsed = parser.parse("//node");
xpath-models.ts provides a default XPathModels which does not support the hashtag preprocessor. If you want to support hashtags within xpaths, you can use:
let hashtagConfig: XPathModels.HashtagConfig = {
isValidNamespace: (namespace: string) => boolean,
hashtagToXPath: (hashtagExpr: string) => string | null,
toHashtag: (xpath: IXPathExpression) => string | null
}
parser.hashtagConfig = hashtagConfig;
hashtags use the format #namespace/arbitrarily/long/path and do not support filtering
yarn test to run tests.This is built using a fork of jison. To build the parser file yourself run:
$ yarn build - This will build both the distribution (webpack) package in dist/ and rebuild the Jison parser (src/jison/xpath.js) from the src/jison/ files.
$ yarn jison - Rebuild parser.js from the Jison specification files.
For more information on jison see the jison project website at: http://zaach.github.com/jison/.
FAQs
XPath Parser for TypeScript
The npm package ts-xpath receives a total of 36 weekly downloads. As such, ts-xpath popularity was classified as not popular.
We found that ts-xpath 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
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.