Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
lassy-xpath
Advanced tools
Module for working with XPATH queries on LASSY XML files. It includes a graphical editor including auto completion, macros and validation based on Ace, a parser and validator based on ts-xpath and an "extractinator" for determining XPATHs to get each node from the returned tree separately. The functionality can be used as an Angular module, using JQuery or as plain JavaScript.
(Only tested in Angular 5)
Import the module:
import { LassyXPathModule } from 'lassy-xpath/ng';
@NgModule({
imports: [LassyXPathModule]
})
export class AppModule {}
Includes the services:
import { MacroService, ExtractinatorService, ValueEvent } from 'lassy-xpath/ng';
@Component()
export class ExampleComponent {
constructor(
macroService: MacroService,
private extractinatorService: ExtractinatorService) {
// set the macros to use in the editor
macroService.loadDefault();
}
inputChanged(event: ValueEvent) {
this.valid = !event.error;
this.value = event.xpath;
console.log(this.extractinatorService.extract(event.xpath));
}
}
Embeds an editor:
<lx-editor [value]="value" (onChange)="inputChanged($event)" autofocus="true"></lx-editor>
Use the ParserService
for parsing/validating a LASSY XML XPath.
Make sure the following scss is included:
@import 'lassy-xpath/scss/xpath-editor';
Extend JQuery by importing lassy-xpath/jquery
.
import 'lassy-xpath/jquery';
let $xpathEditor = $('.xpath-editor');
$xpathEditor.xpathEditor({
macrosUrl: $xpathEditor.data('macros-url')
});
let $xpathVariables = $('.xpath-variables');
$xpathVariables.xpathVariables({
formName: $xpathVariables.data('name'),
source: $xpathVariables.data('source'),
});
FAQs
[![Build Status](https://github.com/UUDigitalHumanitieslab/lassy-xpath/workflows/tests/badge.svg)](https://github.com/UUDigitalHumanitieslab/lassy-xpath/actions) [![npm version](https://badge.fury.io/js/lassy-xpath.svg)](https://badge.fury.io/js/lassy-xpa
We found that lassy-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’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.