-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpatterns.toml
More file actions
638 lines (554 loc) · 20.1 KB
/
Copy pathpatterns.toml
File metadata and controls
638 lines (554 loc) · 20.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
# Provn built-in detection patterns.
#
# This file is embedded into the provn binary at compile time and loaded at
# startup. To override or extend without recompiling, point
# `layers.regex.patterns_file` in provn.yml at your own copy.
#
# Fields:
# id unique pattern identifier (shown in findings)
# description human-readable explanation
# tier T0 critical | T1 high | T2 medium | T3 log-only
# confidence 0.0 - 1.0
# regex Rust regex syntax (no lookaround / backreferences)
# redact replacement token prefix used by auto-redaction
# secret_group capture group holding the secret itself (default: group 1 if
# present, else the whole match) — enables span-precise redaction
# ── Cloud providers ───────────────────────────────────────────────────────────
[[patterns]]
id = "aws_access_key"
description = "AWS access key ID (long-term or STS)"
tier = "T0"
confidence = 0.98
regex = '\b((?:AKIA|ASIA)[0-9A-Z]{16})\b'
redact = "PROVN_REDACTED_AWS_KEY"
[[patterns]]
id = "aws_secret_key"
description = "AWS secret access key near aws/secret context"
tier = "T0"
confidence = 0.95
regex = "(?i)aws.{0,20}secret.{0,10}[\"']([A-Za-z0-9/+]{40})[\"']"
redact = "PROVN_REDACTED_AWS_SECRET"
[[patterns]]
id = "google_api_key"
description = "Google API key"
tier = "T1"
confidence = 0.97
regex = '\b(AIza[0-9A-Za-z_\-]{35})\b'
redact = "PROVN_REDACTED_GOOGLE_KEY"
[[patterns]]
id = "gcp_service_account"
description = "GCP service account JSON key file contents"
tier = "T0"
confidence = 0.90
regex = '"type"\s*:\s*"service_account"'
redact = "PROVN_REDACTED_GCP_SA"
[[patterns]]
id = "azure_storage_key"
description = "Azure storage account key (AccountKey= in connection string)"
tier = "T0"
confidence = 0.97
regex = '(?i)AccountKey=([A-Za-z0-9+/=]{86,90})'
redact = "PROVN_REDACTED_AZURE_KEY"
[[patterns]]
id = "azure_sas_token"
description = "Azure SAS token (sv= ... &sig=)"
tier = "T1"
confidence = 0.85
regex = '(?i)sv=\d{4}-\d{2}-\d{2}[^\s"]*&sig=([A-Za-z0-9%+/=]{20,})'
redact = "PROVN_REDACTED_AZURE_SAS"
[[patterns]]
id = "digitalocean_pat"
description = "DigitalOcean personal access token"
tier = "T0"
confidence = 0.98
regex = '\b(dop_v1_[a-f0-9]{64})\b'
redact = "PROVN_REDACTED_DO_PAT"
[[patterns]]
id = "alibaba_access_key"
description = "Alibaba Cloud AccessKey ID"
tier = "T0"
confidence = 0.95
regex = '\b(LTAI[A-Za-z0-9]{12,20})\b'
redact = "PROVN_REDACTED_ALIBABA_AK"
# ── Infrastructure ────────────────────────────────────────────────────────────
[[patterns]]
id = "vault_token"
description = "HashiCorp Vault service token"
tier = "T0"
confidence = 0.97
regex = '\b(hvs\.[A-Za-z0-9_\-]{24,})'
redact = "PROVN_REDACTED_VAULT_TOKEN"
[[patterns]]
id = "kubeconfig_data"
description = "Kubernetes client key/cert data in kubeconfig"
tier = "T0"
confidence = 0.90
regex = '(?:client-key-data|client-certificate-data):\s*([A-Za-z0-9+/=]{100,})'
redact = "PROVN_REDACTED_KUBECONFIG"
[[patterns]]
id = "private_key_block"
description = "PEM private key block (RSA/EC/DSA/OpenSSH/PGP/PKCS#8)"
tier = "T0"
confidence = 0.99
regex = '-----BEGIN (?:RSA |EC |DSA |OPENSSH |PGP |ENCRYPTED )?PRIVATE KEY'
redact = "PROVN_REDACTED_PRIVATE_KEY"
# ── Version control & registries ──────────────────────────────────────────────
[[patterns]]
id = "github_token"
description = "GitHub token (classic PAT, OAuth, app, refresh)"
tier = "T0"
confidence = 0.97
regex = '\b(gh[pousr]_[A-Za-z0-9]{36,})\b'
redact = "PROVN_REDACTED_GITHUB_TOKEN"
[[patterns]]
id = "github_fine_grained_pat"
description = "GitHub fine-grained personal access token"
tier = "T0"
confidence = 0.98
regex = '\b(github_pat_[A-Za-z0-9_]{82})\b'
redact = "PROVN_REDACTED_GITHUB_PAT"
[[patterns]]
id = "gitlab_pat"
description = "GitLab personal access token"
tier = "T0"
confidence = 0.97
regex = '\b(glpat-[A-Za-z0-9_\-=]{20,})'
redact = "PROVN_REDACTED_GITLAB_PAT"
[[patterns]]
id = "npm_token"
description = "npm granular/automation access token"
tier = "T0"
confidence = 0.97
regex = '\b(npm_[A-Za-z0-9]{36})\b'
redact = "PROVN_REDACTED_NPM_TOKEN"
[[patterns]]
id = "pypi_token"
description = "PyPI upload token"
tier = "T0"
confidence = 0.98
regex = '\b(pypi-AgEIcHlwaS5vcmc[A-Za-z0-9_\-]{50,})'
redact = "PROVN_REDACTED_PYPI_TOKEN"
# ── Databases ─────────────────────────────────────────────────────────────────
[[patterns]]
id = "database_url"
description = "Database connection string with embedded credentials"
tier = "T0"
confidence = 0.92
regex = '(?i)\b(?:postgres(?:ql)?|mysql|mongodb(?:\+srv)?|rediss?|amqps?)://[^:@\s/]*:([^@\s]+)@[^\s]+'
redact = "PROVN_REDACTED_DB_PASSWORD"
secret_group = 1
# ── Payment ───────────────────────────────────────────────────────────────────
[[patterns]]
id = "stripe_live_key"
description = "Stripe live secret key"
tier = "T0"
confidence = 0.98
regex = '\b(sk_live_[a-zA-Z0-9]{24,})'
redact = "PROVN_REDACTED_STRIPE_KEY"
[[patterns]]
id = "stripe_restricted_key"
description = "Stripe live restricted key"
tier = "T0"
confidence = 0.97
regex = '\b(rk_live_[a-zA-Z0-9]{24,})'
redact = "PROVN_REDACTED_STRIPE_RK"
[[patterns]]
id = "stripe_test_key"
description = "Stripe test-mode secret key (informational)"
tier = "T3"
confidence = 0.95
regex = '\b(sk_test_[a-zA-Z0-9]{24,})'
redact = "PROVN_REDACTED_STRIPE_TEST"
[[patterns]]
id = "square_access_token"
description = "Square access token"
tier = "T0"
confidence = 0.95
regex = '\b(sq0atp-[A-Za-z0-9_\-]{22})\b'
redact = "PROVN_REDACTED_SQUARE_TOKEN"
[[patterns]]
id = "square_oauth_secret"
description = "Square OAuth application secret"
tier = "T0"
confidence = 0.95
regex = '\b(sq0csp-[A-Za-z0-9_\-]{43})\b'
redact = "PROVN_REDACTED_SQUARE_SECRET"
# ── Communication ─────────────────────────────────────────────────────────────
[[patterns]]
id = "slack_bot_token"
description = "Slack bot/user/app token"
tier = "T0"
confidence = 0.95
regex = '\b(xox[baprs]-[0-9A-Za-z\-]{10,})'
redact = "PROVN_REDACTED_SLACK_TOKEN"
[[patterns]]
id = "slack_webhook"
description = "Slack incoming webhook URL"
tier = "T1"
confidence = 0.96
regex = 'https://hooks\.slack\.com/services/(T[A-Z0-9]+/B[A-Z0-9]+/[a-zA-Z0-9]+)'
redact = "PROVN_REDACTED_SLACK_WEBHOOK"
[[patterns]]
id = "sendgrid_api_key"
description = "SendGrid API key"
tier = "T0"
confidence = 0.98
regex = '\b(SG\.[A-Za-z0-9_\-]{20,24}\.[A-Za-z0-9_\-]{39,50})\b'
redact = "PROVN_REDACTED_SENDGRID_KEY"
[[patterns]]
id = "mailgun_api_key"
description = "Mailgun private API key"
tier = "T1"
confidence = 0.90
regex = '\b(key-[a-f0-9]{32})\b'
redact = "PROVN_REDACTED_MAILGUN_KEY"
[[patterns]]
id = "twilio_api_key"
description = "Twilio API key SID"
tier = "T1"
confidence = 0.92
regex = '\b(SK[a-f0-9]{32})\b'
redact = "PROVN_REDACTED_TWILIO_KEY"
[[patterns]]
id = "telegram_bot_token"
description = "Telegram bot token"
tier = "T1"
confidence = 0.95
regex = '\b(\d{8,10}:AA[A-Za-z0-9_\-]{33})\b'
redact = "PROVN_REDACTED_TELEGRAM_TOKEN"
[[patterns]]
id = "discord_webhook"
description = "Discord webhook URL"
tier = "T1"
confidence = 0.95
regex = 'https://discord(?:app)?\.com/api/webhooks/\d+/([A-Za-z0-9_\-]{60,})'
redact = "PROVN_REDACTED_DISCORD_WEBHOOK"
[[patterns]]
id = "shopify_access_token"
description = "Shopify private app access token"
tier = "T0"
confidence = 0.97
regex = '\b(shpat_[a-fA-F0-9]{32})\b'
redact = "PROVN_REDACTED_SHOPIFY_TOKEN"
[[patterns]]
id = "heroku_api_key"
description = "Heroku API key (UUID near heroku context)"
tier = "T1"
confidence = 0.80
regex = '(?i)heroku.{0,20}\b([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})\b'
redact = "PROVN_REDACTED_HEROKU_KEY"
# ── AI / ML platforms ─────────────────────────────────────────────────────────
[[patterns]]
id = "openai_api_key"
description = "OpenAI API key"
tier = "T1"
confidence = 0.97
regex = '\b(sk-(?:proj-|svcacct-)?[a-zA-Z0-9]{40,})'
redact = "PROVN_REDACTED_OPENAI_KEY"
[[patterns]]
id = "anthropic_api_key"
description = "Anthropic API key"
tier = "T1"
confidence = 0.97
regex = '\b(sk-ant-[a-zA-Z0-9\-_]{40,})'
redact = "PROVN_REDACTED_ANTHROPIC_KEY"
[[patterns]]
id = "huggingface_token"
description = "Hugging Face user access token"
tier = "T1"
confidence = 0.95
regex = '\b(hf_[a-zA-Z0-9]{34,})\b'
redact = "PROVN_REDACTED_HF_TOKEN"
[[patterns]]
id = "replicate_token"
description = "Replicate API token"
tier = "T1"
confidence = 0.95
regex = '\b(r8_[A-Za-z0-9]{37,})\b'
redact = "PROVN_REDACTED_REPLICATE_TOKEN"
[[patterns]]
id = "groq_api_key"
description = "Groq API key"
tier = "T1"
confidence = 0.93
regex = '\b(gsk_[A-Za-z0-9]{50,})\b'
redact = "PROVN_REDACTED_GROQ_KEY"
# ── Crypto assets ─────────────────────────────────────────────────────────────
[[patterns]]
id = "mnemonic_phrase"
description = "BIP39-style mnemonic seed phrase assigned to a variable"
tier = "T0"
confidence = 0.85
regex = "(?i)(?:mnemonic|seed[_\\-]?phrase)\\s*[=:]\\s*[\"']([a-z]+(?: [a-z]+){11,23})[\"']"
redact = "PROVN_REDACTED_MNEMONIC"
[[patterns]]
id = "wif_private_key"
description = "Bitcoin WIF private key (uncompressed)"
tier = "T0"
confidence = 0.80
regex = '\b(5[HJK][1-9A-HJ-NP-Za-km-z]{49})\b'
redact = "PROVN_REDACTED_WIF_KEY"
# ── Platform / SaaS tokens (distinctive prefixes, low FP) ─────────────────────
[[patterns]]
id = "terraform_cloud_token"
description = "Terraform Cloud / Enterprise API token"
tier = "T0"
confidence = 0.95
regex = '\b([A-Za-z0-9]{14}\.atlasv1\.[A-Za-z0-9\-_=]{60,})'
redact = "PROVN_REDACTED_TF_CLOUD_TOKEN"
[[patterns]]
id = "databricks_pat"
description = "Databricks personal access token"
tier = "T0"
confidence = 0.95
regex = '\b(dapi[a-f0-9]{32,})\b'
redact = "PROVN_REDACTED_DATABRICKS_PAT"
[[patterns]]
id = "doppler_token"
description = "Doppler service/personal/CLI token"
tier = "T0"
confidence = 0.95
regex = '\b(dp\.(?:pt|st|sa|scim|audit|ct)\.[A-Za-z0-9]{40,})'
redact = "PROVN_REDACTED_DOPPLER_TOKEN"
[[patterns]]
id = "grafana_service_account"
description = "Grafana service account token"
tier = "T0"
confidence = 0.97
regex = '\b(glsa_[A-Za-z0-9]{32}_[A-Fa-f0-9]{8})\b'
redact = "PROVN_REDACTED_GRAFANA_SA"
[[patterns]]
id = "dockerhub_pat"
description = "Docker Hub personal access token"
tier = "T0"
confidence = 0.95
regex = '\b(dckr_pat_[A-Za-z0-9_\-]{20,})'
redact = "PROVN_REDACTED_DOCKERHUB_PAT"
[[patterns]]
id = "rubygems_api_key"
description = "RubyGems API key"
tier = "T0"
confidence = 0.95
regex = '\b(rubygems_[a-f0-9]{48})\b'
redact = "PROVN_REDACTED_RUBYGEMS_KEY"
[[patterns]]
id = "stripe_webhook_secret"
description = "Stripe webhook signing secret"
tier = "T0"
confidence = 0.95
regex = '\b(whsec_[A-Za-z0-9]{32,})'
redact = "PROVN_REDACTED_STRIPE_WHSEC"
[[patterns]]
id = "slack_app_token"
description = "Slack app-level token"
tier = "T0"
confidence = 0.95
regex = '\b(xapp-[0-9A-Za-z\-]{12,})'
redact = "PROVN_REDACTED_SLACK_APP_TOKEN"
[[patterns]]
id = "postman_api_key"
description = "Postman API key"
tier = "T0"
confidence = 0.97
regex = '\b(PMAK-[a-f0-9]{24}-[a-f0-9]{34})\b'
redact = "PROVN_REDACTED_POSTMAN_KEY"
[[patterns]]
id = "linear_api_key"
description = "Linear API key"
tier = "T0"
confidence = 0.95
regex = '\b(lin_api_[A-Za-z0-9]{40,})\b'
redact = "PROVN_REDACTED_LINEAR_KEY"
[[patterns]]
id = "notion_token"
description = "Notion internal integration token"
tier = "T0"
confidence = 0.95
regex = '\b(ntn_[A-Za-z0-9]{40,})\b'
redact = "PROVN_REDACTED_NOTION_TOKEN"
[[patterns]]
id = "atlassian_api_token"
description = "Atlassian API token (Jira/Confluence)"
tier = "T0"
confidence = 0.95
regex = '\b(ATATT3xFfGF0[A-Za-z0-9_\-=]{100,})'
redact = "PROVN_REDACTED_ATLASSIAN_TOKEN"
[[patterns]]
id = "new_relic_user_key"
description = "New Relic user API key"
tier = "T1"
confidence = 0.92
regex = '\b(NRAK-[A-Z0-9]{27})\b'
redact = "PROVN_REDACTED_NEWRELIC_KEY"
[[patterns]]
id = "datadog_api_key"
description = "Datadog API key (32-hex near datadog context)"
tier = "T1"
confidence = 0.80
regex = '(?i)datadog.{0,20}\b([a-f0-9]{32})\b'
redact = "PROVN_REDACTED_DATADOG_KEY"
[[patterns]]
id = "planetscale_token"
description = "PlanetScale database password or token"
tier = "T0"
confidence = 0.95
regex = '\b(pscale_(?:pw|tkn|oauth)_[A-Za-z0-9_\-\.]{32,})'
redact = "PROVN_REDACTED_PLANETSCALE"
[[patterns]]
id = "supabase_token"
description = "Supabase access token"
tier = "T0"
confidence = 0.92
regex = '\b(sbp_[a-f0-9]{40})\b'
redact = "PROVN_REDACTED_SUPABASE_TOKEN"
[[patterns]]
id = "google_oauth_client_secret"
description = "Google OAuth 2.0 client secret"
tier = "T0"
confidence = 0.95
regex = '\b(GOCSPX-[A-Za-z0-9_\-]{28})\b'
redact = "PROVN_REDACTED_GOOGLE_OAUTH"
[[patterns]]
id = "age_secret_key"
description = "age encryption secret key"
tier = "T0"
confidence = 0.97
regex = '\b(AGE-SECRET-KEY-1[0-9A-Z]{58})\b'
redact = "PROVN_REDACTED_AGE_KEY"
# ── Generic / contextual ──────────────────────────────────────────────────────
[[patterns]]
id = "jwt_token"
description = "JSON Web Token (header.payload.signature)"
tier = "T1"
confidence = 0.85
regex = '\b(ey[A-Za-z0-9_\-]{10,}\.ey[A-Za-z0-9_\-]{10,}\.[A-Za-z0-9_\-]{10,})\b'
redact = "PROVN_REDACTED_JWT"
[[patterns]]
id = "generic_api_key"
description = "Generic api_key/apikey assignment"
tier = "T1"
confidence = 0.75
regex = "(?i)(?:api[_\\-]?key|apikey)\\s*[=:]\\s*[\"']([\\w\\-]{20,})[\"']"
redact = "PROVN_REDACTED_API_KEY"
[[patterns]]
id = "generic_client_secret"
description = "Generic client_secret assignment (OAuth app secrets)"
tier = "T1"
confidence = 0.80
regex = "(?i)client[_\\-]?secret\\s*[=:]\\s*[\"']([A-Za-z0-9_~.\\-]{20,})[\"']"
redact = "PROVN_REDACTED_CLIENT_SECRET"
[[patterns]]
id = "password_in_code"
description = "Hardcoded password assignment"
tier = "T0"
confidence = 0.82
regex = "(?i)(?:password|passwd|pwd)\\s*=\\s*[\"']([^\"']{8,})[\"']"
redact = "PROVN_REDACTED_PASSWORD"
[[patterns]]
id = "system_prompt_var"
description = "System prompt assignment (possible IP/prompt leak)"
tier = "T1"
confidence = 0.80
regex = "(?i)system_prompt\\s*[=:]\\s*[\"'](.{30,})"
redact = "PROVN_REDACTED_SYSTEM_PROMPT"
[[patterns]]
id = "hex_encoded_secret"
description = "Hex blob assigned to a key/secret/token variable (possible hex-encoded secret; pure hex evades entropy detection)"
tier = "T2"
confidence = 0.70
regex = "(?i)(?:key|secret|token|passwd|password|credential)\\w*\\s*[=:]\\s*[\"']([a-fA-F0-9]{32,})[\"']"
redact = "PROVN_REDACTED_HEX_SECRET"
[[patterns]]
id = "basic_auth_url"
description = "URL with embedded basic-auth credentials"
tier = "T1"
confidence = 0.85
regex = 'https?://[^:@\s/]+:([^@\s/]{6,})@[^\s]+'
redact = "PROVN_REDACTED_URL_CREDS"
secret_group = 1
# ── Infrastructure / IP disclosure ────────────────────────────────────────────
#
# These surface intellectual-property and internal-topology leaks rather than
# credentials: hard-coded references to org-controlled data stores and internal
# hostnames. They sit at medium tier / medium confidence (the ambiguous band) —
# reported and, when the semantic layer is enabled, confirmed by it — because a
# data-location or hostname is a review signal, not a hard secret, and should
# not block a commit on its own the way a T0/T1 credential does.
[[patterns]]
id = "cloud_storage_uri"
description = "Object-storage URI referencing an org-controlled bucket (possible proprietary data/model location leak)"
tier = "T2"
confidence = 0.55
regex = '''(?i)\b((?:s3a?n?|gs|gcs|az|abfss?|wasbs?)://[a-z0-9][a-z0-9._-]{1,62}/[^\s"'`]+)'''
redact = "PROVN_REDACTED_STORAGE_URI"
secret_group = 1
[[patterns]]
id = "internal_hostname"
description = "Internal/private hostname disclosing network topology (.internal/.corp/.intranet/.lan or k8s .svc.cluster.local)"
tier = "T2"
confidence = 0.60
# Require a network-authority prefix (scheme `://`, userinfo `@`, a quote, or an
# assignment) before the host. Rust regex has no lookahead, so this anchoring is
# what keeps dotted namespaces like Java `package com.corp.internal;` from being
# mistaken for a hostname — those are preceded by whitespace, not authority.
regex = '''(?i)(?:://|@|=\s*["'`]?|["'`])([a-z0-9][a-z0-9-]*(?:\.[a-z0-9-]+)*\.(?:internal|intranet|corp|lan)|[a-z0-9][a-z0-9-]*(?:\.[a-z0-9-]+)*\.svc\.cluster\.local)\b'''
redact = "PROVN_REDACTED_INTERNAL_HOST"
secret_group = 1
# ── Proprietary-IP signals ────────────────────────────────────────────────────
#
# The rules above find *locations* (buckets, hosts). These find the other half
# of an IP leak: content that is marked confidential, model/prompt material that
# is meant to stay private, and safety controls being switched off. All sit at
# T2 in the ambiguous band for the same reason — they are strong review signals
# but weak block signals, and Layer 3 adjudicates them when it is enabled.
[[patterns]]
id = "confidentiality_notice"
description = "Explicit confidentiality notice — the text itself says this material is not for distribution"
tier = "T2"
confidence = 0.65
regex = '''(?i)\b(trade\s+secrets?|(?:proprietary|company)\s+and\s+confidential|confidential\s+and\s+proprietary|do\s+not\s+distribute|internal\s+use\s+only|not\s+for\s+(?:public\s+)?(?:release|distribution))\b'''
redact = "PROVN_REDACTED_CONFIDENTIAL"
[[patterns]]
id = "confidentiality_keyword"
description = "Code marked confidential or proprietary"
tier = "T2"
confidence = 0.50
regex = '''(?i)\b(confidential|proprietary)\b'''
redact = "PROVN_REDACTED_CONFIDENTIAL"
[[patterns]]
id = "prompt_secrecy_instruction"
description = "System-prompt text instructing the model to conceal its own instructions (proprietary prompt leak)"
tier = "T2"
confidence = 0.65
regex = '''(?i)\b(?:never|do\s+not|don'?t)\s+(?:reveal|share|disclose|mention|repeat|tell)\b[^\n]{0,60}\b(?:instructions?|prompts?|these|this|that\s+you|you\s+are|it)\b'''
redact = "PROVN_REDACTED_SYSTEM_PROMPT"
[[patterns]]
id = "private_data_path"
description = "Filesystem path under a proprietary/private/confidential directory (possible dataset or model location leak)"
tier = "T2"
confidence = 0.55
regex = '''(?i)(?:^|["'`\s=(\[,])((?:\./)?/(?:[\w.-]+/)*(?:proprietary|private|confidential|internal|restricted)/[\w./-]+)'''
redact = "PROVN_REDACTED_PRIVATE_PATH"
secret_group = 1
[[patterns]]
id = "safety_control_override"
description = "Model safety or guardrail control being disabled in configuration"
tier = "T2"
confidence = 0.60
regex = '''(?i)\b(guardrail_bypass|safety_override|bypass_(?:safety|guardrail|filter|moderation)|disable_(?:safety|guardrail|moderation)|content_policy\s*["']?\s*[:=]\s*["']permissive)'''
redact = "PROVN_REDACTED_SAFETY_OVERRIDE"
[[patterns]]
id = "internal_identifier"
description = "Quoted identifier naming an internal or private resource (internal model, dataset, or benchmark id)"
tier = "T2"
confidence = 0.50
regex = '''(?i)["']([\w.-]*(?:internal|private)[_-][\w.-]+|[\w.-]+-(?:internal|private))["']'''
redact = "PROVN_REDACTED_INTERNAL_ID"
secret_group = 1
[[patterns]]
id = "model_training_config"
description = "Fine-tuning or RLHF hyperparameters — proprietary training recipe"
tier = "T2"
confidence = 0.50
regex = '''(?i)\b(lora_r|lora_alpha|kl_coeff|ppo_epochs|reward_model|base_model|pass_threshold)\b\s*["']?\s*[:=]'''
redact = "PROVN_REDACTED_TRAINING_CONFIG"