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.
xml-stream
Advanced tools
XmlStream is a Node.js XML stream parser and editor, based on node-expat (libexpat SAX parser binding).
When working with large XML files, it is probably a bad idea to use an XML to JavaScript object converter, or simply buffer the whole document in memory. Then again, a typical SAX parser might be too low-level for some tasks (and often a real pain).
This is why we've rolled our own stream parser that tries to address these shortcomings. It processes an XML stream chunk by chunk and fires events only for nodes of interest, matching them with CSS-like selectors.
Supported events:
data
on outgoing data chunk,end
when parsing has ended,startElement[: selector]
on opening tag for selector match,updateElement[: selector]
on finished node for selector match
with its contents buffered,endElement[: selector]
on closing tag for selector match,text[: selector]
on tag text for selector match.When adding listeners for startElement
, updateElement
, and text
the
callback can modify the provided node, before it is sent to the consumer.
Selector syntax is CSS-like and currently supports:
ancestor descendant
parent > child
Take a look at the examples for more information.
FAQs
XML stream to JavaScript object converter based on Expat.
The npm package xml-stream receives a total of 17,687 weekly downloads. As such, xml-stream popularity was classified as popular.
We found that xml-stream 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.