
Security News
Feross on the 10 Minutes or Less Podcast: Nobody Reads the Code
Socket CEO Feross Aboukhadijeh joins 10 Minutes or Less, a podcast by Ali Rohde, to discuss the recent surge in open source supply chain attacks.
node-credstasher
Advanced tools
A TypeScript implementation of credstash for storing and retrieving secrets using AWS KMS and DynamoDB.
A TypeScript implementation of the python credstash for storing and retrieving secrets using AWS KMS and DynamoDB.
This code is based on the now defunct node-credstash library, but has been updated to TypeScript with up-to-date dependencies.
Before using credstasher, you need to:
You can install globally using the node package manager of your choice:
npm install -g node-credstasher
# or
pnpm add -g node-credstasher
# or
bun add -g node-credstasher
After it is installed, you should be able to run the following to show the docs:
credstasher --help
Yuu can also run using npx, pnpx, etc. downloading it to run on the fly. This is kind of nice.
npx node-credstasher@latest --help
# or
pnpx node-credstasher@latest --help
# or
bunx node-credstasher@latest --help
⚠️ I don't recommend using this. Set up your table in a more managed way, probably. But, you can do it this way if you like.
credstasher setup
credstasher put my-password "supersecret123"
credstasher get my-password
credstasher list
credstasher delete mypassword
Global options:
-r, --region <region>: AWS region (default: us-east-1)-t, --table <table>: DynamoDB table name (default: credential-store)-k, --kms-key-id <keyId>: KMS key ID or alias (default: alias/credstash)-p, --profile <profile>: AWS profile (default: default)-d, --dynamodb-endpoint <endpoint>: Custom endpoint URL for DynamoDB-e, --kms-endpoint <endpoint>: Custom KMS endpoint URLCommand-specific options:
put:
-v, --key-version <version>: Specific version number-c, --context <context>: Encryption context as JSON string-a, --autoversion: Automatically increment versionget:
-v, --key-version <version>: Specific version number-c, --context <context>: Encryption context as JSON string-n, --noline: Don't append newline to outputdelete:
-v, --key-version <version>: Specific version number-a, --all: Delete all versionsInstall with your favorite package manager:
npm install node-credstasher
# or
pnpm add node-credstasher
# or
bun add node-credstasher
import { CredstashClient } from 'node-credstasher';
const client = new CredstashClient({
region: 'us-east-1',
table: 'my-secrets',
kmsKeyId: 'alias/my-key'
});
// Store a secret
await client.putSecret('database-password', 'my-secret-password');
// Retrieve a secret
const password = await client.getSecret('database-password');
// List all secrets
const secrets = await client.listSecrets();
// Delete a secret
await client.deleteSecret('database-password');
The CredstashClient accepts the following configuration options:
region: AWS region (defaults to AWS_REGION env var or 'us-east-1')kmsRegion: AWS region for KMS, defaults to region value.table: DynamoDB table name (defaults to CREDSTASH_TABLE env var or 'credential-store')kmsKeyId: KMS key ID or alias (defaults to CREDSTASH_KMS_KEY_ID env var or 'alias/credstash')profile: AWS profile (defaults to AWS_PROFILE env var or 'default')dynamodbEndpoint: Custom endpoint URL for dynamodbkmsEndpoint: Custom endpoint URL for KMSAWS_REGION: Default AWS regionKMS_REGION: Default AWS region for KMSCREDSTASH_TABLE: Default DynamoDB table nameCREDSTASH_KMS_KEY_ID: Default KMS key IDAWS_PROFILE: Default AWS profileDYNAMODB_ENDPOINT: Custom endpoint URL for dynamodbKMS_ENDPOINT: Custom endpoint URL for KMSbun run build
bun run format
bun run lint
bun run check
See LOCAL_TESTING.md.
MIT
This project was created using bun init in bun v1.2.7. Bun is a fast all-in-one JavaScript runtime.
FAQs
A TypeScript implementation of credstash for storing and retrieving secrets using AWS KMS and DynamoDB.
The npm package node-credstasher receives a total of 29,505 weekly downloads. As such, node-credstasher popularity was classified as popular.
We found that node-credstasher demonstrated a healthy version release cadence and project activity because the last version was released less than 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.

Security News
Socket CEO Feross Aboukhadijeh joins 10 Minutes or Less, a podcast by Ali Rohde, to discuss the recent surge in open source supply chain attacks.

Research
/Security News
Campaign of 108 extensions harvests identities, steals sessions, and adds backdoors to browsers, all tied to the same C2 infrastructure.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.