
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
A tiny NPM package providing a minimal Consul KV store client.
const Consul = require('consul-kv');
const consul = new Consul({
host: 'my-consul.com', // required
token: 'my-acl-token', // optional
tlsCert: '<your-cert>', // optional
tlsKey: '<your-cert-key>', // optional
ca: '<your-ca-cert>', // optional
port: '8500', // optional; defaults to '8500'
protocol: 'https', // optional; defaults to 'https'
});
Create or update a key:
const resp = await consul.set('my/key', 'my-key-value');
Read a key:
const result = await consul.get('my/key');
console.log(result.value); // the key's value; undefined if it doesn't exist
console.log(result.responseStatus); // the HTTP status code of the Consul response
console.log(result.responseBody); // the HTTP body of the Consul response
Read a the full subtree below a key (this adds a ?recurse query to the request, per Consul documentation):
const result = await consul.get('my/key', { recurse: true });
console.log(result); // the entire 'my/key' subtree
console.log(result.responseStatus); // the HTTP status code of the Consul response
console.log(result.responseBody); // the HTTP body of the Consul response
Delete a key:
const resp = await consul.delete('my/key');
Bonus: issue your own requests & get the raw response:
const resp = await consul.request({
key: 'my/key',
body: 'my-value-or-optional-request-body',
method: 'put'
});
Install dependencies & run unit tests:
npm install
npm test
Run end-to-end tests against a local Consul using docker-compose:
docker compose up --detach
npm run test:e2e
FAQs
A micro library to get, set, and delete Consul K/V
The npm package consul-kv receives a total of 31 weekly downloads. As such, consul-kv popularity was classified as not popular.
We found that consul-kv 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
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.