@zapier/secret-scrubber 1.1.1 → 1.1.6

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/lib/utils.js CHANGED
@@ -108,6 +108,9 @@ exports.recurseReplace = recurseReplace;
108
108
  * * otherwise, we pass the key and value to the matcher. If it returns `true`, we collect the value
109
109
  */
110
110
  const recurseExtract = (obj, matcher) => {
111
+ if (obj == null) {
112
+ return [];
113
+ }
111
114
  const result = Object.entries(obj)
112
115
  .map(([key, value]) => {
113
116
  if (isPlainObject(value)) {
package/package.json CHANGED
@@ -1,16 +1,9 @@
1
1
  {
2
2
  "name": "@zapier/secret-scrubber",
3
- "version": "1.1.1",
3
+ "version": "1.1.6",
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",
7
- "scripts": {
8
- "build": "tsc",
9
- "lint": "eslint src",
10
- "test": "jest",
11
- "prepublishOnly": "yarn build",
12
- "validate": "yarn test && yarn lint"
13
- },
14
7
  "repository": "gitlab:zapier/secret-scrubber-js",
15
8
  "keywords": [],
16
9
  "files": [
@@ -40,30 +33,37 @@
40
33
  "singleQuote": true
41
34
  },
42
35
  "devDependencies": {
43
- "@types/create-hash": "^1.2.6",
36
+ "@types/create-hash": "1.2.6",
44
37
  "@types/jest": "26.0.23",
45
- "@types/lodash.isplainobject": "^4.0.6",
46
- "@types/node": "~16",
47
- "@typescript-eslint/eslint-plugin": "^4",
48
- "@typescript-eslint/parser": "^4.4.1",
49
- "eslint": "^7",
50
- "eslint-config-prettier": "^6.13.0",
51
- "eslint-config-standard-with-typescript": "^19.0.1",
38
+ "@types/lodash": "4.14.182",
39
+ "@types/lodash.isplainobject": "4.0.6",
40
+ "@types/node": "16.18.0",
41
+ "@typescript-eslint/eslint-plugin": "4.33.0",
42
+ "@typescript-eslint/parser": "4.33.0",
43
+ "eslint": "7.32.0",
44
+ "eslint-config-prettier": "6.15.0",
45
+ "eslint-config-standard-with-typescript": "19.0.1",
52
46
  "eslint-config-xavdid": "1.0.0",
53
- "eslint-plugin-import": "^2",
54
- "eslint-plugin-jest": "^24.1.0",
55
- "eslint-plugin-node": "^11",
56
- "eslint-plugin-promise": "^4",
57
- "eslint-plugin-react": "^7.21.4",
58
- "eslint-plugin-react-hooks": "^4.1.2",
59
- "eslint-plugin-standard": "^4",
60
- "jest": "^27.0.4",
61
- "prettier": "^2.3.1",
62
- "ts-jest": "^27.0.3",
63
- "typescript": "~4.4"
47
+ "eslint-plugin-import": "2.31.0",
48
+ "eslint-plugin-jest": "24.7.0",
49
+ "eslint-plugin-node": "11.1.0",
50
+ "eslint-plugin-promise": "4.3.1",
51
+ "eslint-plugin-react": "7.37.2",
52
+ "eslint-plugin-react-hooks": "4.6.2",
53
+ "eslint-plugin-standard": "4.1.0",
54
+ "jest": "27.5.1",
55
+ "prettier": "2.8.8",
56
+ "ts-jest": "27.1.5",
57
+ "typescript": "4.4.4"
64
58
  },
65
59
  "dependencies": {
66
- "create-hash": "^1.2.0",
67
- "lodash.isplainobject": "^4.0.6"
60
+ "create-hash": "1.2.0",
61
+ "lodash.isplainobject": "4.0.6"
62
+ },
63
+ "scripts": {
64
+ "build": "tsc",
65
+ "lint": "eslint src",
66
+ "test": "jest",
67
+ "validate": "pnpm test && pnpm lint"
68
68
  }
69
- }
69
+ }
package/CHANGELOG.md DELETED
@@ -1,74 +0,0 @@
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
-
13
- ## 1.0.8
14
-
15
- _released `2023-10-25`_
16
-
17
- - fix issue where the order of replacements in `scrub` matters in the sense that we can end up with partially scrubbed sensitive data. Now, we sort the sensitive bank values by larger keys first ([!11](https://gitlab.com/zapier/team-developer-platform/secret-scrubber-js/-/merge_requests/11))
18
-
19
- ## 1.0.7
20
-
21
- _released `2022-04-28`_
22
-
23
- - add simple checks when checking if input is a url ([!7](https://gitlab.com/zapier/team-developer-platform/secret-scrubber-js/-/merge_requests/7))
24
-
25
- ## 1.0.6
26
-
27
- _released `2022-04-06`_
28
-
29
- - tweak `findSensitiveValues` to no longer return _any_ url with a querystring. It's always tried to extract secrets from a url, but now doesn't fall back to censoring the whole url ([!6](https://gitlab.com/zapier/team-developer-platform/secret-scrubber-js/-/merge_requests/6))
30
-
31
- Calling `findSensitiveValues` with a structure containing urls:
32
-
33
- | input | before | after |
34
- | ---------------------------- | -------------------------------- | ---------- |
35
- | `zapier.com` | `[]` | `[]` |
36
- | `zapier.com?api_key=123456` | `[123456]` | `[123456]` |
37
- | `zapier.com?safe_key=123456` | `["zapier.com?safe_key=123456"]` | `[]` |
38
-
39
- ## 1.0.5
40
-
41
- _released `2021-10-25`_
42
-
43
- - Reduce `scrub` memory usage ([!5](https://gitlab.com/zapier/team-developer-platform/secret-scrubber-js/-/merge_requests/5))
44
-
45
- ## 1.0.4
46
-
47
- _released `2021-10-04`_
48
-
49
- - add `api-key` to sensitive substrings ([!4](https://gitlab.com/zapier/team-developer-platform/secret-scrubber-js/-/merge_requests/4))
50
-
51
- ## 1.0.3
52
-
53
- _released `2021-09-20`_
54
-
55
- - Stop throwing errors for non-stringify-able values
56
- - bump Typescript version (`4.3` -> `4.4`)
57
-
58
- ## 1.0.2
59
-
60
- _released `2021-06-29`_
61
-
62
- - Lower the Typescript target for Node.js 12 compatibility
63
-
64
- ## 1.0.1
65
-
66
- _released `2021-06-25`_
67
-
68
- - Automated release, no code changes
69
-
70
- ## 1.0.0
71
-
72
- _released `2021-06-25`_
73
-
74
- - Initial Release