@zapier/secret-scrubber 1.0.8 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/lib/convenience.js +1 -0
- package/lib/utils.js +5 -2
- package/package.json +3 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
## 1.1.1
|
|
2
|
+
|
|
3
|
+
_release `2024-05-08`_
|
|
4
|
+
|
|
5
|
+
- add `set-cookie` to sensitive substrings ([!14](https://gitlab.com/zapier/team-developer-platform/secret-scrubber-js/-/merge_requests/14))
|
|
6
|
+
|
|
7
|
+
## 1.1.0
|
|
8
|
+
|
|
9
|
+
_released `2024-02-01`_
|
|
10
|
+
|
|
11
|
+
- replace dependency on `crypto/createHash` to reduce upstream bundle sizes for browsers ([!13](https://gitlab.com/zapier/team-developer-platform/secret-scrubber-js/-/merge_requests/13))
|
|
12
|
+
|
|
1
13
|
## 1.0.8
|
|
2
14
|
|
|
3
15
|
_released `2023-10-25`_
|
package/lib/convenience.js
CHANGED
package/lib/utils.js
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.replaceAll = exports.recurseExtract = exports.recurseReplace = exports.makeSensitiveBank = exports.censor = exports.base64 = exports.hash = exports.isLongEnoughToBeSecret = void 0;
|
|
4
|
-
const
|
|
7
|
+
const create_hash_1 = __importDefault(require("create-hash"));
|
|
5
8
|
const isPlainObject = require("lodash.isplainobject");
|
|
6
9
|
const MIN_SECRET_SIZE = 6;
|
|
7
10
|
const isLongEnoughToBeSecret = (s) => s.length >= MIN_SECRET_SIZE;
|
|
8
11
|
exports.isLongEnoughToBeSecret = isLongEnoughToBeSecret;
|
|
9
|
-
const hash = (input) => (0,
|
|
12
|
+
const hash = (input) => (0, create_hash_1.default)('sha256').update(input, 'binary').digest('hex');
|
|
10
13
|
exports.hash = hash;
|
|
11
14
|
const base64 = (val) => {
|
|
12
15
|
try {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zapier/secret-scrubber",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"description": "Confidently remove secrets and sensitive values from unstructured objects.",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"typings": "lib/index.d.ts",
|
|
@@ -40,6 +40,7 @@
|
|
|
40
40
|
"singleQuote": true
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
+
"@types/create-hash": "^1.2.6",
|
|
43
44
|
"@types/jest": "26.0.23",
|
|
44
45
|
"@types/lodash.isplainobject": "^4.0.6",
|
|
45
46
|
"@types/node": "~16",
|
|
@@ -62,6 +63,7 @@
|
|
|
62
63
|
"typescript": "~4.4"
|
|
63
64
|
},
|
|
64
65
|
"dependencies": {
|
|
66
|
+
"create-hash": "^1.2.0",
|
|
65
67
|
"lodash.isplainobject": "^4.0.6"
|
|
66
68
|
}
|
|
67
69
|
}
|