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.
a fake s3 server for testing purposes.
This module uses s3rver
which does most of the heavy lifting.
The actual files uploaded to S3 are persisted to disk in
os.tmpdir()
var FakeS3 = require("fake-s3");
var server = new FakeS3({
port: 0,
buckets: ['my-bucket'],
prefix: 'files-i-care-about/'
})
// starts the server on specified port
server.bootstrap((err) => {
// handle err
// this field now exists and contains the actual hostPort
server.hostPort
})
// can wait for files
server.waitForFiles('my-bucket', 2, (err, files) => {
// will call you back when two files have been uploaded
})
// shutdown server
server.close()
var server = new FakeS3(options)
options.port
: the port to lsiten on, defaults to 0
options.hostname
: host to listen on, defaults to localhost
options.silent
: passed through to s3rver
, defaults to true
options.prefix
: prefix for getFiles()
and waitForFiles()
;
necessary to support multi part uploads, otherwise
waitForFiles()
will return too early when N parts have
been uploaded.options.buckets
: an array of buckets to create.server.hostPort
This is the hostPort
that the server is listening on, this
will be non-null after bootstrap()
finishes.
server.bootstrap(cb)
starts the server
getFiles(bucket, cb)
gets all files in a bucket
waitForFiles(bucket, count, cb)
this will wait for file uploads to finish and calls getFiles()
and returns them once it's finished.
This is useful if your application does background uploads and you want to be notified when they are finished.
server.close()
closes the HTTP server.
npm install fake-s3
npm test
FAQs
a fake s3 server for testing purposes
We found that fake-s3 demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 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.