
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 minimal versioned field-based data packer for token-like use cases.
Light. Safe. Typed.
npm install qpacker
import { QPacker, QPackerError } from 'QPacker';
const fields = ['userId', 'username', 'role'];
const packer = new QPacker(fields);
try {
// 1. pack
const token = packer.pack({ userId: '123', username: 'alice', role: 'admin' });
console.log('Packed token:', token);
// 2. unpack
const data = packer.unpack(token);
console.log('Unpacked data:', data);
// 3. mutate token 中某字段
const newToken = packer.mutate(token, { role: 'superadmin' });
console.log('Mutated token:', newToken);
// 4. unpack token
const newData = packer.unpack(newToken);
console.log('Unpacked mutated data:', newData);
} catch (error) {
if (error instanceof QPackerError) {
console.error('QPacker error:', error.message);
} else {
console.error('Unexpected error:', error);
}
}
// 5. test error token
try {
packer.unpack('invalid.token.string');
} catch (error) {
if (error instanceof QPackerError) {
console.error('Expected QPacker error on invalid token:', error.message);
}
}
new QPacker(fields: string[]) - define field order
pack(data: Record<string, string>): string - pack object to token
unpack(token: string): Record<string, string> - unpack token to object
mutate(token: string, patch: Record<string, string>): string - update token fields
npm test
FAQs
A lightweight compact data packer/unpacker with base64url encoding
The npm package qpacker receives a total of 2 weekly downloads. As such, qpacker popularity was classified as not popular.
We found that qpacker 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.