
Company News
Free Business Plan Upgrades for Open Source Maintainers
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.
@varlock/keeper-plugin
Advanced tools
Varlock plugin to load secrets from Keeper Security vaults via the Secrets Manager SDK
This package is a Varlock plugin that enables loading secrets from Keeper Security vaults via the Keeper Secrets Manager SDK.
# npm
npm install @varlock/keeper-plugin
# pnpm
pnpm add @varlock/keeper-plugin
# yarn
yarn add @varlock/keeper-plugin
# bun
bun add @varlock/keeper-plugin
You need a Keeper Secrets Manager application set up in your Keeper vault:
pip install keeper-secrets-manager-cli
ksm profile init <one-time-token>
ksm profile export --format json | base64
KSM_CONFIG environment variable# @plugin(@varlock/keeper-plugin)
# @initKeeper(token=$KSM_CONFIG)
# ---
# @type=keeperSmToken @sensitive @internal
KSM_CONFIG=
# @plugin(@varlock/keeper-plugin)
# @initKeeper(token=$KSM_CONFIG_PROD, id=prod)
# @initKeeper(token=$KSM_CONFIG_DEV, id=dev)
# ---
# @type=keeperSmToken @sensitive @internal
KSM_CONFIG_PROD=
# @type=keeperSmToken @sensitive @internal
KSM_CONFIG_DEV=
# fetches the "password" field from the record
DB_PASSWORD=keeper("XXXXXXXXXXXXXXXXXXXX")
# fetch the "login" standard field
DB_USER=keeper("XXXXXXXXXXXXXXXXXXXX#login")
# fetch a custom field by label
API_KEY=keeper("XXXXXXXXXXXXXXXXXXXX#API_KEY")
# or use the named field parameter
DB_HOST=keeper("XXXXXXXXXXXXXXXXXXXX", field="host")
The plugin supports Keeper's notation syntax for more advanced access patterns:
# standard field by type
DB_PASS=keeper("XXXX/field/password")
# standard field by label
DB_LOGIN=keeper("XXXX/field/login")
# custom field by label
MY_SECRET=keeper("XXXX/custom_field/MySecretLabel")
# by record title instead of UID
API_KEY=keeper("My API Keys/field/password")
# first arg is instance id, second is the secret reference
PROD_SECRET=keeper(prod, "XXXX/field/password")
DEV_SECRET=keeper(dev, "YYYY#password")
@initKeeper()Initialize a Keeper Secrets Manager plugin instance.
| Parameter | Type | Required | Description |
|---|---|---|---|
token | string | yes | Base64-encoded Secrets Manager config (typically from $KSM_CONFIG) |
cacheTtl | string | number | no | Cache resolved values from keeper() for the provided TTL ("5m", "1h", "1d", or "forever" to cache until manually cleared); set to false (or an empty string) to disable caching |
id | string | no | Instance identifier for multiple configurations (defaults to _default) |
keeperSmTokenA sensitive string type for Keeper Secrets Manager configuration tokens. Validates that the value is a valid base64-encoded JSON string.
keeper(reference) / keeper(instanceId, reference)Fetch a single secret field from Keeper.
Arguments:
| Position | Type | Required | Description |
|---|---|---|---|
| 1 | string | yes (if no instanceId) | Secret reference (see formats below) |
| 1, 2 | string, string | for named instances | Instance ID, then secret reference |
Named parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
field | string | no | Explicit field type/label to extract |
Reference formats:
| Format | Description | Example |
|---|---|---|
<uid> | Record UID (defaults to password field) | keeper("XXXX") |
<uid>#<field> | Record UID with field selector | keeper("XXXX#login") |
<uid>/field/<type> | Keeper notation (standard field) | keeper("XXXX/field/password") |
<uid>/custom_field/<label> | Keeper notation (custom field) | keeper("XXXX/custom_field/API_KEY") |
<title>/field/<type> | Keeper notation (by title) | keeper("My Record/field/password") |
# Install the KSM CLI
pip install keeper-secrets-manager-cli
# Initialize with the one-time token
ksm profile init <one-time-token>
# Export as base64 for use as an env var
ksm profile export --format json | base64
# @plugin(@varlock/keeper-plugin)
# @initKeeper(token=$KSM_CONFIG)
# ---
# @type=keeperSmToken @sensitive @internal
KSM_CONFIG=
# Your secrets
DB_PASSWORD=keeper("your-record-uid/field/password")
API_KEY=keeper("your-record-uid/custom_field/api_key")
The KSM_CONFIG value must be a valid base64-encoded JSON string. Regenerate it:
ksm profile export --format json | base64
keeper("uid/field/password")keeper("uid/custom_field/My Label")login, password, url, oneTimeCode, noteFAQs
Varlock plugin to load secrets from Keeper Security vaults via the Secrets Manager SDK
We found that @varlock/keeper-plugin demonstrated a healthy version release cadence and project activity because the last version was released less than 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.

Company News
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.

Security News
The supply chain control that delays freshly published gems now covers lockfile generation and gem vendoring in Ruby projects.

Security News
During a UK cyber test, a Mythos 5 agent used sockpuppets, social engineering, and prompt injection to try to get a maintainer to merge malware.