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.
node-credstash
Advanced tools
Node.js port of credstash
As a command line tool:
npm install node-credstash -g
As a project dependency:
npm install node-credstash --save
Setup of the credtash table is on it's way, but for now we recommend using credstash, or building the table yourself.
Make sure you have some AWS credentials set up on your machine. There are a number of ways to do this, listed here.
Put
To store a value called super_secret
with a value abc123
, we'd do the following:
node-credstash put super_secret abc123
Get
To get the value of super_secret
:
node-credstash get super_secret
Options
You can pass two arguments to both commands:
--region
Your desired AWS region (this should be the same as your credstash table). Defaults to us-east-1
--table
Your credstash table name. Defaults to credential-store
Initialise
const Credstash = require('node-credstash');
const credstash = new Credstash('us-east-1', 'credential-store');
The constructor takes two arguments:
region
Your desired AWS region (this should be the same as your credstash table)table
Your credstash table namePut
credstash.put('super_secret', 'abc123', (err) => {
});
The arguments are:
key
The key's namevalue
This is the value to be encryptedcallback
A callback functionGet
You can either get one item:
credstash.get('super_secret', (err, value) => {
});
Or multiple:
credstash.getAll(['super_secret', 'more_secret'], (err, values) => {
// values.super_secret = abc123
// ...
});
The arguments are:
item(s)
Either a string for get
or an array of strings for getAll
callback
Callback functionFAQs
A node implementation of credstash
The npm package node-credstash receives a total of 91 weekly downloads. As such, node-credstash popularity was classified as not popular.
We found that node-credstash demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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.