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.
@dashpilot/s3-json-db
Advanced tools
Use Amazon S3 as a simple JSON database and serverless API
S3 JSON DB is a simple file-based JSON database for Amazon S3. It allows you to insert, update, retrieve and delete entries. All entries are stored on S3 as objects in a single json file, so you can also easily retrieve them from a Single Page Application or any server-side rendered app (without needing this module). You can use it to quickly prototype a serverless app or backend for your SPA. Compatible with Amazon S3, Digitalocean Spaces, Linode Object Storage, BackBlaze B2, etc. https://www.npmjs.com/package/@dashpilot/s3-json-db
npm install @dashpilot/s3-json-db
const S3DB = require('s3-json-db');
const db = new S3DB(s3_key, s3_secret, s3_bucket, s3_prefix, s3_acl, s3_endpoint);
const table = 'entries';
let data = {
title: 'This is the first entry',
body: 'Lorem ipsum dolor site amet'
}
// insert
db.insert(table, data).then(id => {
console.log("created " + id);
});
// update
db.update(table, data, id).then(id => {
console.log("updated " + id);
});
// delete
db.delete(table, id).then(id => {
console.log("deleted " + id);
});
// get one entry by id
db.get(table, id).then(data => {
console.log(data);
});
// get all entries
db.get_all(table).then(data => {
console.log(data);
});
s3_key (required): your S3 API key
s3_secret (required): your S3 API secret
s3_bucket (required): your S3 bucket
s3_prefix (optional): optional file prefix or subfolder (for the latter end with a slash). default "";
s3_acl (optional): ACL (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#canned-acl). Default: "private", set to "public-read" if you want your data to be public (to use with a client-side app).
s3_endpoint (optional): change the endpoint if you use Digitalocean Spaces, Linode Object Storage, Backblaze B2, etc. Default: false.
To retrieve all entries client-side (set s3_acl to "public-read"):
{your_s3_url}/{bucket}/{s3_prefix}/{table}.json
Don't forget to press the :star: button to let me know I should continue improving this project.
FAQs
Use S3 as a simple json database and serverless API
The npm package @dashpilot/s3-json-db receives a total of 108 weekly downloads. As such, @dashpilot/s3-json-db popularity was classified as not popular.
We found that @dashpilot/s3-json-db 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.
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.