
Product
Introducing Pull Request Stories to Help Security Teams Track Supply Chain Risks
Socket’s new Pull Request Stories give security teams clear visibility into dependency risks and outcomes across scanned pull requests.
node-pledge
Advanced tools
Bindings for for OpenBSD's pledge(2)
pledge(2)
allows a process to ratchet down the privileges it requires to run, if it attempts to access
a privilege it has pledged to not use, it will be killed by the kernel.
Install via npm:
npm install --save node-pledge
var http = require('http');
var pledge = require('node-pledge');
pledge.init("stdio rpath wpath ioctl");
console.log("stuff");
// try to do something with http (will cause the kernel to kill node)
http.get("http://www.google.com/", function(res) {
console.log(res);
}).on('error', function(e) {
console.log(e);
});
Output:
node stuff.js
stuff
Abort trap (core dumped)
Line from dmesg(8)
:
node(24353): sysctl 6: 4 17 0 0 3 0
node(24353): syscall 202 ""
Use at your own risk! It will ONLY work on OpenBSD!
FAQs
OpenBSD's pledge(2) extension for node.js
We found that node-pledge 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.
Product
Socket’s new Pull Request Stories give security teams clear visibility into dependency risks and outcomes across scanned pull requests.
Research
/Security News
npm author Qix’s account was compromised, with malicious versions of popular packages like chalk-template, color-convert, and strip-ansi published.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.