
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
@ovotech/berglas-node
Advanced tools
Node library to interact with Berglas-managed secrets in Google Cloud Platform.
yarn add @ovotech/berglas-node
Currently, Berglas only supports the Go runtime on Cloud Functions. With this library, one is able to use Berglas secrets while running NodeJS functions on Cloud Functions.
The library has two main functions: resolve and substitute.
resolve retrieves and deciphers a single Berglas secret.
substitute replaces environment variables values beginning with the Berglas prefix (berglas://) in the process with their resolved values.
// index.js
import { resolve } from "@ovotech/berglas-node";
let mySecret;
async function funcThatNeedsSecret() {
if (!mySecret) {
mySecret = await resolve(PROJECT_ID, "secrets-bucket/mySecret");
}
// Use deciphered secret value;
}
funcThatNeedsSecret();
// index.js
// Before:
// process.env.FOO=berglas://secrets-bucket/foo
import { substitute } from "@ovotech/berglas-node";
async function main() {
await substitute();
// Run application, pulling secrets from environvment vars
// After: process.env.FOO=bar
}
main();
This is a very simplistic library to get basic Berglas functionality working in environvments like NodeJS on Cloud Functions. However, there is always room for improvement. Some ideas so far:
substitute could run immediately upon import and make integration with applications more seamless (and we don't have to wait for top-level await!)If you have any ideas or feature requests, please open an issue!
This library is licensed under the MIT license. Do what you want!
FAQs
Node library for decrypting Berglas secrets
The npm package @ovotech/berglas-node receives a total of 4 weekly downloads. As such, @ovotech/berglas-node popularity was classified as not popular.
We found that @ovotech/berglas-node demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 321 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
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.