Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
@1password/sdk
Advanced tools
The 1Password JavaScript SDK offers programmatic read access to your secrets in 1Password in an interface native to JavaScript. The SDK currently supports `Node.JS`
To use the 1Password JavaScript SDK in your project:
Create a service account and give it the appropriate permissions in the vaults where the items you want to use with the SDK are saved.
Provision your service account token. We recommend provisioning your token from the environment. For example, to export your token to the OP_SERVICE_ACCOUNT_TOKEN
environment variable:
macOS or Linux
export OP_SERVICE_ACCOUNT_TOKEN=<your-service-account-token>
Windows
$Env:OP_SERVICE_ACCOUNT_TOKEN = "<your-service-account-token>"
Install the 1Password JavaScript SDK in your project:
## NPM
npm install @1password/sdk
## PNPM
pnpm add @1password/sdk
## Yarn
yarn add @1password/sdk
Use the JavaScript SDK in your project:
import { createClient } from "@1password/sdk";
// Creates an authenticated client.
const client = await createClient({
auth: process.env.OP_SERVICE_ACCOUNT_TOKEN,
// Set the following to your own integration name and version.
integrationName: "My 1Password Integration",
integrationVersion: "v1.0.0",
});
// Fetches a secret.
const secret = await client.secrets.resolve("op://vault/item/field");
Make sure to use secret reference URIs with the syntax op://vault/item/field
to securely load secrets from 1Password into your code.
Inside createClient()
, set integrationName
to the name of your application and integrationVersion
to the version of your application.
1Password SDKs are in active development. We're keen to hear what you'd like to see next. Let us know by upvoting or filing an issue.
Operations:
Field types:
FAQs
The 1Password JavaScript SDK offers programmatic read access to your secrets in 1Password in an interface native to JavaScript. The SDK currently supports `Node.JS`
The npm package @1password/sdk receives a total of 12,486 weekly downloads. As such, @1password/sdk popularity was classified as popular.
We found that @1password/sdk demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.