openredaction 1.0.6 → 1.0.7
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/dist/index.cli.cjs +25 -5
- package/dist/index.d.mts.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +25 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +25 -5
- package/dist/index.mjs.map +1 -1
- package/dist/react.js +25 -5
- package/dist/react.js.map +1 -1
- package/dist/react.mjs +25 -5
- package/dist/react.mjs.map +1 -1
- package/package.json +4 -1
package/dist/react.js
CHANGED
|
@@ -2874,6 +2874,18 @@ const AWS_ACCESS_KEY = {
|
|
|
2874
2874
|
description: "AWS Access Key ID"
|
|
2875
2875
|
};
|
|
2876
2876
|
/**
|
|
2877
|
+
* OpenAI API Key
|
|
2878
|
+
* Format: sk-proj- (~160 chars) or legacy sk- (51 chars)
|
|
2879
|
+
*/
|
|
2880
|
+
const OPENAI_API_KEY = {
|
|
2881
|
+
type: "OPENAI_API_KEY",
|
|
2882
|
+
regex: /\b(sk-proj-[A-Za-z0-9_-]{100,200}|sk-[A-Za-z0-9_-]{48,52})\b/g,
|
|
2883
|
+
placeholder: "[OPENAI_API_KEY_{n}]",
|
|
2884
|
+
priority: 99,
|
|
2885
|
+
severity: "high",
|
|
2886
|
+
description: "OpenAI API Key"
|
|
2887
|
+
};
|
|
2888
|
+
/**
|
|
2877
2889
|
* AWS Secret Access Key
|
|
2878
2890
|
* Format: 40 base64 characters
|
|
2879
2891
|
*/
|
|
@@ -3254,6 +3266,7 @@ const OAUTH_TOKEN = {
|
|
|
3254
3266
|
};
|
|
3255
3267
|
const technologyPatterns = [
|
|
3256
3268
|
AWS_ACCESS_KEY,
|
|
3269
|
+
OPENAI_API_KEY,
|
|
3257
3270
|
AWS_SECRET_KEY,
|
|
3258
3271
|
GOOGLE_API_KEY,
|
|
3259
3272
|
STRIPE_API_KEY,
|
|
@@ -11750,7 +11763,7 @@ function calculateContextConfidence(_value, patternType, context) {
|
|
|
11750
11763
|
"ADDRESS"
|
|
11751
11764
|
].includes(patternType.split("_")[0])) confidence += .1;
|
|
11752
11765
|
}
|
|
11753
|
-
if (context.features.hasExampleContext) confidence -= .15;
|
|
11766
|
+
if (context.features.hasExampleContext && patternType === "EMAIL") confidence -= .15;
|
|
11754
11767
|
if (context.features.hasMedicalContext && [
|
|
11755
11768
|
"MEDICAL",
|
|
11756
11769
|
"MRN",
|
|
@@ -11770,7 +11783,8 @@ function calculateContextConfidence(_value, patternType, context) {
|
|
|
11770
11783
|
"BITCOIN",
|
|
11771
11784
|
"ETHEREUM",
|
|
11772
11785
|
"CRYPTO",
|
|
11773
|
-
"PAYMENT"
|
|
11786
|
+
"PAYMENT",
|
|
11787
|
+
"CREDIT_CARD"
|
|
11774
11788
|
].some((p) => patternType.includes(p))) confidence += .15;
|
|
11775
11789
|
if (context.features.hasTechnicalContext && ![
|
|
11776
11790
|
"API_KEY",
|
|
@@ -12191,7 +12205,8 @@ const defaultPasses = [
|
|
|
12191
12205
|
"PRIVATE_KEY",
|
|
12192
12206
|
"AWS",
|
|
12193
12207
|
"GITHUB",
|
|
12194
|
-
"STRIPE"
|
|
12208
|
+
"STRIPE",
|
|
12209
|
+
"OPENAI"
|
|
12195
12210
|
],
|
|
12196
12211
|
description: "Critical credentials and API keys (priority 95-100)"
|
|
12197
12212
|
},
|
|
@@ -12297,7 +12312,8 @@ function createSimpleMultiPass(options) {
|
|
|
12297
12312
|
"AWS",
|
|
12298
12313
|
"GITHUB",
|
|
12299
12314
|
"STRIPE",
|
|
12300
|
-
"JWT"
|
|
12315
|
+
"JWT",
|
|
12316
|
+
"OPENAI"
|
|
12301
12317
|
],
|
|
12302
12318
|
description: "Credentials and API keys"
|
|
12303
12319
|
});
|
|
@@ -12718,7 +12734,10 @@ const DEFAULT_PROXIMITY_RULES = [
|
|
|
12718
12734
|
"visa",
|
|
12719
12735
|
"mastercard",
|
|
12720
12736
|
"amex",
|
|
12721
|
-
"discover"
|
|
12737
|
+
"discover",
|
|
12738
|
+
"カード",
|
|
12739
|
+
"クレジット",
|
|
12740
|
+
"番号"
|
|
12722
12741
|
],
|
|
12723
12742
|
proximityWindow: 8,
|
|
12724
12743
|
confidenceBoost: .2,
|
|
@@ -13173,6 +13192,7 @@ const DEFAULT_SEVERITY_MAP = {
|
|
|
13173
13192
|
"AWS_ACCESS_KEY": "high",
|
|
13174
13193
|
"STRIPE_KEY": "high",
|
|
13175
13194
|
"GOOGLE_API_KEY": "high",
|
|
13195
|
+
"OPENAI_API_KEY": "high",
|
|
13176
13196
|
"PRESCRIPTION": "high",
|
|
13177
13197
|
"BIOMETRIC": "high",
|
|
13178
13198
|
"EMPLOYEE_ID": "medium",
|