New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@aspecto/privacy-rules

Package Overview
Dependencies
Maintainers
3
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aspecto/privacy-rules - npm Package Compare versions

Comparing version 0.0.4 to 0.0.5

dist/scrambler.d.ts

4

dist/actions.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const scrumbler_1 = require("./scrumbler");
const scrambler_1 = require("./scrambler");
const ActionResult_1 = require("./ActionResult");

@@ -31,3 +31,3 @@ const FIELD_BLOCKED = '__aspecto_field_blocked__';

case 'scramble-field':
obj[key] = scrumbler_1.scramble(value);
obj[key] = scrambler_1.scramble(value);
break;

@@ -34,0 +34,0 @@ case 'block-field':

{
"name": "@aspecto/privacy-rules",
"version": "0.0.4",
"version": "0.0.5",
"description": "Aspecto Privacy Rules Engine",

@@ -5,0 +5,0 @@ "main": "./dist/index.js",

@@ -123,2 +123,17 @@ import { PrivacyEngine } from '../src';

});
it('should scramble Authentication body prop', function() {
const privacyEngine = new PrivacyEngine();
const rules: any[] = [scrambleFieldRule];
privacyEngine.setRules(rules);
const result = privacyEngine.executeRules(authMessage);
expect(result).toBe(ActionResult.None);
expect(authMessage.HTTP_REQUEST.body.Authentication.token).toBe('xxxxxxxxx');
expect(authMessage.HTTP_REQUEST.body.Authentication.nested.numberVal).toBe(11.11);
expect(authMessage.HTTP_REQUEST.body.Authentication.nested.stringVal).toBe('xxxx xxxxxx');
expect(authMessage.HTTP_REQUEST.body.Authentication.nested.symbolVal).toBe('xxxxxx(xxxx xxxxxx)');
expect(authMessage.HTTP_REQUEST.body.Authentication.nested.boolVal).toBe(true);
expect(authMessage.HTTP_REQUEST.body.Authentication.nested.nullVal).toBe(null);
});
});

@@ -125,0 +140,0 @@

@@ -9,4 +9,22 @@ import { AspectoMessage } from '../src/types/AspectoMessage';

fullUrl: 'https://auth-service.com/users/auth?Authentication=token&param1=notprivate#some/route',
body: { user: 'daniel', password: 'craig' },
requestBody: { user: 'daniel', password: 'craig' },
body: {
user: 'daniel',
password: 'craig',
Authentication: {
token: 'someToken',
nested: {
boolVal: true,
dateVal: new Date('10/10/2010'),
numberVal: 99.99,
stringVal: 'some string',
nullVal: null,
undVal: undefined,
symbolVal: Symbol('test symbol'),
},
},
},
requestBody: {
user: 'daniel',
password: 'craig',
},
query: {

@@ -13,0 +31,0 @@ Authentication: 'token',

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc