Skip to content

Commit 5eb2698

Browse files
authored
Remove sensitive data logging (#40)
* Remove sensitive data logging
1 parent 5c5e0bc commit 5eb2698

File tree

4 files changed

+7
-4
lines changed

4 files changed

+7
-4
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## 1.2.4 (Sept 29, 2020)
2+
* Remove potentially sensitive data from logs
3+
14
## 1.2.3 (Sept 11, 2020)
25
* Bump dependencies
36
* Don't log entire incoming message at info level

lib/helper/request.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ exports.putOrPost = function putOrPost(method, msg, conf) {
77
const { uri } = conf;
88
const { body } = msg;
99

10-
this.logger.info('Request body: %j', body);
10+
this.logger.trace('Request body: %j', body);
1111

1212
const requestSettings = buildRequestSettings(method, uri, conf.secret);
1313
requestSettings.body = JSON.stringify(body);

lib/triggers/receive.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ exports.process = async function receive(msg) {
2222
if (msg.additionalUrlPath) {
2323
msg.body._additionalUrlPath = msg.additionalUrlPath;
2424
}
25-
2625
}
2726

28-
this.logger.info('Emitting data of message: ', msgId);
27+
this.logger.info('Emitting data of message');
28+
this.logger.trace('Emitting data of message: ', msgId);
2929
await this.emit('data', msg);
3030
this.logger.info('Data emitted');
3131
};

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "webhook",
3-
"version": "1.2.3",
3+
"version": "1.2.4",
44
"description": "elastic.io webhook component",
55
"scripts": {
66
"pretest": "eslint spec lib verifyCredentials.js --fix",

0 commit comments

Comments
 (0)