
Research
2025 Report: Destructive Malware in Open Source Packages
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.
@aspecto/privacy-rules
Advanced tools
Privacy rules allow to specify which requests or fields need to be blocked or scrambled. Rules are described in a JSON with a certain structure and can be executed by PrivacyEngine.
// specify some rules
const blockRule: PrivacyRuleDef = {
conditions: [{ conditionType: 'always' }],
actions: [{ actionType: 'block-request' }],
};
const scrambleFieldRule: PrivacyRuleDef = {
conditions: [{ conditionType: 'route', conditionData: { filterType: 'by-value', filterValue: '/users/' } }],
actions: [
{
actionType: 'scramble-field',
actionData: {
fieldTypes: ['header', 'body-json', 'query-param'],
filter: { filterType: 'by-key', filterValue: 'Authentication' },
},
},
{
actionType: 'scramble-field',
actionData: {
fieldTypes: ['header', 'body-json', 'query-param'],
filter: { filterType: 'by-key', filterValue: 'Bearer' },
},
},
],
};
const blockFieldRule: PrivacyRuleDef = {
conditions: [{ conditionType: 'service', conditionData: { filterType: 'by-value', filterValue: 'user-service' } }],
actions: [
{
actionType: 'block-field',
actionData: {
fieldTypes: ['header', 'body-json', 'query-param'],
filter: { filterType: 'by-key', filterValue: 'Authentication' },
},
},
{
actionType: 'block-field',
actionData: {
fieldTypes: ['header', 'body-json', 'query-param'],
filter: { filterType: 'by-key', filterValue: 'Bearer' },
},
},
],
};
// example message (http request-response)
export const sampleMessage: AspectoMessage = {
packageName: 'user-service',
HTTP_REQUEST: {
route: { path: '/users/' },
body: { user: 'daniel', password: 'craig' },
query: {
auth: 'token',
param1: 'notprivate',
},
requestHeaders: {
Bearer: 'req-token',
},
responseHeaders: {
Authentication: 'resp-token',
},
},
};
// create an instance of the engine, set rules and execute them
const privacyEngine = new PrivacyEngine();
const rules: any[] = [blockRule, blockFieldRule, scrambleFieldRule];
privacyEngine.setRules(rules);
// this will mutate the message, blocking or scrambling certain fields
const result = privacyEngine.executeRules(sampleMessage);
FAQs
Aspecto Privacy Rules Engine
We found that @aspecto/privacy-rules demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 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.

Research
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.

Security News
Socket CTO Ahmad Nassri shares practical AI coding techniques, tools, and team workflows, plus what still feels noisy and why shipping remains human-led.

Research
/Security News
A five-month operation turned 27 npm packages into durable hosting for browser-run lures that mimic document-sharing portals and Microsoft sign-in, targeting 25 organizations across manufacturing, industrial automation, plastics, and healthcare for credential theft.