
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.
IndexedDB-backed envelope storage for AES-GCM payloads in browsers and workers.
IndexedDB-backed envelope storage for browsers and workers. Store AES-GCM envelopes (12-byte IV + ciphertext ArrayBuffer) by base64url identifier and read them back directly. The store is shared per origin across tabs and workers.
put/get/has/delete API for encrypted payload envelopes.npm install offdex
# or
pnpm add offdex
# or
yarn add offdex
import storage from "offdex";
const makeId = () => {
const bytes = crypto.getRandomValues(new Uint8Array(32));
let binary = "";
for (let i = 0; i < bytes.length; i += 1) {
binary += String.fromCharCode(bytes[i]);
}
return btoa(binary)
.replace(/\+/g, "-")
.replace(/\//g, "_")
.replace(/=+$/, "");
};
const envelope = {
iv: crypto.getRandomValues(new Uint8Array(12)),
ciphertext: new Uint8Array([1, 2, 3]).buffer,
};
const key = makeId();
await storage.put(key, envelope);
const stored = await storage.get(key);
if (stored) {
console.log(stored.iv, stored.ciphertext);
}
await storage.delete(key);
storage (default export)Singleton storage instance per JavaScript realm backed by the offdex database
and envelopes object store. The underlying store is shared per origin across
tabs and workers.
put(key, envelope) -> Promise<void>get(key) -> Promise<OffdexEnvelope | null>has(key) -> Promise<boolean>delete(key) -> Promise<void>destroy() -> Promise<void>key must be a base64url string, exactly 43 chars (32 random bytes, no
padding).put/get/has/delete throw a TypeError if the identifier is invalid.envelope must be an object with:
iv: Uint8Array exactly 12 bytes (AES-GCM nonce).ciphertext: non-empty ArrayBuffer.put throws a TypeError if the envelope is invalid.npm run build
npx playwright install
npm test
Unit, integration, and end-to-end runs are available as well:
npm run test:unit
npm run test:integration
npm run test:e2e
Playwright runs Chromium, Firefox, WebKit, plus mobile emulation projects for integration and end-to-end coverage.
npx playwright install
npm run bench
The benchmark runs in Chromium via Playwright and times a batch of envelope
put/has/get/delete operations.
[bench] put 200 envelopes: 148.6ms
[bench] has 200 envelopes: 101.6ms
[bench] get 200 envelopes: 100.3ms
[bench] delete 200 envelopes: 123.8ms
npm run build, open in-browser-testing.html, then use storage from
the console with envelope values.indexedDB (modern browsers / worker runtimes).FAQs
IndexedDB-backed envelope storage for AES-GCM payloads in browsers and workers.
We found that offdex 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.