Security News
38% of CISOs Fear They’re Not Moving Fast Enough on AI
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
@liflig/load-secrets
Advanced tools
Library for loading secrets into AWS Secrets Mananager from a configuration file.
$ npm install @liflig/load-secrets
Create a script in your project for loading project secrets into AWS Secrets Manager.
Example: load-secrets-demo-service.ts
// 1. Import the library
import { loadSecrets } from "@capraconsulting/load-secrets";
// 2. Define the secrets
const demoServiceApiKey: loadSecrets.Secret = {
name: "demo-service-api-key",
description: "API key for the demo service",
type: "string"
}
// 3. Assign the secrets to SecretGroups (collections of associations between secrets and accounts)
const secretGroups: loadSecrets.SecretGroup[] = [
{
accountId: "123412341234",
region: "eu-west-1",
description: "dev",
namePrefix: "/dev/demo-svc/",
secrets: [demoServiceApiKey]
},
{
accountId: "234523452345",
region: "eu-west-1",
description: "staging",
namePrefix: "/staging/demo-svc/",
secrets: [demoServiceApiKey]
}
];
// 4. Load the secrets into AWS Secrets Manager
loadSecrets.loadSecretsCli({ secretGroups })
Example: aws-vault exec team-squirrel-demo-service
Say, for example, that this command assumes AWS Account 123412341234.
$ ./load-secrets-demo-service.ts
info Checking account for current credentials
info If any error is given, make sure you have valid credentials active
info Running for account 123412341234
Select secret to write:
dev (prefix: /dev/demo-svc/)
(0) demo-service-api-key (not yet created)
Enter index (or enter to quit): 0
Secret: /dev/demo-svc/demo-service-api-key
The secret does not already exist and will be created
Enter value (Ctrl+C to abort): test
Storing secret value:
test
Secret stored:
ARN: arn:aws:secretsmanager:eu-west-1:123412341234:secret:/dev/demo-svc/demo-service-api-key-UIqJ8N
Version: bdbf33c1-eda8-4aa1-b744-7c2006eae338
Select secret to write:
dev (prefix: /dev/demo-svc/)
0) test-secret-delete-me (last changed 2024-12-03T13:50:44.237Z)
Enter index (or enter to quit):
FAQs
Library for loading project secrets into AWS Secrets Manager
The npm package @liflig/load-secrets receives a total of 1,691 weekly downloads. As such, @liflig/load-secrets popularity was classified as popular.
We found that @liflig/load-secrets demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 5 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.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.
Security News
Company News
Socket is joining TC54 to help develop standards for software supply chain security, contributing to the evolution of SBOMs, CycloneDX, and Package URL specifications.