Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

amplify-cli-logger

Package Overview
Dependencies
Maintainers
3
Versions
83
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

amplify-cli-logger - npm Package Compare versions

Comparing version 1.2.2 to 1.2.3-lazyload-no-graphql15.0

16

CHANGELOG.md

@@ -6,2 +6,18 @@ # Change Log

## [1.2.3-lazyload-no-graphql15.0](https://github.com/aws-amplify/amplify-cli/compare/amplify-cli-logger@1.2.2...amplify-cli-logger@1.2.3-lazyload-no-graphql15.0) (2023-01-25)
### Bug Fixes
* update redactor scanning logic ([#11622](https://github.com/aws-amplify/amplify-cli/issues/11622)) ([c7bb7cc](https://github.com/aws-amplify/amplify-cli/commit/c7bb7cca89662019b6d5dfd789d08945d64d2fb0))
### Reverts
* Revert "chore: fixing main to dev merge conflicts (#11696)" ([00fec46](https://github.com/aws-amplify/amplify-cli/commit/00fec4608096390b5ae2563b5c69453cd48bfa45)), closes [#11696](https://github.com/aws-amplify/amplify-cli/issues/11696)
## [1.2.2](https://github.com/aws-amplify/amplify-cli/compare/amplify-cli-logger@1.2.1...amplify-cli-logger@1.2.2) (2023-01-03)

@@ -8,0 +24,0 @@

2

lib/Redactor.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.stringMasker = exports.Redactor = void 0;
const containsToRedact = ['key', 'id', 'password', 'name', 'arn', 'address', 'app', 'bucket', 'token'];
const containsToRedact = ['key', 'id', 'password', 'name', 'arn', 'address', 'app', 'bucket', 'token', 'secret'];
const quotes = '\\\\?"';

@@ -6,0 +6,0 @@ const keyMatcher = `\\w*?(${containsToRedact.join('|')})\\w*?`;

{
"name": "amplify-cli-logger",
"version": "1.2.2",
"version": "1.2.3-lazyload-no-graphql15.0",
"description": "Amplify CLI Logger",

@@ -47,3 +47,3 @@ "main": "lib/index.js",

},
"gitHead": "dea54cd4bc5745ba7645808964d29f5a395fe6f7"
"gitHead": "4d58b3ca509e522fe90c13344a5ec40a6993dd30"
}

@@ -1,3 +0,3 @@

import _ from 'lodash';
import { Redactor } from '../Redactor';
describe('input-redaction', () => {

@@ -9,7 +9,24 @@ const input = {

SMS: { Enabled: true },
Email: { Enabled: true, FromAddress: 'xxx@amzon.com', Identity: 'identityArn', RoleArn: 'roleArn' },
APNS: { Enabled: true, DefaultAuthenticationMethod: 'Certificate', P12FilePath: 'p12filePath', Password: 'p12FilePasswordIfAny' },
Email: {
Enabled: true,
// eslint-disable-next-line spellcheck/spell-checker
FromAddress: 'xxx@amzon.com',
Identity: 'identityArn',
RoleArn: 'roleArn',
},
APNS: {
Enabled: true,
DefaultAuthenticationMethod: 'Certificate',
P12FilePath: 'p12filePath',
Password: 'p12FilePasswordIfAny',
},
// eslint-disable-next-line spellcheck/spell-checker
FCM: { Enabled: true, ApiKey: 'fcmapikey' },
},
},
auth: {
resourceName: {
hostedUIProviderCreds: '"ProviderName":"Facebook","client_id":"facebookClientIdTest","client_secret":"facebookClientSecretTest"',
},
},
},

@@ -21,5 +38,4 @@ };

const redactedInput = JSON.parse(redactedInputString);
const path = ['categories', 'notifications', 'Pinpoint'];
const redactedPinpoint = _.get(redactedInput, path);
const originalPinpoint = _.get(input, path);
const redactedPinpoint = redactedInput.categories.notifications.Pinpoint;
const originalPinpoint = input.categories.notifications.Pinpoint;
expect(redactedPinpoint.APNS.Password).not.toEqual(originalPinpoint.APNS.Password);

@@ -30,3 +46,8 @@ expect(redactedPinpoint.Email.FromAddress).not.toEqual(originalPinpoint.Email.FromAddress);

expect(redactedPinpoint.FCM.ApiKey).not.toEqual(originalPinpoint.FCM.ApiKey);
const redactedAuth = redactedInput.categories.auth.resourceName;
expect(redactedAuth.hostedUIProviderCreds).toMatchInlineSnapshot(
`"\\"ProviderName\\":\\"[***]book\\",\\"client_id\\":\\"[***]ntIdTest\\",\\"client_secret\\":\\"[***]SecretTest\\""`,
);
});
});

@@ -1,2 +0,2 @@

const containsToRedact = ['key', 'id', 'password', 'name', 'arn', 'address', 'app', 'bucket', 'token'];
const containsToRedact = ['key', 'id', 'password', 'name', 'arn', 'address', 'app', 'bucket', 'token', 'secret'];
const quotes = '\\\\?"';

@@ -28,2 +28,3 @@ const keyMatcher = `\\w*?(${containsToRedact.join('|')})\\w*?`;

// replace value using string Masker
// eslint-disable-next-line no-param-reassign
arg = arg?.replace(val, stringMasker);

@@ -30,0 +31,0 @@ });

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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