provenant-cli 0.0.33

Rust-based ScanCode-compatible scanner for licenses, package metadata, SBOMs, and provenance data.
Documentation
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
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
// SPDX-FileCopyrightText: Provenant contributors
// SPDX-License-Identifier: Apache-2.0

use std::sync::LazyLock;

use regex::Regex;

/// Junk copyright regex patterns (compiled once).
pub(super) static COPYRIGHTS_JUNK_PATTERNS: LazyLock<Vec<Regex>> = LazyLock::new(|| {
    let patterns = [
        r"(?i)^copyright \(c\)$",
        r"(?i)^\(c\) by$",
        r"(?i)\(c\) [a-zA-Z][a-z] \(c\)",
        r"(?i)^copyright holder or simply",
        r"(?i)^copyright notice\.",
        r"(?i)^copyright of uc berkeley's berkeley software distribution",
        r"(?i)^and/or the universal copyright convention",
        r"(?i)^attn copyright",
        r"(?i)^\(c\)$",
        r"(?i)^c$",
        r"(?i)^\(c\) any recipient$",
        r"(?i)^\(c\) as$",
        r"(?i)^\(c\),? \(c\)$",
        r"(?i)^\(c\) cockroach enterprise",
        r"(?i)^\(c\) each recipient$",
        r"(?i)^\(c\) forums$",
        r"(?i)^\(c\) if you",
        r"(?i)^\(c\) individual use",
        r"(?i)^code copyright grant",
        r"(?i)^copyright and license, contributing",
        r"(?i)^copyright as is group",
        r"(?i)^copyright \(c\) , and others",
        r"(?i)^copyright \(c\) <holders>",
        r"(?i)^copyright copyright and",
        r"(?i)^copyright\s+and\s+conditions\b",
        r"(?i)^copyright \(c\) year$",
        r"(?i)^copyright \(c\) year your",
        r"(?i)^copyright\s+rsa$",
        r"(?i)^copyright, designs and patents",
        r"(?i)copyright \d+ m\. y\.( name)?",
        r"(?i)^copyright\s*,\s*proprietary\b",
        r"(?i)^copyright\s+proprietary\b",
        r"(?i)^proprietary$",
        r"(?i)^copyrighte?d? (by)?$",
        r"(?i)^copyrighted by its$",
        r"(?i)^copyrighted by their authors",
        r"(?i)^copyrighted material, only this license",
        r"(?i)^copyright for a new language",
        r"(?i)^copyright from license",
        r"(?i)^copyright help center",
        r"(?i)^copyright holder and contributors?\.?$",
        r"(?i)^copyright-holder and its contributors$",
        r"(?i)^copyright holder has",
        r"(?i)\bMODULEAUTHOR\b",
        r"(?i)\bTHE\s+\S+'S\s+COPYRIGHT\b",
        r"(?i)\bTHE\s+PACKAGE'S\b",
        r"(?i)\bTHE\s+\S+'S$",
        r"(?i)^copyright holder means",
        r"(?i)^copyright holder who",
        r"(?i)^copyright holder nor",
        r"(?i)^copyright holder,? or",
        r"(?i)^copyright holders and contribut",
        r"(?i)^copyright holder's",
        r"(?i)^copyright holder\(s\) or the author\(s\)",
        r"(?i)^copyrights?\s*,\s*patents?\s*,\s*trade secrets?\s+or\b",
        r"(?i)^copyrights?\s*,\s*patents?\s*,\s*trade secrets?\s*$",
        r"(?i)^copyright\s*,\s*patents?\s*,\s*trade secrets?\s+or\b",
        r"(?i)^copyright\s*,\s*patents?\s*,\s*trade secrets?\s*$",
        r"(?i)^copyright\s*,\s*patents?\s+or\b",
        r"(?i)^copyright\s*,\s*patents?\s*$",
        r"(?i)^copyright\s*,\s*patents?\s*,\s*trade secrets?\b",
        r"(?i)^copyright\s*,\s*including\b",
        r"(?i)^copyright\s*,\s*patent\s*,\s*or trademark\b",
        r"(?i)^copyright\s*,\s*patent\s*,\s*trademark\s*,\s*or\b",
        r"(?i)^copyright\s*,\s*patent\s*,\s*trademark\s*,\s*and attribution\b",
        r"(?i)^copyrights?\s*,\s*trade secrets?\s+or\b",
        r"(?i)^copyrights?\s*,\s*trade secrets?\s*$",
        r"(?i)^copyright\s*,\s*trade secrets?\s+or\b",
        r"(?i)^copyright\s*,\s*trade secrets?\s*$",
        r"(?i)^copyright\s*,\s*trade secret\s*,\s*trademark\s+or\b",
        r"(?i)^copyright\s*,\s*trade secret\s*,\s*trademark\s+or\s+other intellectual property rights\b",
        r"(?i)^copyright\s*\(c\)\s*trademark\b",
        r"(?i)^copyrights?\s*,\s*trademarks?\s+or\b",
        r"(?i)^copyrights?\s*,\s*trademarks?\s*$",
        r"(?i)^copyright\s*,\s*trademark\b",
        r"(?i)^copyright\s*,\s*trademark\s*,\s*trade secrets?\s+or\b",
        r"(?i)^copyright\s*,\s*trademark\s*,\s*trade secrets?\s*$",
        r"(?i)^copyright\s*,\s*to do the following\b",
        r"(?i)^copyright including",
        r"(?i)^copyright in section",
        r"(?i)^copyright john wiley & sons, inc\. year",
        r"(?i)^copyright l?gpl group",
        r"(?i)^copyright, license, and",
        r"(?i)^copyright merged arm",
        r"(?i)^copyright neither",
        r"(?i)^copyright notices, authorship",
        r"(?i)^copyright not limited",
        r"(?i)^copyright owner or",
        r"(?i)^copyrighted and may only be modified in the following manner\b",
        r"(?i)^copyright redistributions",
        r"(?i)^copyright the project$",
        r"(?i)^copyright\.? united states$",
        r"(?i)^copyright\s+font-size\s+color\b",
        r"(?i)^\(c\) software activation",
        r"(?i)^\(c\) source code",
        r"(?i)^full copyright statement",
        r"(?i)^universal copyright convention",
        r"(?i)^u\.s\. copyright act",
        r"(?i)^\(c\) Object c$",
        r"(?i)^copyright headers?",
        r"(?i)^\(c\) \(c\) B$",
        r"(?i)^\(c\) group$",
        r"(?i)^\(c\) \(c\) A$",
        r"(?i)^\(c\) the\b",
        r"(?i)^\(c\) if\b",
        r"(?i)^\(c\) for\b",
        r"(?i)^\(c\)\s+(?:convert|multiply)\b",
        r"(?i)^\(c\) contributor,\s*path$",
        r"(?i)^the\s+Embedded\s+Configurable\s+Operating\s+System\b",
        r"(?i)\bpkg\.(author|homepage)\b",
        r"(?i)\bdate\.year\b",
        r"(?i)\bYYYY-MM-DD\b",
        r"(?i)<\s*pkg\.[a-zA-Z0-9_.-]+\s*>",
        r"(?i)\bCopyright\b.*\s\$\s*$",
        r"(?i)^\(c\) to\b",
        r"(?i)^\(c\) one\b",
        r"(?i)^\(c\) all\b",
        r"(?i)^\(c\) allow\b",
        r"(?i)^\(c\) ensure\b",
        r"(?i)^\(c\) permit\b",
        r"(?i)^\(c\) delete\b",
        r"(?i)^\(c\) return\b",
        r"(?i)^\(c\) flag\b",
        r"(?i)^\(c\) charge\b",
        r"(?i)^\(c\) automatically\b",
        r"(?i)^\(c\) completely\b",
        r"(?i)^\(c\) terminate\b",
        r"(?i)^\(c\) suspend\b",
        r"(?i)^\(c\) material\b",
        r"(?i)^\(c\) indemnification\b",
        r"(?i)^\(c\) england\b",
        r"(?i)^\(c\) a$",
        r"(?i)^\(c\) b$",
        r"(?i)^\(c\) c$",
        r"(?i)^\(c\) s$",
        r"(?i)^\(c\) u$",
        r"(?i)^\(c\) this\.",
        r"(?i)^\(c\) nat\d",
        r"(?i)^\(c\) ss+y?$",
        r"(?i)^\(c\) objc",
        r"(?i)^\(c\) \.year",
        r"(?i)^\(c\) case\b",
        r"(?i)^\(c\) offer\b",
        r"(?i)^\(c\) compute\b",
        r"(?i)^\(c\) there\b",
        r"(?i)^\(c\) c printf\b",
        r"(?i)^\(c\) -\d",
        r"(?i)^\(c\) ac$",
        r"(?i)^\(c\) eu$",
        r"(?i)^\(c\) continue\b",
        r"(?i)^\(c\) component\b",
        r"(?i)^\(c\) ext\.",
        r"(?i)^\(c\) assert\.",
        r"(?i)^\(c\) ,\(d\)",
        r"(?i)^copyright notice\b",
        r"(?i)^copyright holders? be\b",
        r"(?i)^copyright holders? and/?or\b",
        r"(?i)^copyright holders?$",
        r"(?i)^copyright holders? shall\b",
        r"(?i)^copyright\s+footer$",
        r"(?i)^copyright,\s*legal\s+notice(?:\s+div\s+div\.legalnotice\s+p)?$",
        r"(?i)^copyright\s+color\s+666666$",
        r"(?i)^copyright holder saying\b",
        r"(?i)^copyright holders of\b",
        r"(?i)^copyright holder,$",
        r"(?i)^copyright holder notifies\b",
        r"(?i)^copyright holder is reinstated\b",
        r"(?i)^copyright holder fails\b",
        r"(?i)^copyright holders, but\b",
        r"(?i)^copyright holders, or\b",
        r"(?i)^copyright holders, authors\b",
        r"(?i)^copyright holder\. ",
        r"(?i)^copyright holder, author\b",
        r"(?i)^copyright holders? disclaim\b",
        r"(?i)^copyright and has\b",
        r"(?i)^copyright and trade secrets?\b",
        r"(?i)^copyright and trademark\b",
        r"(?i)^copyright and other proprietary\b",
        r"(?i)^copyright in the\b",
        r"(?i)^copyright in and\b",
        r"(?i)^copyright the software\b",
        r"(?i)^copyright info for\b",
        r"(?i)^copyright grant\b",
        r"(?i)^copyright terms\b",
        r"(?i)^copyright does\b",
        r"(?i)^copyright unless\b",
        r"(?i)^copyright also\b",
        r"(?i)^copyright are\b",
        r"(?i)^copyright line\b",
        r"(?i)^copyright resulting\b",
        r"(?i)^copyright treaty\b",
        r"(?i)^copyright rights\b",
        r"(?i)^copyright appears?\b",
        r"(?i)^copyright years? updated\b",
        r"(?i)^copyright license\b",
        r"(?i)^copyright copyright\b",
        r"(?i)^copyrights covering\b",
        r"(?i)^copyrights for the\b",
        r"(?i)^copyright for the\b",
        r"(?i)^copyright symbol\b",
        r"(?i)^copyright claim\b",
        r"(?i)^copyright interest\b",
        r"(?i)^copyright shall\b",
        r"(?i)^copyright statement\b",
        r"(?i)^copyright disclaimer\b",
        r"(?i)^copyright permission\b",
        r"(?i)^copyright protection\b",
        r"(?i)^copyright owner\b",
        r"(?i)^copyright [a-z]$",
        r"(?i)^copyright yyyy\b",
        r"(?i)^copyright exceptions\b",
        r"(?i)^copyright or patent\b",
        r"(?i)^copyright is claimed\b",
        r"(?i)^copyright messages\b",
        r"(?i)^copyright information\b",
        r"(?i)^copyright at the\b",
        r"(?i)^copyright claimed\b",
        r"(?i)^copyright law\b",
        r"(?i)^copyright page\b",
        r"(?i)^copyright holders? or\b",
        r"(?i)^the above copyright holders\b",
        r"(?i)^copyrighted material outside\b",
        r"(?i)^copyright holder as a result\b",
        r"(?i)^copyright holder explicitly\b",
        r"(?i)^copyright holder collectively\b",
        r"(?i)^copyright holder stating\b",
        r"(?i)^copyright holder to enforce\b",
        r"(?i)^copyright holder expressly\b",
        r"(?i)^copyright holder maintains\b",
        r"(?i)^copyright holder may\b",
        r"(?i)^copyright holder is whoever\b",
        r"(?i)^copyright holder, and\b",
        r"(?i)^copyright holder, but\b",
        r"(?i)^copyright holder and seek\b",
        r"(?i)^copyright holder of\b",
        r"(?i)^copyright or\b",
        r"(?i)^copyright is held by\b",
        r"(?i)^copyright as specified\b",
        r"(?i)^copyrights and patent\b",
        r"(?i)^copyright holder provides\b",
        r"(?i)^copyright holder agrees\b",
        r"(?i)^copyright holder and current maintainer\b",
        r"(?i)^copyright holder,?\s*referring\b",
        r"(?i)\bmaintainer referring to the person\b",
        r"(?i)\bexplicitly and prominently states\b",
        r"(?i)\bm\. y\. name\b",
        r"(?i)^copyrights are property of\b",
        r"(?i)^copyright holder,? we do not list\b",
        r"(?i)^copyright and no-warranty notice\b",
        r"(?i)^copyright pages? of volumes?\b",
        r"(?i)^copyright as is\b",
        r"(?i)^copyright its (contributors|licensors|respective)\b",
        r"(?i)^copyright owned\b",
        r"(?i)^copyright attr\b",
        r"(?i)^copyright content\b",
        r"(?i)^copyright a href\b",
        r"(?i)^copyright designation\b",
        r"(?i)^copyright infringement\b",
        r"(?i)^copyright General Public\b",
        r"(?i)^copyright owners\b",
        r"(?i)^copyright and as\b",
        r"(?i)^copyright applies\b",
        r"(?i)^copyrights of all\b",
        r"(?i)^copyright As I\b",
        r"(?i)^copyright by The Regents\b",
        r"(?i)^copyright by other\b",
        r"(?i)^copyrighted by C\.\b",
        r"(?i)^copyright note\b",
        r"(?i)^copyright clause\b",
        r"(?i)^copyright message\b",
        r"(?i)^copyright below\b",
        r"(?i)^copyright is below\b",
        r"(?i)^copyright date\b",
        r"(?i)^copyright year$",
        r"(?i)^copyright notive\b",
        r"(?i)^copyright inside\b",
        r"(?i)^copyright match\b",
        r"(?i)^copyright notices\b",
        r"(?i)^copyright GNU\b",
        r"(?i)^COPYRIGHT AS PER\b",
        r"(?i)^Copyright and Related Rights\b",
        r"(?i)^copyright by Section\b",
        r"(?i)^Copyright The GNOME\b",
        r"(?i)^Copyright The$",
        r"(?i)^Copyright notices\b",
        r"(?i)^copyright to$",
        r"(?i)^copyrights in$",
        r"(?i)^copyright to the\b",
        r"(?i)^copyrighted \(with\b",
        r"(?i)^\(Copyright notice\)",
        r"(?i)^COPYRIGHT HOLDER ALLOWS\b",
        r"(?i)^copyright holders?,? disclaims?\b",
        r"(?i)\bwe do not list the\b",
        r"(?i)\bno-warranty notice unaltered\b",
        r"(?i)\bprovides the program as\b",
        r"(?i)\breferring to the person\b",
        r"(?i)\bderivatives of$",
        r"(?i)^copyright in$",
        r"(?i)^copyright and other$",
        r"(?i)\bline and a pointer to where\b",
        r"(?i)\binterest in the program\b",
        r"(?i)\binterest in the library\b",
        r"(?i)\bhas no obligation to provide maintenance\b",
        r"(?i)^be liable to\b",
        r"(?i)\bthe respective terms and conditions\b",
        r"(?i)\bthe terms and conditions of the copyright\b",
        r"(?i)\bwho places the library\b",
        r"(?i)\bthe library among them\b",
        r"(?i)\bdisclaimer for the library\b",
        r"(?i)\bprofile authors\s+@remark",
        r"(?i)\banybody can make use of my programs\b",
        r"(?i)\bof computers and typesetting\b",
        r"(?i)^copyright the library,?$",
        r"(?i)^\(c\) endif$",
        r"(?i)^endif$",
        r"(?i)^\(c\) \?$",
        r"(?i)^\(c\) [a-z]$",
        r"(?i)^[a-z]$",
        r"(?i)^\(c\) [a-z] [a-z]$",
        r"(?i)^[a-z] [a-z]$",
        r"(?i)^\(c\) ISLOWER$",
        r"(?i)^ISLOWER$",
        r"(?i)^\(c\) - [a-z]$",
        r"(?i)^0$",
        r"(?i)^\(c\) 0$",
        // Keep year-only copyright lines: ScanCode reference fixtures expect these.
        r"(?i)^year\(\d{4}\)\.format\b",
        r"(?i)^SSY$",
        r"(?i)^Object$",
        // "Copyright Holder as/to/the" boilerplate
        r"(?i)^copyright holder as specified\b",
        r"(?i)^copyright holder to\b",
        r"(?i)^copyright holder,? the\b",
        r"(?i)^copyrights as noted\b",
        r"(?i)^COPYRIGHT DOCUMENTATION\b",
        r"(?i)^COPYRIGHT STATEMENTS\b",
        r"(?i)^copyright and other intellectual\b",
        r"(?i)^copyright treaties\b",
        // (c) followed by code-like constructs
        r"(?i)^\(c\) [\!\?&\|\.;:,\+\-\*/<>=]",
        r"(?i)^\(c\) [\w]+\.\w+\(",
        r"(?i)^\(c\) [\w]+\[",
        r"(?i)^\(c\) &&",
        r"(?i)^\(c\) \|\|",
        r"(?i)^\(c\) [\w]+\?",
        r"(?i)^\(c\)\s+[A-Za-z_][A-Za-z0-9_]*\s*\?\s*[A-Za-z0-9_()><=+\-*/&|]+\s*:\s*[A-Za-z0-9_()><=+\-*/&|]+\s*$",
        r"(?i)^\(c\) [\w]+\.[\w]+\.",
        r"(?i)^\(c\) [\w]+\([\w,]+\)",
        // (c) followed by short gibberish (1-3 mixed-case chars) from binary data
        r"^\(c\) [A-Z][a-z]{1,2}$",
        // (c) followed by "Unknown" (binary/PDF artifacts)
        r"(?i)^\(c\) Unknown\b",
        // (c) followed by binary/garbled data patterns
        r"^\(c\) [^\x20-\x7E]",
        r"^\(c\) [\x00-\x1F]",
        r"^\(c\) [A-Z][a-z]+ d [A-Z][a-z]+$",
        r"^\(c\) [A-Z]{2,}[0-9]",
        r"^\(c\) [a-z]{1,3}$",
        // (c) followed by C code patterns
        r"(?i)^\(c\) c -",
        r"(?i)^\(c\) c TOUPPER",
        r"(?i)^\(c\) isascii",
        r"(?i)^\(c\) isupper",
        r"(?i)^\(c\) isdigit",
        r"(?i)^\(c\) isalnum",
        r"(?i)^\(c\) isalpha",
        r"(?i)^\(c\) isspace",
        r"(?i)^\(c\) iscntrl",
        r"(?i)^\(c\) isprint",
        r"(?i)^\(c\) ifdef",
        r"(?i)^\(c\) undef\b",
        r"(?i)^\(c\) endif\b",
        r"(?i)^\(c\) sgn\b",
        r"(?i)^\(c\) dst",
        r"(?i)^\(c\) ptr\b",
        r"(?i)^\(c\) slen\b",
        r"(?i)^\(c\) len\b",
        r"(?i)^\(c\) do$",
        r"(?i)^\(c\) uint",
        r"(?i)^\(c\) gunichar\b",
        r"(?i)^\(c\) TRUE FALSE",
        r"(?i)^\(c\) yyunput\b",
        r"(?i)^\(c\) yylval\b",
        r"(?i)^\(c\) ungetc\b",
        r"(?i)^\(c\) 0x[0-9a-fA-F]",
        r"(?i)^\(c\) \(\(unsigned",
        r"(?i)^\(c\) \(int\)",
        r"(?i)^\(c\) \(uint",
        r"(?i)^\(c\) \(s\)",
        r"(?i)^\(c\) \d+ \(\(", // "(c) 16 ((d) 24)"
        r"(?i)^\(c\) \d+ &",    // "(c) 6 (trail&0x3f)"
        r"(?i)^\(c\)\s+[A-Za-z_][A-Za-z0-9_]*\s*(?:&|\||\^|>>|<<)\s*(?:0x[0-9A-Fa-f]+|\d+)\b",
        r"(?i)^\(c\)\s+[A-Za-z_][A-Za-z0-9_]*\s*(?:\|=|&=|\^=|>>=|<<=)\s*(?:0x[0-9A-Fa-f]+|\d+)\b",
        r"(?i)^\(c\) strict\b",
        r"(?i)^\(c\) width\b",
        r"(?i)^\(c\) arg\b",
        r"(?i)^\(c\) cindex\b",
        r"(?i)^\(c\) foot-",
        r"(?i)^\(c\) put\b",
        r"(?i)^\(c\) DEBUGP\b",
        r"(?i)^\(c\) Chain\b",
        r"(?i)^\(c\) Only\b",
        r"(?i)^\(c\) Walked\b",
        r"(?i)^\(c\) Construct\b",
        r"(?i)^\(c\) p can\b",
        r"(?i)^\(c\) c\.warn\b",
        r"(?i)^\(c\) b\.status\b",
        r"(?i)^\(c\) table\.set\b",
        r"(?i)^\(c\) in$",
        r"(?i)^\(c\) macro\b",
        r"(?i)^\(c\) decoded\b",
        r"(?i)^\(c\) IP_VS",
        r"(?i)^\(c\) Like\b",
        r"(?i)^\(c\) Page\b",
        r"(?i)^\(c\) WITH\b",
        r"(?i)^\(c\) \(1\b",
        r"(?i)^\(c\) \(2\)",
        r"(?i)^\(c\) \(MON\b",
        r"(?i)^\(c\) M this\b",
        r"(?i)^\(c\) \(0,",
        // (c) followed by PDF/PostScript artifacts
        r"(?i)^\(c\) Tj\b",
        r"(?i)^\(c\) ET\b",
        r"(?i)^\(c\) Registered$",
        // (c) followed by garbled/encoded text
        r"^\(c\) uL",
        r"^\(c\) [¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ]",
        r"^\(c\) .*ÿÿÿ",
        r"^\(c\) .*°°°",
        // (c) followed by license/legal boilerplate
        r"(?i)^\(c\) Inclusion\b",
        r"(?i)^\(c\) Whenever\b",
        r"(?i)^\(c\) Customer",
        r"(?i)^\(c\) Splunk\b",
        r"(?i)^\(c\) No$",
        r"(?i)^\(c\) CockroachDB\b",
        r"(?i)^\(c\) Custom Nessus\b",
        r"(?i)^\(c\) Products\.",
        r"(?i)^\(c\) \u{201c}", // left double quotation mark
        // (c) followed by number-only patterns (not years)
        r"^\(c\) \d{1,2}$",
        r"^\(c\) \d+ \d+ y\b",
        // (c) followed by PostScript/font data
        r"(?i)^\(c\) SS'",
        r"(?i)^\(c\) PSPSY",
        r"(?i)^\(c\) PSY$",
        r"(?i)^\(c\) a! ",
        r"(?i)^\(c\) aae\b",
        r"(?i)^\(c\) \(r\)",
        r"(?i)^\(c\) D'O\b",
        r"(?i)^\(c\) AT r'b",
        r"(?i)^\(c\) C,BLACK",
        r"(?i)^\(c\) hUja\b",
        r"(?i)^\(c\) NULL$",
        r"(?i)^\(c\) cc\.fr",
        r"(?i)^\(c\) Oo2\b",
        r"(?i)^\(c\) UOSSOO",
        r"(?i)^\(c\) q ltd",
        r"(?i)^\(c\) zbar",
        r"(?i)^\(c\) distributed$",
        r"(?i)^\(c\) \(tm\)",
        r"(?i)^\(c\) ,\s*,",
        r"(?i)^\(c\) notice\b",
        r"(?i)^\(c\) create\b",
        r"(?i)^\(c\) do not\b",
        r"(?i)^\(c\) give\b",
        r"(?i)^copyright logo\b",
        r"(?i)^copyright targetpath\b",
        r"(?i)^copyright \(xmlns\b",
        r"(?i)^copyright its authors\b",
        r"(?i)^\(copyright\s*\)\b",
        r"(?i)^copyright the product\b",
        r"(?i)^copyright year\b.*\bfor\b",
        r"(?i)^copyrights? and licenses\b",
        r"(?i)^copyright applied to\b",
        r"(?i)^copyrighted material,\b",
        r"(?i)^copyright is\b",
        r"(?i)^\(c\) of the\b",
        r"(?i)^\(c\) other$",
        r"(?i)^\(c\) dates of\b",
        r"(?i)^\(c\) improved syntax\b",
        r"(?i)^\(c\),?\s*,",
        r"(?i)^\(c\),?\s*group\b",
        r"(?i)^\(c\),?\s*count\b",
        r"(?i)^\(c\),?\s*b\s",
        r"(?i)^\(c\),?\s*c$",
        r"(?i)^copyright act\b",
        r"(?i)^copyright for$",
        r"(?i)^copyright holder for the\b",
        r"(?i)^copyright man page\b",
        r"(?i)^copyright s status\b",
        r"(?i)^copyright and things like\b",
        r"(?i)^copyrights cover\b",
        r"(?i)^copyrights in the original\b",
        r"(?i)^copyrights in the portions\b",
        r"(?i)^copyrighted$",
        r"(?i)^copyright tue\b",
        r"(?i)^copyright sign\b",
        r"(?i)^c.opylefted\b",
        r"(?i)^i\.\s*\(c\)\b",
        r"(?i)^u1e\s*\(c\)\b",
        r"(?i)^xz\b.*\(c\)\b",
        r"^\(c\) [A-Z]{3,}[a-z]{1,3}$",
        r"^\(c\) [A-Z][a-z][A-Z][a-z]",
        r"^\(c\) [A-Z]{2}[a-z][A-Z]",
        r"^\(c\) [A-Z][A-Z][a-z][a-z][a-z]?[A-Z]",
        r"(?i)^copyright info have been\b",
        r"(?i)^\(copyright\s*\)\s*gnu general\b",
        r"(?i)^\(copyright\b.*\bvoltagefactor\b",
        r"(?i)^\(copyright unasserted\)\b",
        r"(?i)^copyright the lavantech\b",
        r"(?i)^copyright year united states\b",
        r"(?i)^copyright 1991-\d+ imatix\b.*\bwith exception\b",
        r"(?i)^\(c\) io\\0",
        r"(?i)^\(c\) ecfieldelement\b",
        r"(?i)^\(c\) distributed\b",
        r"(?i)^\(c\) yyyy\b",
        r"(?i)^\(c\) rebel\b",
        r"(?i)^\(c\) metastuff\b",
        r"(?i)^\(c\) mihai\b",
        r"(?i)^\(c\) linux foundation\b.*\bunified\b",
        r"(?i)^\(c\) helge deller\b.*\bcopyright\b",
        r"(?i)^\(c\) hewlett-packard company$",
        r"(?i)^copyright \(c\) david j\. bradshaw$",
        r"(?i)^copyright \(c\) tim ruffles$",
        r"(?i)^copyright \(c\) gias kay lee$",
        r"(?i)^copyright \(c\) xerox corporation$",
        r"(?i)^copyright -+\s*copyright\b",
        r"(?i)^copyright \u{fffd}",
        r"(?i)^\u{fffd}\d+-\d+\b",
        r"(?i)^copyright \u{a9}\d",
        r"(?i)^copyrighted material,? only\b",
        r"(?i)^copyrights of the\b",
        r"(?i)^\(c\) p b i n do$",
        r"(?i)^\(c\) 2004-2009 pudn\.com\b",
        r"(?i)^.{1,5}\s*\(c\)\s*.{1,5}$",
        r"(?i)^swfobject\b.*\bcopyright\b",
        r"(?i)^the the oscar\b",
        r"(?i)^\(c\) 2004-2010$",
        r"(?i)^\(c\) 1997 m\. kirkwood converted\b",
        r"(?i)^\(c\) 1998 red hat tcp\b",
        r"(?i)^\(c\) 1999 david airlie\b.*\bbugfixes\b",
        r"(?i)^\(c\) 1998-2002 by heiko eissfeldt\b",
        r"(?i)^\(c\) 2001 dave jones\b",
        r"(?i)^\(c\) 2003-2004 paul clements\b",
        r"(?i)^\(c\) 2014-\$$",
        r"(?i)^copyright 2014-\$$",
        r"(?i)^copyright 2010 ben dooks fluff\b",
        r"(?i)^\(c\)\s*(indir|then|unacceptable)\b",
        r"(?i)^\(c\) c arg\b",
        r"(?i)^\(c\) @ ?(symrec|ungetc|yylval)\b",
        r"(?i)^\(c\) \(the parens\b",
        r"(?i)^\(c\) s-\d",
        r"(?i)^\(c\) register\b",
        r"(?i)^\(c\) Mouse Wheel\b",
        r"(?i)^copyright info$",
        r"(?i)^copyright for a\b",
        r"(?i)^COPYRIGHT HOLDERS AS\b",
        r"(?i)@remark Read",
        r"(?i)\bContact <\w+@\w+",
        r"(?i)^\d{1,2}$",
        r"(?i)^\(c\) yyunput\b",
        r"(?i)^\(c\) yylval\b",
        r"(?i)^IsLower\s*\(c\)\s*IsDigit\b",
        r"(?i)^copyright \d{4}-\d{2}-\d{2}\s+\d{2}:\d{2}\b",
        r"(?i)^Copyright \(c\) \d{4} Contributors$",
        r"(?i)^ds Status works\b",
        r"(?i)^Copyright \(c\) The team$",
        r"(?i)^holder\.\s*AS\b",
        r"(?i)^as\(c,\s*field\b",
        r"(?i)^skb\.\s*The buffer\b",
        r"(?i)^partial mlock\b",
        r"(?i)^\(c\) \(c\) \(c\) SSY",
        r"(?i)^\(c\) \(c\) 2AICAA",
        r"(?i)^\(c\) \d{4} \$$",
        r"(?i)^\(c\) \d{4} - Rear\b",
        r"(?i)^copyrights?,? to$",
        r"(?i)^Copyright \(c\) \d{4} kavol$",
        // (c) followed by C variable/type patterns
        r"(?i)^\(c\) (unsigned|int|char|void|long|short|float|double|static|struct)\b",
        r"(?i)^\(c\) (classify|ctable|cvPoint|fWidth|macroptr|MAGIC)\b",
        r"(?i)^\(c\) (letters|ok letters)\b",
        r"(?i)^\(c\) (res|ret|run|save|sizeof|temp)\b",
        r"(?i)^\(c\) (flags|buffer|buflen)\b",
        r"(?i)^\(c\) (pr |prec |printf )\b",
        r"(?i)^\(c\) (Accumulate|Bit8u|Returns the|SkReplicate)\b",
        r"(?i)^\(c\) (asm|xlp|we copy)\b",
        r"(?i)^\(c\) (d \d|num \d|mat \d)\b",
        r"(?i)^\(c\) do (prec|while)\b",
        r"(?i)^\(c\) etc\b",
        r"(?i)^\(c\) Finn Thain\b.*\bCopying\b",
        r"(?i)^\(c\) Kasım\b",
        r"(?i)^\(c\) z \?$",
        r"(?i)^\(c\) Z \?$",
        r"(?i)^\(c\) \d+ \+0x",
        r"(?i)^\(c\) \d+ static\b",
        r"(?i)^\(c\) 0-9",
        r"(?i)^\(c\) 122$",
        r"(?i)^\(c\) \d+ endif\b",
        r"(?i)^\(c\) \(c&",
        r"(?i)^\(c\) \(cp\)",
        r"(?i)^\(c\) \( cp\)",
        r"(?i)^\(c\)\s*\(\s*(?:const\s+)?(?:signed\s+|unsigned\s+)?(?:char|short|int|long|float|double|void|size_t|ssize_t|uintptr_t|intptr_t|u?int(?:8|16|32|64)_t)\s*(?:\*+\s*)?\)\s*[A-Za-z_(]",
        r"(?i)^\(c\) \(l\)",
        r"(?i)^\(c\) \(out\.\b",
        r"(?i)^\(c\) \(run\)",
        r"(?i)^\(c\) \(scale\b",
        r"(?i)^\(c\) \^ \(",
        r"(?i)^\(c\) \(DBus",
        r"(?i)^\(c\) c c c\b",
        r"(?i)^\(c\) c toascii\b",
        r"(?i)^\(c\) c tolower\b",
        r"(?i)^\(c\) c \(qbuf\b",
        r"(?i)^\(c\) c / endif\b",
        r"(?i)^\(c\) c \^ 0x",
        r"(?i)^\(c\) c 03o\b",
        r"(?i)^\(c\) c 0x\d",
        r"(?i)^\(c\) this-\b",
        r"(?i)^\(c\) putchar\b",
        // (c) followed by year + trailing junk
        r"(?i)^\(c\) \d{4}(-\d{4})? Jean-loup Gailly\b.*\b(END|VALUE)\b",
        r"(?i)^\(c\) \d{4}(-\d{4})? Julian Seward\b.*\btitle\b",
        r"(?i)^\(c\) \d{4} Paul Rusty Russell\b.*\bPlaced\b",
        r"(?i)^\(c\) \d{4} Dan Potter\b.*\bmodify\b",
        r"(?i)^\(c\) \d{4} Red Hat\.\s*GPLd\b",
        r"(?i)^\(c\) \d{4}-\d{4}$",
        r"(?i)^\(c\) \d{4} Andreas Gruenbacher\b.*\bgruenbacher@\b",
        r"(?i)^\(c\) \d{4},?\s*\d{4},?\s*\d{4} Thomas Vander Stichele\b",
        r"(?i)^\(c\) \d{4} Adam Nielsen\b.*\bniel?sen@\b",
        r"(?i)^\(c\) \d+ \(trail",
        r"(?i)^\(c\) 4\+\(r\)",
        // copyright followed by non-copyright text
        r"(?i)^copyright :G2P\b",
        r"(?i)^copyright \d+ trademark\b",
        r"(?i)^copyright 60$",
        r"(?i)^copyright ACM and IEEE\b",
        r"(?i)^copyright and mit$",
        r"(?i)^copyright and placed into\b",
        r"(?i)^copyright and to distribute\b",
        r"(?i)^copyright as follows\b",
        r"(?i)^copyright definedummyword\b",
        r"(?i)^copyright FILE\b",
        r"(?i)^copyright info to be\b",
        r"(?i)^copyright mea-\b",
        r"(?i)^copyright meta-\b",
        r"(?i)^copyright others$",
        r"(?i)^copyright problem,?\b",
        r"(?i)^copyright SGI\b",
        r"(?i)^copyright to help\b",
        r"(?i)^copyright year to\b",
        r"(?i)^copyrighted - provided\b",
        r"(?i)^copyrighted by the following\b",
        r"(?i)^copyrighted software$",
        r"(?i)^copyrighted work\b",
        r"(?i)^copyrights apply\b",
        r"(?i)^copyrights to use\b",
        // Non-copyright holder-like strings that are false positives
        r"(?i)^count count\b",
        r"(?i)^const char\b",
        r"(?i)^int\s",
        r"(?i)^int$",
        r"(?i)^lack of warranty\b",
        r"(?i)^macro for checking\b",
        r"(?i)^mat \d\b",
        r"(?i)^MD5Update\b",
        r"(?i)^message$",
        r"(?i)^Nuance Communications,? but\b",
        r"(?i)^NULL,? \d",
        r"(?i)^placed into PD\b",
        r"(?i)^preserved in its entirety\b",
        r"(?i)^Protocol Engineering Lab\b",
        r"(?i)^ptr$",
        r"(?i)^Regents of the University\b.*\bBerkeley Software\b",
        r"(?i)^res$",
        r"(?i)^ret$",
        r"(?i)^run$",
        r"(?i)^sgn$",
        r"(?i)^sizeof$",
        r"(?i)^SIGN\(b\)",
        r"(?i)^strict forbid\b",
        r"(?i)^terms and conditions$",
        r"(?i)^toascii$",
        r"(?i)^tolower$",
        r"(?i)^trademark acute\b",
        r"(?i)^TRADEMARK \d+NOTICES\b",
        r"(?i)^true$",
        r"(?i)^unacceptable$",
        r"(?i)^unsigned\s+(char|int|long|short|b|g|r|sb|sg)\b",
        r"(?i)^we copy data\b",
        r"(?i)^work$",
        r"(?i)^wide$",
        r"(?i)^joint with$",
        r"^others$",
        r"(?i)^symbol,? for example\b",
        r"(?i)^the shared library will be\b",
        r"(?i)^SkReplicateNibble\b",
        r"(?i)^Returns the (multiplicative|product)\b",
        r"(?i)^Walked too far\b",
        r"(?i)^xlp xep\b",
        r"(?i)^yyunput\b",
        r"(?i)^yylval\b",
        r"(?i)^\?1:0$",
        r"(?i)^\(\(DBus",
        r"(?i)^\(unsigned char\)",
        r"(?i)^16 \(\(d\)\b",
        r"(?i)^l \(unsigned\b",
        r"(?i)^\(\(unsigned\b",
        // ICS false positive copyrights
        r"(?i)^\(c\) \(unsigned int\)",
        r"(?i)^\(c\) A &&",
        r"(?i)^\(c\) a &&",
        r"(?i)^COPYRIGHT undef\b",
        r"(?i)^\(c\) \(\(DBusCondVar",
        r"(?i)^\(c\) s-$",
        r"(?i)^\(c\) A1$",
        r"(?i)^\(c\) this-\s*set\w+\b",
        r"(?i)^\(c\) \(unsigned\)$",
        r"(?i)^COPYRIGHT CREDITS\b",
        r"(?i)^COPYRIGHT HOLDERS,?\s*AND/OR\b",
        r"(?i)^COPYRIGHT exploring\b",
        r"(?i)^Copyright,?\s*lack of warranty\b",
        r"(?i)^COPYRIGHT const char\b",
        r"(?i)^copyright const char\b",
        r"(?i)^copyright mea-\s*setOffset\b",
        r"(?i)^copyright meta-\s*registerClass\b",
        r"(?i)^\(c\) \(unsigned char\)\(",
        r"(?i)^\(c\) \d+L$",
        r"(?i)^\(c\) cvPoint3D32f$",
        r"(?i)^\(c\) temp3$",
        r"(?i)^http://\S+\s+Copyright\b",
        r"(?i)^Foundation Copyright\b",
        r"(?i)^http://sizzlejs\b",
        r"(?i)^\(c\) \(unsigned char\)$",
        r"(?i)@remark Read",
        r"(?i)\bWritten by\b",
        r"(?i)\bcontributors Thomas Broyer\b",
        r"(?i), and are$",
        // Garbled/binary data patterns (junk-copyright-* tests)
        r"^\(c\) Io\\0",
        r"^\(c\) AaeaMOOAA\d",
        r"^\(c\) EEIaeIaAAOAE",
        r"^\(c\) AaACEEeUB",
        r"^\(c\) AIuaey",
        r"^\(c\) ATo\b",
        r"^\(c\) U Q\d",
        r"^\(c\) Vo\b.*\bAoa\b",
        r"^\(c\) Y Rd$",
        r"^\(c\) YY ThQ",
        r"^\(c\) ZIgd\d",
        r"^\(c\) OCOthDTh",
        r"^\(c\) IoUOi",
        r"^\(c\) OthO$",
        r"^\(c\) ErXA\d",
        r"(?i)^\(c\) Dean$",
        r"(?i)^Copyright \(c\) The team$",
        r"^\(c\) 1 \?\d",
        r"^\(c\) 34 b$",
        r"^\(c\) A - 10 a - 10$",
        r"(?i)^\(c\) AS z$",
        // French legal text fragments
        r"(?i)^\(c\) dig[ÃA]",
        r"(?i)^\(c\) que le pr[ÃA]",
        r"(?i)^\(c\) s en anglais",
        r"(?i)^\(c\) sent contrat\b",
        // Garbled text with (c) in middle
        r"(?i)^Xz\b.*\(c\)\s*Ijr",
        // Binary data from image files
        r"^\(c\) [^\x20-\x7e]{2}",
        r"(?i)^COPYRIGHT AS$",
        r"^\(c\) E QuGU",
        r"^\(c\) YY$",
        // (c) followed by non-ASCII byte (binary garbage from image/font files)
        r"^\(c\) [a-zA-Z]{1,3}[\x00-\x1f\x80-\xff]",
        r"[\x00-\x08]",
        r"(?i)^copyright\s+\d{4}\s+www\.\S+",
        r"-{5,}",
        r"(?i)\bjornada\s+\d+$",
        r"(?i)^BSD\s+\d+\s+clause\b",
        // Dollar-sign placeholder year (e.g. "Copyright (c) 2011 $ new", "Copyright 2014 $")
        r"(?i)^copyright\s*(?:\(c\)\s*)?(?:19|20)\d{2}\s*\$",
        // Product names with (c) in the middle (not a real copyright)
        r"(?i)^Creative\s+Card\s+\d",
        // "(c)" after "marked" — product description, not a copyright
        r"(?i)\bmarked\s+\(c\)",
        // Specific junk from copyrights-to-fix.txt (Python reference has this exact pattern)
        r"(?i)^Copyright\s+\(c\)\s+2021\s+Dot\b",
        r"(?i)^copyright\s+\d{4}\s+[a-z][a-z0-9_-]+\s+[a-z][a-z0-9_-]+@\S+",
        r"(?i)^\(c\)\s*(?:19|20)\d{2}\s+@author\b.*$",
        r"(?i)^copyrights?$",
        r"(?i)^copyrights?,\s*licenses?,\s+and/or\s*$",
        r"(?i)^copyrighted,?\s+but\s+its\s+distribution\b.*$",
        r"(?i)^COPYRIGHT\s+(?:NOTICE|HOLDER|STATEMENT|OWNER|INFORMATION|HEADER|BLOCK|TEXT|YEAR|DATE|NAME|SYMBOL|SIGN|MARK|TAG|LABEL|LINE|SECTION|CLAUSE|TERMS|POLICY|LAWS?|RULES?|RIGHTS?|LAWS?)\s*$",
        r"^COPYRIGHT\s+[A-Z0-9]{2,}\s*$",
        r"(?i)\bcopyright\b.*@var\b",
        r"(?i)\$timestamp\b",
        r"(?i)^copyrights?,\s*patents?\b",
        r"(?i)^copyright\s*,\s*(?:version|etc)\b",
        r"(?i)^not\s+copyrighted\s*[-–]\s*provided\s+to\s+the\s+public\s+domain\b",
        r"(?i)^copyright\s+and\s+related\s+rights\b",
        r"(?i)^copyright\s+and\s+related\s+or\s+neighboring\s+rights$",
        r"(?i)^copyright\s+and\s+related\s+or\s+neighboring\s+legal\s+rights\b.*$",
        r"(?i)^copyright\s+was\s+owned\s+solely\s+by\s+fsf$",
        r"(?i)^copyright\s+years\s+may\s+be\s+listed$",
        r"(?i)^\(c\)\s+final\s+[a-z_][a-zA-Z0-9_]*$",
        r"(?i)^copyright\s+referencing\b.*$",
        r"(?i)^copyright\s+and\s+comment\s+directing\b.*$",
    ];
    patterns.iter().filter_map(|p| Regex::new(p).ok()).collect()
});