
Research
wget to Wipeout: Malicious Go Modules Fetch Destructive Payload
Socket's research uncovers three dangerous Go modules that contain obfuscated disk-wiping malware, threatening complete data loss.
npm-registry-mock
Advanced tools
#npm-registry-mock
##Usage
Currently mocked packages are underscore
at 1.3.1 and 1.5.1 while version 1.5.1 is the latest in this mocked registry.
Installing underscore 1.3.1:
var mr = require("npm-registry-mock")
mr(1331, function (s) {
npm.load({registry: "http://localhost:1331"}, function () {
npm.commands.install("/tmp", "underscore@1.3.1", function (err) {
// assert npm behaves right...
s.close() // shutdown server
})
})
})
Defining custom mock routes:
var mr = require("npm-registry-mock")
var customMocks = {
"get": {
"/mypackage": [500, {"ente" : true}]
}
}
mr({port: 1331, mocks: customMocks}, function (s) {
npm.load({registry: "http://localhost:1331"}, function () {
npm.commands.install("/tmp", "mypackage", function (err) {
// assert npm behaves right with an 500 error as response...
s.close() // shutdown server
})
})
})
##Todo
extending the routes with the custom ones, no complete overrides
add more use-cases
FAQs
mock the npm registry
The npm package npm-registry-mock receives a total of 21,452 weekly downloads. As such, npm-registry-mock popularity was classified as popular.
We found that npm-registry-mock demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 6 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
Socket's research uncovers three dangerous Go modules that contain obfuscated disk-wiping malware, threatening complete data loss.
Research
Socket uncovers malicious packages on PyPI using Gmail's SMTP protocol for command and control (C2) to exfiltrate data and execute commands.
Product
We redesigned Socket's first logged-in page to display rich and insightful visualizations about your repositories protected against supply chain threats.