
Research
/Security News
Critical Vulnerability in NestJS Devtools: Localhost RCE via Sandbox Escape
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
github.com/MeirionHughes/levelup-async-iterator
adds iterator()
to levelup
that returns this._db.iterator(options)
plus an injected [Symbol.asyncIterator]
property
this package requires that the host system support async-iteration. Currently for node 8.x, this requires running your application with:
node --harmony_async_iteration example.js
import/require levelup-async-iterator
on app entry;
import 'levelup-async-iterator';
import * as levelup from 'levelup';
import * as leveldown from 'leveldown';
import * as encode from 'encoding-down';
let db = levelup(encode(leveldown('./db')));
async function main() {
await db.put("a", "John");
await db.put("b", "James");
await db.put("c", "Janet");
await db.put("d", "Joseph");
let iter = db.iterator();
for await (let [key, value] of iter) {
if(key === "a"){
iter.it.seek("c");
}
console.log(key, value);
}
}
main();
output:
D:\Code\levelup-async-iterator>ts-node example
a John
c Janet
d Joseph
db.iterator()
creates a iterator from the underlying store. the options
parameter is the same as what you'd use for createReadStream
FAQs
Unknown package
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
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.