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/react.mjs CHANGED
@@ -2862,6 +2862,18 @@ const AWS_ACCESS_KEY = {
2862
2862
  description: "AWS Access Key ID"
2863
2863
  };
2864
2864
  /**
2865
+ * OpenAI API Key
2866
+ * Format: sk-proj- (~160 chars) or legacy sk- (51 chars)
2867
+ */
2868
+ const OPENAI_API_KEY = {
2869
+ type: "OPENAI_API_KEY",
2870
+ regex: /\b(sk-proj-[A-Za-z0-9_-]{100,200}|sk-[A-Za-z0-9_-]{48,52})\b/g,
2871
+ placeholder: "[OPENAI_API_KEY_{n}]",
2872
+ priority: 99,
2873
+ severity: "high",
2874
+ description: "OpenAI API Key"
2875
+ };
2876
+ /**
2865
2877
  * AWS Secret Access Key
2866
2878
  * Format: 40 base64 characters
2867
2879
  */
@@ -3242,6 +3254,7 @@ const OAUTH_TOKEN = {
3242
3254
  };
3243
3255
  const technologyPatterns = [
3244
3256
  AWS_ACCESS_KEY,
3257
+ OPENAI_API_KEY,
3245
3258
  AWS_SECRET_KEY,
3246
3259
  GOOGLE_API_KEY,
3247
3260
  STRIPE_API_KEY,
@@ -11738,7 +11751,7 @@ function calculateContextConfidence(_value, patternType, context) {
11738
11751
  "ADDRESS"
11739
11752
  ].includes(patternType.split("_")[0])) confidence += .1;
11740
11753
  }
11741
- if (context.features.hasExampleContext) confidence -= .15;
11754
+ if (context.features.hasExampleContext && patternType === "EMAIL") confidence -= .15;
11742
11755
  if (context.features.hasMedicalContext && [
11743
11756
  "MEDICAL",
11744
11757
  "MRN",
@@ -11758,7 +11771,8 @@ function calculateContextConfidence(_value, patternType, context) {
11758
11771
  "BITCOIN",
11759
11772
  "ETHEREUM",
11760
11773
  "CRYPTO",
11761
- "PAYMENT"
11774
+ "PAYMENT",
11775
+ "CREDIT_CARD"
11762
11776
  ].some((p) => patternType.includes(p))) confidence += .15;
11763
11777
  if (context.features.hasTechnicalContext && ![
11764
11778
  "API_KEY",
@@ -12179,7 +12193,8 @@ const defaultPasses = [
12179
12193
  "PRIVATE_KEY",
12180
12194
  "AWS",
12181
12195
  "GITHUB",
12182
- "STRIPE"
12196
+ "STRIPE",
12197
+ "OPENAI"
12183
12198
  ],
12184
12199
  description: "Critical credentials and API keys (priority 95-100)"
12185
12200
  },
@@ -12285,7 +12300,8 @@ function createSimpleMultiPass(options) {
12285
12300
  "AWS",
12286
12301
  "GITHUB",
12287
12302
  "STRIPE",
12288
- "JWT"
12303
+ "JWT",
12304
+ "OPENAI"
12289
12305
  ],
12290
12306
  description: "Credentials and API keys"
12291
12307
  });
@@ -12706,7 +12722,10 @@ const DEFAULT_PROXIMITY_RULES = [
12706
12722
  "visa",
12707
12723
  "mastercard",
12708
12724
  "amex",
12709
- "discover"
12725
+ "discover",
12726
+ "カード",
12727
+ "クレジット",
12728
+ "番号"
12710
12729
  ],
12711
12730
  proximityWindow: 8,
12712
12731
  confidenceBoost: .2,
@@ -13161,6 +13180,7 @@ const DEFAULT_SEVERITY_MAP = {
13161
13180
  "AWS_ACCESS_KEY": "high",
13162
13181
  "STRIPE_KEY": "high",
13163
13182
  "GOOGLE_API_KEY": "high",
13183
+ "OPENAI_API_KEY": "high",
13164
13184
  "PRESCRIPTION": "high",
13165
13185
  "BIOMETRIC": "high",
13166
13186
  "EMPLOYEE_ID": "medium",