Skip to content

Commit

Permalink
Merge pull request #621 from JupiterOne/remove-chars-masked-field
Browse files Browse the repository at this point in the history
Remove chars masked field
  • Loading branch information
ceelias authored Feb 15, 2022
2 parents eeff93e + f327ebc commit cf35d92
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ and this project adheres to

## Unreleased

### Fixed

- Changed logger to fully mask config field values, rather than displaying last
4 chars

### Added

- Added optional `schema` property to `StepGraphObjectMetadata`. This allows
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ describe('createIntegrationLogger', () => {
}),
).toEqual({
anything: '***',
masked: '****cret',
masked: '***',
unmasked: 'this is clear',
});
});
Expand Down
4 changes: 1 addition & 3 deletions packages/integration-sdk-runtime/src/logger/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,7 @@ function createInstanceConfigSerializer<
for (const k of Object.keys(config)) {
const field = fields && fields[k];
if (field) {
serialized[k] = field.mask
? `****${config[k].substr(-4)}`
: config[k];
serialized[k] = field.mask ? '***' : config[k];
} else {
serialized[k] = '***';
}
Expand Down

0 comments on commit cf35d92

Please sign in to comment.