socketdev 3.0.0__py3-none-any.whl

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.
@@ -0,0 +1,2101 @@
1
+ import json
2
+
3
+
4
+ __all__ = [
5
+ "AllIssues",
6
+ "badEncoding",
7
+ "badSemver",
8
+ "badSemverDependency",
9
+ "bidi",
10
+ "binScriptConfusion",
11
+ "chronoAnomaly",
12
+ "criticalCVE",
13
+ "cve",
14
+ "debugAccess",
15
+ "deprecated",
16
+ "deprecatedException",
17
+ "explicitlyUnlicensedItem",
18
+ "unidentifiedLicense",
19
+ "noLicenseFound",
20
+ "copyleftLicense",
21
+ "nonpermissiveLicense",
22
+ "miscLicenseIssues",
23
+ "deprecatedLicense",
24
+ "didYouMean",
25
+ "dynamicRequire",
26
+ "emptyPackage",
27
+ "envVars",
28
+ "extraneousDependency",
29
+ "fileDependency",
30
+ "filesystemAccess",
31
+ "gitDependency",
32
+ "gitHubDependency",
33
+ "hasNativeCode",
34
+ "highEntropyStrings",
35
+ "homoglyphs",
36
+ "httpDependency",
37
+ "installScripts",
38
+ "gptSecurity",
39
+ "gptAnomaly",
40
+ "gptMalware",
41
+ "potentialVulnerability",
42
+ "invalidPackageJSON",
43
+ "invisibleChars",
44
+ "licenseChange",
45
+ "licenseException",
46
+ "longStrings",
47
+ "missingTarball",
48
+ "majorRefactor",
49
+ "malware",
50
+ "manifestConfusion",
51
+ "mediumCVE",
52
+ "mildCVE",
53
+ "minifiedFile",
54
+ "missingAuthor",
55
+ "missingDependency",
56
+ "missingLicense",
57
+ "mixedLicense",
58
+ "ambiguousClassifier",
59
+ "modifiedException",
60
+ "modifiedLicense",
61
+ "networkAccess",
62
+ "newAuthor",
63
+ "noAuthorData",
64
+ "noBugTracker",
65
+ "noREADME",
66
+ "noRepository",
67
+ "noTests",
68
+ "noV1",
69
+ "noWebsite",
70
+ "nonFSFLicense",
71
+ "nonOSILicense",
72
+ "nonSPDXLicense",
73
+ "notice",
74
+ "obfuscatedFile",
75
+ "obfuscatedRequire",
76
+ "peerDependency",
77
+ "semverAnomaly",
78
+ "shellAccess",
79
+ "shellScriptOverride",
80
+ "suspiciousString",
81
+ "telemetry",
82
+ "trivialPackage",
83
+ "troll",
84
+ "typeModuleCompatibility",
85
+ "uncaughtOptionalDependency",
86
+ "unclearLicense",
87
+ "shrinkwrap",
88
+ "unmaintained",
89
+ "unpublished",
90
+ "unresolvedRequire",
91
+ "unsafeCopyright",
92
+ "unstableOwnership",
93
+ "unusedDependency",
94
+ "urlStrings",
95
+ "usesEval",
96
+ "zeroWidth",
97
+ "floatingDependency",
98
+ "unpopularPackage",
99
+ ]
100
+ class badEncoding:
101
+ description: str
102
+ props: dict
103
+ suggestion: str
104
+ title: str
105
+ emoji: str
106
+ nextStepTitle: str
107
+
108
+ def __init__(self):
109
+ self.description = "Source files are encoded using a non-standard text encoding."
110
+ self.props = {"encoding": "Encoding"}
111
+ self.suggestion = "Ensure all published files are encoded using a standard encoding such as UTF8, UTF16, UTF32, SHIFT-JIS, etc."
112
+ self.title = "Bad text encoding"
113
+ self.emoji = "\u26a0\ufe0f"
114
+ self.nextStepTitle = "What is bad text encoding?"
115
+
116
+ def __str__(self):
117
+ return json.dumps(self.__dict__)
118
+
119
+
120
+ class badSemver:
121
+ description: str
122
+ suggestion: str
123
+ title: str
124
+ emoji: str
125
+ nextStepTitle: str
126
+
127
+ def __init__(self):
128
+ self.description = "Package version is not a valid semantic version (semver)."
129
+ self.suggestion = "All versions of all packages on npm should use use a valid semantic version. Publish a new version of the package with a valid semantic version. Semantic version ranges do not work with invalid semantic versions."
130
+ self.title = "Bad semver"
131
+ self.emoji = "\u26a0\ufe0f"
132
+ self.nextStepTitle = "What is bad semver?"
133
+
134
+ def __str__(self):
135
+ return json.dumps(self.__dict__)
136
+
137
+
138
+ class badSemverDependency:
139
+ description: str
140
+ props: dict
141
+ suggestion: str
142
+ title: str
143
+ emoji: str
144
+ nextStepTitle: str
145
+
146
+ def __init__(self):
147
+ self.description = "Package has dependencies with an invalid semantic version. This could be a sign of beta, low quality, or unmaintained dependencies."
148
+ self.props = {"packageName": "Package name", "packageVersion": "Package version"}
149
+ self.suggestion = "Switch to a version of the dependency with valid semver or override the dependency version if it is determined to be problematic."
150
+ self.title = "Bad dependency semver"
151
+ self.emoji = "\u26a0\ufe0f"
152
+ self.nextStepTitle = "What is bad dependency semver?"
153
+
154
+ def __str__(self):
155
+ return json.dumps(self.__dict__)
156
+
157
+
158
+ class bidi:
159
+ description: str
160
+ suggestion: str
161
+ title: str
162
+ emoji: str
163
+ nextStepTitle: str
164
+
165
+ def __init__(self):
166
+ self.description = "Source files contain bidirectional unicode control characters. This could indicate a Trojan source supply chain attack. See: trojansource.codes for more information."
167
+ self.suggestion = "Remove bidirectional unicode control characters, or clearly document what they are used for."
168
+ self.title = "Bidirectional unicode control characters"
169
+ self.emoji = "\u26a0\ufe0f"
170
+ self.nextStepTitle = "What are bidirectional unicode control characters?"
171
+
172
+ def __str__(self):
173
+ return json.dumps(self.__dict__)
174
+
175
+
176
+ class binScriptConfusion:
177
+ description: str
178
+ props: dict
179
+ suggestion: str
180
+ title: str
181
+ emoji: str
182
+ nextStepTitle: str
183
+
184
+ def __init__(self):
185
+ self.description = "This package has multiple bin scripts with the same name. This can cause non-deterministic behavior when installing or could be a sign of a supply chain attack"
186
+ self.props = {"binScript": "Bin script"}
187
+ self.suggestion = "Consider removing one of the conflicting packages. Packages should only export bin scripts with their name"
188
+ self.title = "Bin script confusion"
189
+ self.emoji = "\ud83d\ude35\u200d\ud83d\udcab"
190
+ self.nextStepTitle = "What is bin script confusion?"
191
+
192
+ def __str__(self):
193
+ return json.dumps(self.__dict__)
194
+
195
+
196
+ class chronoAnomaly:
197
+ description: str
198
+ props: dict
199
+ suggestion: str
200
+ title: str
201
+ emoji: str
202
+ nextStepTitle: str
203
+
204
+ def __init__(self):
205
+ self.description = "Semantic versions published out of chronological order."
206
+ self.props = {"prevChronoDate": "Previous chronological date", "prevChronoVersion": "Previous chronological version", "prevSemverDate": "Previous semver date", "prevSemverVersion": "Previous semver version"}
207
+ self.suggestion = "This could either indicate dependency confusion or a patched vulnerability."
208
+ self.title = "Chronological version anomaly"
209
+ self.emoji = "\u26a0\ufe0f"
210
+ self.nextStepTitle = "What is a chronological version anomaly?"
211
+
212
+ def __str__(self):
213
+ return json.dumps(self.__dict__)
214
+
215
+
216
+ class criticalCVE:
217
+ description: str
218
+ props: dict
219
+ suggestion: str
220
+ title: str
221
+ emoji: str
222
+ nextStepTitle: str
223
+
224
+ def __init__(self):
225
+ self.description = "Contains a Critical Common Vulnerability and Exposure (CVE)."
226
+ self.props = {"cveId": "CVE ID", "cwes": "CWEs", "cvss": "CVSS", "description": "Description", "firstPatchedVersionIdentifier": "Patched version", "ghsaId": "GHSA ID", "id": "Id", "severity": "Severity", "title": "Title", "url": "URL", "vulnerableVersionRange": "Vulnerable versions"}
227
+ self.suggestion = "Remove or replace dependencies that include known critical CVEs. Consumers can use dependency overrides or npm audit fix --force to remove vulnerable dependencies."
228
+ self.title = "Critical CVE"
229
+ self.emoji = "\u26a0\ufe0f"
230
+ self.nextStepTitle = "What is a critical CVE?"
231
+
232
+ def __str__(self):
233
+ return json.dumps(self.__dict__)
234
+
235
+
236
+ class cve:
237
+ description: str
238
+ props: dict
239
+ suggestion: str
240
+ title: str
241
+ emoji: str
242
+ nextStepTitle: str
243
+
244
+ def __init__(self):
245
+ self.description = "Contains a high severity Common Vulnerability and Exposure (CVE)."
246
+ self.props = {"cveId": "CVE ID", "cwes": "CWEs", "cvss": "CVSS", "description": "Description", "firstPatchedVersionIdentifier": "Patched version", "ghsaId": "GHSA ID", "id": "Id", "severity": "Severity", "title": "Title", "url": "URL", "vulnerableVersionRange": "Vulnerable versions"}
247
+ self.suggestion = "Remove or replace dependencies that include known high severity CVEs. Consumers can use dependency overrides or npm audit fix --force to remove vulnerable dependencies."
248
+ self.title = "High CVE"
249
+ self.emoji = "\u26a0\ufe0f"
250
+ self.nextStepTitle = "What is a CVE?"
251
+
252
+ def __str__(self):
253
+ return json.dumps(self.__dict__)
254
+
255
+
256
+ class debugAccess:
257
+ description: str
258
+ props: dict
259
+ suggestion: str
260
+ title: str
261
+ emoji: str
262
+ nextStepTitle: str
263
+
264
+ def __init__(self):
265
+ self.description = "Uses debug, reflection and dynamic code execution features."
266
+ self.props = {"module": "Module"}
267
+ self.suggestion = "Removing the use of debug will reduce the risk of any reflection and dynamic code execution."
268
+ self.title = "Debug access"
269
+ self.emoji = "\u26a0\ufe0f"
270
+ self.nextStepTitle = "What is debug access?"
271
+
272
+ def __str__(self):
273
+ return json.dumps(self.__dict__)
274
+
275
+
276
+ class deprecated:
277
+ description: str
278
+ props: dict
279
+ suggestion: str
280
+ title: str
281
+ emoji: str
282
+ nextStepTitle: str
283
+
284
+ def __init__(self):
285
+ self.description = "The maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed."
286
+ self.props = {"reason": "Reason"}
287
+ self.suggestion = "Research the state of the package and determine if there are non-deprecated versions that can be used, or if it should be replaced with a new, supported solution."
288
+ self.title = "Deprecated"
289
+ self.emoji = "\u26a0\ufe0f"
290
+ self.nextStepTitle = "What is a deprecated package?"
291
+
292
+ def __str__(self):
293
+ return json.dumps(self.__dict__)
294
+
295
+
296
+ class deprecatedException:
297
+ description: str
298
+ props: dict
299
+ suggestion: str
300
+ title: str
301
+ emoji: str
302
+ nextStepTitle: str
303
+
304
+ def __init__(self):
305
+ self.description = "(Experimental) Contains a known deprecated SPDX license exception."
306
+ self.props = {"comments": "Comments", "exceptionId": "Exception id"}
307
+ self.suggestion = "Fix the license so that it no longer contains deprecated SPDX license exceptions."
308
+ self.title = "Deprecated SPDX exception"
309
+ self.emoji = "\u26a0\ufe0f"
310
+ self.nextStepTitle = "What is a deprecated SPDX exception?"
311
+
312
+ def __str__(self):
313
+ return json.dumps(self.__dict__)
314
+
315
+
316
+ class explicitlyUnlicensedItem:
317
+ description: str
318
+ props: dict
319
+ suggestion: str
320
+ title: str
321
+ emoji: str
322
+ nextStepTitle: str
323
+
324
+ def __init__(self):
325
+ self.description = "(Experimental) Something was found which is explicitly marked as unlicensed"
326
+ self.props = {"location": "Location"}
327
+ self.suggestion = "Manually review your policy on such materials"
328
+ self.title = "Explicitly Unlicensed Item"
329
+ self.emoji = "\u26a0\ufe0f"
330
+ self.nextStepTitle = "What do I need to know about license files?"
331
+
332
+ def __str__(self):
333
+ return json.dumps(self.__dict__)
334
+
335
+
336
+ class unidentifiedLicense:
337
+ description: str
338
+ props: dict
339
+ suggestion: str
340
+ title: str
341
+ emoji: str
342
+ nextStepTitle: str
343
+
344
+ def __init__(self):
345
+ self.description = "(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license"
346
+ self.props = {"comments": "Comments", "exceptionId": "Exception id", "location": "Location"}
347
+ self.suggestion = "Manually review the license contents."
348
+ self.title = "Unidentified License"
349
+ self.emoji = "\u26a0\ufe0f"
350
+ self.nextStepTitle = "What do I need to know about license files?"
351
+
352
+ def __str__(self):
353
+ return json.dumps(self.__dict__)
354
+
355
+
356
+ class noLicenseFound:
357
+ description: str
358
+ props: dict
359
+ suggestion: str
360
+ title: str
361
+ emoji: str
362
+ nextStepTitle: str
363
+
364
+ def __init__(self):
365
+ self.description = "(Experimental) License information could not be found"
366
+ self.props = {"comments": "Comments", "exceptionId": "Exception id"}
367
+ self.suggestion = "Manually review the licensing"
368
+ self.title = "No License Found"
369
+ self.emoji = "\u26a0\ufe0f"
370
+ self.nextStepTitle = "What do I need to know about license files?"
371
+
372
+ def __str__(self):
373
+ return json.dumps(self.__dict__)
374
+
375
+
376
+ class copyleftLicense:
377
+ description: str
378
+ props: dict
379
+ suggestion: str
380
+ title: str
381
+ emoji: str
382
+ nextStepTitle: str
383
+
384
+ def __init__(self):
385
+ self.description = "(Experimental) Copyleft license information was found"
386
+ self.props = {"comments": "Comments", "licenseId": "License Identifiers"}
387
+ self.suggestion = "Determine whether use of copyleft material works for you"
388
+ self.title = "Copyleft License"
389
+ self.emoji = "\u26a0\ufe0f"
390
+ self.nextStepTitle = "What do I need to know about license files?"
391
+
392
+ def __str__(self):
393
+ return json.dumps(self.__dict__)
394
+
395
+
396
+ class nonpermissiveLicense:
397
+ description: str
398
+ props: dict
399
+ suggestion: str
400
+ title: str
401
+ emoji: str
402
+ nextStepTitle: str
403
+
404
+ def __init__(self):
405
+ self.description = "(Experimental) A license not known to be considered permissive was found"
406
+ self.props = {"comments": "Comments", "licenseId": "License Identifier"}
407
+ self.suggestion = "Determine whether use of material not offered under a known permissive license works for you"
408
+ self.title = "Non-permissive License"
409
+ self.emoji = "\u26a0\ufe0f"
410
+ self.nextStepTitle = "What do I need to know about license files?"
411
+
412
+ def __str__(self):
413
+ return json.dumps(self.__dict__)
414
+
415
+
416
+ class miscLicenseIssues:
417
+ description: str
418
+ props: dict
419
+ suggestion: str
420
+ title: str
421
+ emoji: str
422
+ nextStepTitle: str
423
+
424
+ def __init__(self):
425
+ self.description = "(Experimental) A package's licensing information has fine-grained problems"
426
+ self.props = {"description": "Description", "location": "The location where the issue originates from"}
427
+ self.suggestion = "Determine whether use of material not offered under a known permissive license works for you"
428
+ self.title = "Nonpermissive License"
429
+ self.emoji = "\u26a0\ufe0f"
430
+ self.nextStepTitle = "What do I need to know about license files?"
431
+
432
+ def __str__(self):
433
+ return json.dumps(self.__dict__)
434
+
435
+
436
+ class deprecatedLicense:
437
+ description: str
438
+ props: dict
439
+ suggestion: str
440
+ title: str
441
+ emoji: str
442
+ nextStepTitle: str
443
+
444
+ def __init__(self):
445
+ self.description = "(Experimental) License is deprecated which may have legal implications regarding the package's use."
446
+ self.props = {"licenseId": "License id"}
447
+ self.suggestion = "Update or change the license to a well-known or updated license."
448
+ self.title = "Deprecated license"
449
+ self.emoji = "\u26a0\ufe0f"
450
+ self.nextStepTitle = "What is a deprecated license?"
451
+
452
+ def __str__(self):
453
+ return json.dumps(self.__dict__)
454
+
455
+
456
+ class didYouMean:
457
+ description: str
458
+ props: dict
459
+ suggestion: str
460
+ title: str
461
+ emoji: str
462
+ nextStepTitle: str
463
+
464
+ def __init__(self):
465
+ self.description = "Package name is similar to other popular packages and may not be the package you want."
466
+ self.props = {"alternatePackage": "Alternate package", "downloads": "Downloads", "downloadsRatio": "Download ratio", "editDistance": "Edit distance"}
467
+ self.suggestion = "Use care when consuming similarly named packages and ensure that you did not intend to consume a different package. Malicious packages often publish using similar names as existing popular packages."
468
+ self.title = "Possible typosquat attack"
469
+ self.emoji = "\ud83e\uddd0"
470
+ self.nextStepTitle = "What is a typosquat?"
471
+
472
+ def __str__(self):
473
+ return json.dumps(self.__dict__)
474
+
475
+
476
+ class dynamicRequire:
477
+ description: str
478
+ suggestion: str
479
+ title: str
480
+ emoji: str
481
+ nextStepTitle: str
482
+
483
+ def __init__(self):
484
+ self.description = "Dynamic require can indicate the package is performing dangerous or unsafe dynamic code execution."
485
+ self.suggestion = "Packages should avoid dynamic imports when possible. Audit the use of dynamic require to ensure it is not executing malicious or vulnerable code."
486
+ self.title = "Dynamic require"
487
+ self.emoji = "\u26a0\ufe0f"
488
+ self.nextStepTitle = "What is dynamic require?"
489
+
490
+ def __str__(self):
491
+ return json.dumps(self.__dict__)
492
+
493
+
494
+ class emptyPackage:
495
+ description: str
496
+ props: dict
497
+ suggestion: str
498
+ title: str
499
+ emoji: str
500
+ nextStepTitle: str
501
+
502
+ def __init__(self):
503
+ self.description = "Package does not contain any code. It may be removed, is name squatting, or the result of a faulty package publish."
504
+ self.props = {"linesOfCode": "Lines of code"}
505
+ self.suggestion = "Remove dependencies that do not export any code or functionality and ensure the package version includes all of the files it is supposed to."
506
+ self.title = "Empty package"
507
+ self.emoji = "\u26a0\ufe0f"
508
+ self.nextStepTitle = "What is an empty package?"
509
+
510
+ def __str__(self):
511
+ return json.dumps(self.__dict__)
512
+
513
+
514
+ class envVars:
515
+ description: str
516
+ props: dict
517
+ suggestion: str
518
+ title: str
519
+ emoji: str
520
+ capabilityName: str
521
+ nextStepTitle: str
522
+
523
+ def __init__(self):
524
+ self.description = "Package accesses environment variables, which may be a sign of credential stuffing or data theft."
525
+ self.props = {"envVars": "Environment variables"}
526
+ self.suggestion = "Packages should be clear about which environment variables they access, and care should be taken to ensure they only access environment variables they claim to."
527
+ self.title = "Environment variable access"
528
+ self.emoji = "\u26a0\ufe0f"
529
+ self.capabilityName = "environment"
530
+ self.nextStepTitle = "What is environment variable access?"
531
+
532
+ def __str__(self):
533
+ return json.dumps(self.__dict__)
534
+
535
+
536
+ class extraneousDependency:
537
+ description: str
538
+ props: dict
539
+ suggestion: str
540
+ title: str
541
+ emoji: str
542
+ nextStepTitle: str
543
+
544
+ def __init__(self):
545
+ self.description = "Package optionally loads a dependency which is not specified within any of the package.json dependency fields. It may inadvertently be importing dependencies specified by other packages."
546
+ self.props = {"name": "Name"}
547
+ self.suggestion = "Specify all optionally loaded dependencies in optionalDependencies within package.json."
548
+ self.title = "Extraneous dependency"
549
+ self.emoji = "\u26a0\ufe0f"
550
+ self.nextStepTitle = "What are extraneous dependencies?"
551
+
552
+ def __str__(self):
553
+ return json.dumps(self.__dict__)
554
+
555
+
556
+ class fileDependency:
557
+ description: str
558
+ props: dict
559
+ suggestion: str
560
+ title: str
561
+ emoji: str
562
+ nextStepTitle: str
563
+
564
+ def __init__(self):
565
+ self.description = "Contains a dependency which resolves to a file. This can obfuscate analysis and serves no useful purpose."
566
+ self.props = {"filePath": "File path", "packageName": "Package name"}
567
+ self.suggestion = "Remove the dependency specified by a file resolution string from package.json and update any bare name imports that referenced it before to use relative path strings."
568
+ self.title = "File dependency"
569
+ self.emoji = "\u26a0\ufe0f"
570
+ self.nextStepTitle = "What are file dependencies?"
571
+
572
+ def __str__(self):
573
+ return json.dumps(self.__dict__)
574
+
575
+
576
+ class filesystemAccess:
577
+ description: str
578
+ props: dict
579
+ suggestion: str
580
+ title: str
581
+ emoji: str
582
+ capabilityName: str
583
+ nextStepTitle: str
584
+
585
+ def __init__(self):
586
+ self.description = "Accesses the file system, and could potentially read sensitive data."
587
+ self.props = {"module": "Module"}
588
+ self.suggestion = "If a package must read the file system, clarify what it will read and ensure it reads only what it claims to. If appropriate, packages can leave file system access to consumers and operate on data passed to it instead."
589
+ self.title = "Filesystem access"
590
+ self.emoji = "\u26a0\ufe0f"
591
+ self.capabilityName = "filesystem"
592
+ self.nextStepTitle = "What is filesystem access?"
593
+
594
+ def __str__(self):
595
+ return json.dumps(self.__dict__)
596
+
597
+
598
+ class gitDependency:
599
+ description: str
600
+ props: dict
601
+ suggestion: str
602
+ title: str
603
+ emoji: str
604
+ nextStepTitle: str
605
+
606
+ def __init__(self):
607
+ self.description = "Contains a dependency which resolves to a remote git URL. Dependencies fetched from git URLs are not immutable can be used to inject untrusted code or reduce the likelihood of a reproducible install."
608
+ self.props = {"packageName": "Package name", "url": "URL"}
609
+ self.suggestion = "Publish the git dependency to npm or a private package repository and consume it from there."
610
+ self.title = "Git dependency"
611
+ self.emoji = "\ud83c\udf63"
612
+ self.nextStepTitle = "What are git dependencies?"
613
+
614
+ def __str__(self):
615
+ return json.dumps(self.__dict__)
616
+
617
+
618
+ class gitHubDependency:
619
+ description: str
620
+ props: dict
621
+ suggestion: str
622
+ title: str
623
+ emoji: str
624
+ nextStepTitle: str
625
+
626
+ def __init__(self):
627
+ self.description = "Contains a dependency which resolves to a GitHub URL. Dependencies fetched from GitHub specifiers are not immutable can be used to inject untrusted code or reduce the likelihood of a reproducible install."
628
+ self.props = {"commitsh": "Commit-ish (commit, branch, tag or version)", "githubRepo": "GitHub repo", "githubUser": "GitHub user", "packageName": "Package name"}
629
+ self.suggestion = "Publish the GitHub dependency to npm or a private package repository and consume it from there."
630
+ self.title = "GitHub dependency"
631
+ self.emoji = "\u26a0\ufe0f"
632
+ self.nextStepTitle = "What are GitHub dependencies?"
633
+
634
+ def __str__(self):
635
+ return json.dumps(self.__dict__)
636
+
637
+
638
+ class hasNativeCode:
639
+ description: str
640
+ suggestion: str
641
+ title: str
642
+ emoji: str
643
+ nextStepTitle: str
644
+
645
+ def __init__(self):
646
+ self.description = "Contains native code which could be a vector to obscure malicious code, and generally decrease the likelihood of reproducible or reliable installs."
647
+ self.suggestion = "Ensure that native code bindings are expected. Consumers may consider pure JS and functionally similar alternatives to avoid the challenges and risks associated with native code bindings."
648
+ self.title = "Native code"
649
+ self.emoji = "\ud83e\udee3"
650
+ self.nextStepTitle = "What's wrong with native code?"
651
+
652
+ def __str__(self):
653
+ return json.dumps(self.__dict__)
654
+
655
+
656
+ class highEntropyStrings:
657
+ description: str
658
+ suggestion: str
659
+ title: str
660
+ emoji: str
661
+ nextStepTitle: str
662
+
663
+ def __init__(self):
664
+ self.description = "Contains high entropy strings. This could be a sign of encrypted data, leaked secrets or obfuscated code."
665
+ self.suggestion = "Please inspect these strings to check if these strings are benign. Maintainers should clarify the purpose and existence of high entropy strings if there is a legitimate purpose."
666
+ self.title = "High entropy strings"
667
+ self.emoji = "\u26a0\ufe0f"
668
+ self.nextStepTitle = "What are high entropy strings?"
669
+
670
+ def __str__(self):
671
+ return json.dumps(self.__dict__)
672
+
673
+
674
+ class homoglyphs:
675
+ description: str
676
+ suggestion: str
677
+ title: str
678
+ emoji: str
679
+ nextStepTitle: str
680
+
681
+ def __init__(self):
682
+ self.description = "Contains unicode homoglyphs which can be used in supply chain confusion attacks."
683
+ self.suggestion = "Remove unicode homoglyphs if they are unnecessary, and audit their presence to confirm legitimate use."
684
+ self.title = "Unicode homoglyphs"
685
+ self.emoji = "\u26a0\ufe0f"
686
+ self.nextStepTitle = "What are unicode homoglyphs?"
687
+
688
+ def __str__(self):
689
+ return json.dumps(self.__dict__)
690
+
691
+
692
+ class httpDependency:
693
+ description: str
694
+ props: dict
695
+ suggestion: str
696
+ title: str
697
+ emoji: str
698
+ nextStepTitle: str
699
+
700
+ def __init__(self):
701
+ self.description = "Contains a dependency which resolves to a remote HTTP URL which could be used to inject untrusted code and reduce overall package reliability."
702
+ self.props = {"packageName": "Package name", "url": "URL"}
703
+ self.suggestion = "Publish the HTTP URL dependency to npm or a private package repository and consume it from there."
704
+ self.title = "HTTP dependency"
705
+ self.emoji = "\ud83e\udd69"
706
+ self.nextStepTitle = "What are http dependencies?"
707
+
708
+ def __str__(self):
709
+ return json.dumps(self.__dict__)
710
+
711
+
712
+ class installScripts:
713
+ description: str
714
+ props: dict
715
+ suggestion: str
716
+ title: str
717
+ emoji: str
718
+ nextStepTitle: str
719
+
720
+ def __init__(self):
721
+ self.description = "Install scripts are run when the package is installed. The majority of malware in npm is hidden in install scripts."
722
+ self.props = {"script": "Script", "source": "Source"}
723
+ self.suggestion = "Packages should not be running non-essential scripts during install and there are often solutions to problems people solve with install scripts that can be run at publish time instead."
724
+ self.title = "Install scripts"
725
+ self.emoji = "\ud83d\udcdc"
726
+ self.nextStepTitle = "What is an install script?"
727
+
728
+ def __str__(self):
729
+ return json.dumps(self.__dict__)
730
+
731
+
732
+ class gptSecurity:
733
+ description: str
734
+ props: dict
735
+ suggestion: str
736
+ title: str
737
+ emoji: str
738
+ nextStepTitle: str
739
+
740
+ def __init__(self):
741
+ self.description = "AI has determined that this package may contain potential security issues or vulnerabilities."
742
+ self.props = {"notes": "AI-based analysis of the package's code and behavior", "confidence": "Confidence of this analysis", "severity": "Impact of this threat"}
743
+ self.suggestion = "An AI system identified potential security problems in this package. It is advised to review the package thoroughly and assess the potential risks before installation. You may also consider reporting the issue to the package maintainer or seeking alternative solutions with a stronger security posture."
744
+ self.title = "AI detected security risk"
745
+ self.emoji = "\ud83e\udd16"
746
+ self.nextStepTitle = "What are AI detected security risks?"
747
+
748
+ def __str__(self):
749
+ return json.dumps(self.__dict__)
750
+
751
+
752
+ class gptAnomaly:
753
+ description: str
754
+ props: dict
755
+ suggestion: str
756
+ title: str
757
+ emoji: str
758
+ nextStepTitle: str
759
+
760
+ def __init__(self):
761
+ self.description = "AI has identified unusual behaviors that may pose a security risk."
762
+ self.props = {"notes": "AI-based analysis of the package's code and behavior", "confidence": "Confidence of this analysis", "severity": "Impact of this threat", "risk": "Risk level"}
763
+ self.suggestion = "An AI system found a low-risk anomaly in this package. It may still be fine to use, but you should check that it is safe before proceeding."
764
+ self.title = "AI detected anomaly"
765
+ self.emoji = "\ud83e\udd14"
766
+ self.nextStepTitle = "What is an AI detected anomaly?"
767
+
768
+ def __str__(self):
769
+ return json.dumps(self.__dict__)
770
+
771
+
772
+ class gptMalware:
773
+ description: str
774
+ props: dict
775
+ suggestion: str
776
+ title: str
777
+ emoji: str
778
+ nextStepTitle: str
779
+
780
+ def __init__(self):
781
+ self.description = "AI has identified this package as malware. This is a strong signal that the package may be malicious."
782
+ self.props = {"notes": "AI-based analysis of the package's code and behavior", "confidence": "Confidence of this analysis", "severity": "Impact of this behavior"}
783
+ self.suggestion = "Given the AI system's identification of this package as malware, extreme caution is advised. It is recommended to avoid downloading or installing this package until the threat is confirmed or flagged as a false positive."
784
+ self.title = "AI detected potential malware"
785
+ self.emoji = "\ud83e\udd16"
786
+ self.nextStepTitle = "What is AI detected malware?"
787
+
788
+ def __str__(self):
789
+ return json.dumps(self.__dict__)
790
+
791
+
792
+ class potentialVulnerability:
793
+ description: str
794
+ props: dict
795
+ suggestion: str
796
+ title: str
797
+ emoji: str
798
+ nextStepTitle: str
799
+
800
+ def __init__(self):
801
+ self.description = "Initial human review suggests the presence of a vulnerability in this package. It is pending further analysis and confirmation."
802
+ self.props = {"note": "AI detection + human review", "risk": "Risk level"}
803
+ self.suggestion = "It is advisable to proceed with caution. Engage in a review of the package's security aspects and consider reaching out to the package maintainer for the latest information or patches."
804
+ self.title = "Potential vulnerability"
805
+ self.emoji = "\ud83d\udea7"
806
+ self.nextStepTitle = "Navigating potential vulnerabilities"
807
+
808
+ def __str__(self):
809
+ return json.dumps(self.__dict__)
810
+
811
+
812
+ class invalidPackageJSON:
813
+ description: str
814
+ suggestion: str
815
+ title: str
816
+ emoji: str
817
+ nextStepTitle: str
818
+
819
+ def __init__(self):
820
+ self.description = "Package has an invalid manifest file and can cause installation problems if you try to use it."
821
+ self.suggestion = "Fix syntax errors in the manifest file and publish a new version. Consumers can use npm overrides to force a version that does not have this problem if one exists."
822
+ self.title = "Invalid manifest file"
823
+ self.emoji = "\ud83e\udd12"
824
+ self.nextStepTitle = "What is an invalid manifest file?"
825
+
826
+ def __str__(self):
827
+ return json.dumps(self.__dict__)
828
+
829
+
830
+ class invisibleChars:
831
+ description: str
832
+ suggestion: str
833
+ title: str
834
+ emoji: str
835
+ nextStepTitle: str
836
+
837
+ def __init__(self):
838
+ self.description = "Source files contain invisible characters. This could indicate source obfuscation or a supply chain attack."
839
+ self.suggestion = "Remove invisible characters. If their use is justified, use their visible escaped counterparts."
840
+ self.title = "Invisible chars"
841
+ self.emoji = "\u26a0\ufe0f"
842
+ self.nextStepTitle = "What are invisible characters?"
843
+
844
+ def __str__(self):
845
+ return json.dumps(self.__dict__)
846
+
847
+
848
+ class licenseChange:
849
+ description: str
850
+ props: dict
851
+ suggestion: str
852
+ title: str
853
+ emoji: str
854
+ nextStepTitle: str
855
+
856
+ def __init__(self):
857
+ self.description = "(Experimental) Package license has recently changed."
858
+ self.props = {"newLicenseId": "New license id", "prevLicenseId": "Previous license id"}
859
+ self.suggestion = "License changes should be reviewed carefully to inform ongoing use. Packages should avoid making major changes to their license type."
860
+ self.title = "License change"
861
+ self.emoji = "\u26a0\ufe0f"
862
+ self.nextStepTitle = "What is a license change?"
863
+
864
+ def __str__(self):
865
+ return json.dumps(self.__dict__)
866
+
867
+
868
+ class licenseException:
869
+ description: str
870
+ props: dict
871
+ suggestion: str
872
+ title: str
873
+ emoji: str
874
+ nextStepTitle: str
875
+
876
+ def __init__(self):
877
+ self.description = "(Experimental) Contains an SPDX license exception."
878
+ self.props = {"comments": "Comments", "exceptionId": "Exception id"}
879
+ self.suggestion = "License exceptions should be carefully reviewed."
880
+ self.title = "License exception"
881
+ self.emoji = "\u26a0\ufe0f"
882
+ self.nextStepTitle = "What is a license exception?"
883
+
884
+ def __str__(self):
885
+ return json.dumps(self.__dict__)
886
+
887
+
888
+ class longStrings:
889
+ description: str
890
+ suggestion: str
891
+ title: str
892
+ emoji: str
893
+ nextStepTitle: str
894
+
895
+ def __init__(self):
896
+ self.description = "Contains long string literals, which may be a sign of obfuscated or packed code."
897
+ self.suggestion = "Avoid publishing or consuming obfuscated or bundled code. It makes dependencies difficult to audit and undermines the module resolution system."
898
+ self.title = "Long strings"
899
+ self.emoji = "\u26a0\ufe0f"
900
+ self.nextStepTitle = "What's wrong with long strings?"
901
+
902
+ def __str__(self):
903
+ return json.dumps(self.__dict__)
904
+
905
+
906
+ class missingTarball:
907
+ description: str
908
+ suggestion: str
909
+ title: str
910
+ emoji: str
911
+ nextStepTitle: str
912
+
913
+ def __init__(self):
914
+ self.description = "This package is missing it's tarball. It could be removed from the npm registry or there may have been an error when publishing."
915
+ self.suggestion = "This package cannot be analyzed or installed due to missing data."
916
+ self.title = "Missing package tarball"
917
+ self.emoji = "\u2754"
918
+ self.nextStepTitle = "What is a missing tarball?"
919
+
920
+ def __str__(self):
921
+ return json.dumps(self.__dict__)
922
+
923
+
924
+ class majorRefactor:
925
+ description: str
926
+ props: dict
927
+ suggestion: str
928
+ title: str
929
+ emoji: str
930
+ nextStepTitle: str
931
+
932
+ def __init__(self):
933
+ self.description = "Package has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes."
934
+ self.props = {"changedPercent": "Change percentage", "curSize": "Current amount of lines", "linesChanged": "Lines changed", "prevSize": "Previous amount of lines"}
935
+ self.suggestion = "Consider waiting before upgrading to see if any issues are discovered, or be prepared to scrutinize any bugs or subtle changes the major refactor may bring. Publishers my consider publishing beta versions of major refactors to limit disruption to parties interested in the new changes."
936
+ self.title = "Major refactor"
937
+ self.emoji = "\u26a0\ufe0f"
938
+ self.nextStepTitle = "What is a major refactor?"
939
+
940
+ def __str__(self):
941
+ return json.dumps(self.__dict__)
942
+
943
+
944
+ class malware:
945
+ description: str
946
+ props: dict
947
+ title: str
948
+ suggestion: str
949
+ emoji: str
950
+ nextStepTitle: str
951
+
952
+ def __init__(self):
953
+ self.description = "This package is malware. We have asked the package registry to remove it."
954
+ self.props = {"id": "Id", "note": "Note"}
955
+ self.title = "Known malware"
956
+ self.suggestion = "It is strongly recommended that malware is removed from your codebase."
957
+ self.emoji = "\u2620\ufe0f"
958
+ self.nextStepTitle = "What is known malware?"
959
+
960
+ def __str__(self):
961
+ return json.dumps(self.__dict__)
962
+
963
+
964
+ class manifestConfusion:
965
+ description: str
966
+ props: dict
967
+ title: str
968
+ suggestion: str
969
+ emoji: str
970
+ nextStepTitle: str
971
+
972
+ def __init__(self):
973
+ self.description = "This package has inconsistent metadata. This could be malicious or caused by an error when publishing the package."
974
+ self.props = {"key": "Key", "description": "Description"}
975
+ self.title = "Manifest confusion"
976
+ self.suggestion = "Packages with inconsistent metadata may be corrupted or malicious."
977
+ self.emoji = "\ud83e\udd78"
978
+ self.nextStepTitle = "What is manifest confusion?"
979
+
980
+ def __str__(self):
981
+ return json.dumps(self.__dict__)
982
+
983
+
984
+ class mediumCVE:
985
+ description: str
986
+ props: dict
987
+ suggestion: str
988
+ title: str
989
+ emoji: str
990
+ nextStepTitle: str
991
+
992
+ def __init__(self):
993
+ self.description = "Contains a medium severity Common Vulnerability and Exposure (CVE)."
994
+ self.props = {"cveId": "CVE ID", "cwes": "CWEs", "cvss": "CVSS", "description": "Description", "firstPatchedVersionIdentifier": "Patched version", "ghsaId": "GHSA ID", "id": "Id", "severity": "Severity", "title": "Title", "url": "URL", "vulnerableVersionRange": "Vulnerable versions"}
995
+ self.suggestion = "Remove or replace dependencies that include known medium severity CVEs. Consumers can use dependency overrides or npm audit fix --force to remove vulnerable dependencies."
996
+ self.title = "Medium CVE"
997
+ self.emoji = "\u26a0\ufe0f"
998
+ self.nextStepTitle = "What is a medium CVE?"
999
+
1000
+ def __str__(self):
1001
+ return json.dumps(self.__dict__)
1002
+
1003
+
1004
+ class mildCVE:
1005
+ description: str
1006
+ props: dict
1007
+ suggestion: str
1008
+ title: str
1009
+ emoji: str
1010
+ nextStepTitle: str
1011
+
1012
+ def __init__(self):
1013
+ self.description = "Contains a low severity Common Vulnerability and Exposure (CVE)."
1014
+ self.props = {"cveId": "CVE ID", "cwes": "CWEs", "cvss": "CVSS", "description": "Description", "firstPatchedVersionIdentifier": "Patched version", "ghsaId": "GHSA ID", "id": "Id", "severity": "Severity", "title": "Title", "url": "URL", "vulnerableVersionRange": "Vulnerable versions"}
1015
+ self.suggestion = "Remove or replace dependencies that include known low severity CVEs. Consumers can use dependency overrides or npm audit fix --force to remove vulnerable dependencies."
1016
+ self.title = "Low CVE"
1017
+ self.emoji = "\u26a0\ufe0f"
1018
+ self.nextStepTitle = "What is a mild CVE?"
1019
+
1020
+ def __str__(self):
1021
+ return json.dumps(self.__dict__)
1022
+
1023
+
1024
+ class minifiedFile:
1025
+ description: str
1026
+ props: dict
1027
+ suggestion: str
1028
+ title: str
1029
+ emoji: str
1030
+ nextStepTitle: str
1031
+
1032
+ def __init__(self):
1033
+ self.description = "This package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code."
1034
+ self.props = {"confidence": "Confidence"}
1035
+ self.suggestion = "In many cases minified code is harmless, however minified code can be used to hide a supply chain attack. Consider not shipping minified code on npm."
1036
+ self.title = "Minified code"
1037
+ self.emoji = "\u26a0\ufe0f"
1038
+ self.nextStepTitle = "What's wrong with minified code?"
1039
+
1040
+ def __str__(self):
1041
+ return json.dumps(self.__dict__)
1042
+
1043
+
1044
+ class missingAuthor:
1045
+ description: str
1046
+ suggestion: str
1047
+ title: str
1048
+ emoji: str
1049
+ nextStepTitle: str
1050
+
1051
+ def __init__(self):
1052
+ self.description = "The package was published by an npm account that no longer exists."
1053
+ self.suggestion = "Packages should have active and identified authors."
1054
+ self.title = "Non-existent author"
1055
+ self.emoji = "\ud83e\udee5"
1056
+ self.nextStepTitle = "What is a non-existent author?"
1057
+
1058
+ def __str__(self):
1059
+ return json.dumps(self.__dict__)
1060
+
1061
+
1062
+ class missingDependency:
1063
+ description: str
1064
+ props: dict
1065
+ suggestion: str
1066
+ title: str
1067
+ emoji: str
1068
+ nextStepTitle: str
1069
+
1070
+ def __init__(self):
1071
+ self.description = "A required dependency is not declared in package.json and may prevent the package from working."
1072
+ self.props = {"name": "Name"}
1073
+ self.suggestion = "The package should define the missing dependency inside of package.json and publish a new version. Consumers may have to install the missing dependency themselves as long as the dependency remains missing. If the dependency is optional, add it to optionalDependencies and handle the missing case."
1074
+ self.title = "Missing dependency"
1075
+ self.emoji = "\u26a0\ufe0f"
1076
+ self.nextStepTitle = "What is a missing dependency?"
1077
+
1078
+ def __str__(self):
1079
+ return json.dumps(self.__dict__)
1080
+
1081
+
1082
+ class missingLicense:
1083
+ description: str
1084
+ suggestion: str
1085
+ title: str
1086
+ emoji: str
1087
+ nextStepTitle: str
1088
+
1089
+ def __init__(self):
1090
+ self.description = "(Experimental) Package does not have a license and consumption legal status is unknown."
1091
+ self.suggestion = "A new version of the package should be published that includes a valid SPDX license in a license file, package.json license field or mentioned in the README."
1092
+ self.title = "Missing license"
1093
+ self.emoji = "\u26a0\ufe0f"
1094
+ self.nextStepTitle = "What is a missing license?"
1095
+
1096
+ def __str__(self):
1097
+ return json.dumps(self.__dict__)
1098
+
1099
+
1100
+ class mixedLicense:
1101
+ description: str
1102
+ props: dict
1103
+ suggestion: str
1104
+ title: str
1105
+ emoji: str
1106
+ nextStepTitle: str
1107
+
1108
+ def __init__(self):
1109
+ self.description = "(Experimental) Package contains multiple licenses."
1110
+ self.props = {"licenseId": "License Ids"}
1111
+ self.suggestion = "A new version of the package should be published that includes a single license. Consumers may seek clarification from the package author. Ensure that the license details are consistent across the LICENSE file, package.json license field and license details mentioned in the README."
1112
+ self.title = "Mixed license"
1113
+ self.emoji = "\u26a0\ufe0f"
1114
+ self.nextStepTitle = "What is a mixed license?"
1115
+
1116
+ def __str__(self):
1117
+ return json.dumps(self.__dict__)
1118
+
1119
+
1120
+ class ambiguousClassifier:
1121
+ props: dict
1122
+ description: str
1123
+ suggestion: str
1124
+ title: str
1125
+ emoji: str
1126
+ nextStepTitle: str
1127
+
1128
+ def __init__(self):
1129
+ self.props = {"classifier": "The classifier"}
1130
+ self.description = "(Experimental) An ambiguous license classifier was found."
1131
+ self.suggestion = "A specific license or licenses should be identified"
1132
+ self.title = "Ambiguous License Classifier"
1133
+ self.emoji = "\u26a0\ufe0f"
1134
+ self.nextStepTitle = "What is an ambiguous license classifier?"
1135
+
1136
+ def __str__(self):
1137
+ return json.dumps(self.__dict__)
1138
+
1139
+
1140
+ class modifiedException:
1141
+ description: str
1142
+ props: dict
1143
+ suggestion: str
1144
+ title: str
1145
+ emoji: str
1146
+ nextStepTitle: str
1147
+
1148
+ def __init__(self):
1149
+ self.description = "(Experimental) Package contains a modified version of an SPDX license exception. Please read carefully before using this code."
1150
+ self.props = {"comments": "Comments", "exceptionId": "Exception id", "similarity": "Similarity"}
1151
+ self.suggestion = "Packages should avoid making modifications to standard license exceptions."
1152
+ self.title = "Modified license exception"
1153
+ self.emoji = "\u26a0\ufe0f"
1154
+ self.nextStepTitle = "What is a modified license exception?"
1155
+
1156
+ def __str__(self):
1157
+ return json.dumps(self.__dict__)
1158
+
1159
+
1160
+ class modifiedLicense:
1161
+ description: str
1162
+ props: dict
1163
+ suggestion: str
1164
+ title: str
1165
+ emoji: str
1166
+ nextStepTitle: str
1167
+
1168
+ def __init__(self):
1169
+ self.description = "(Experimental) Package contains a modified version of an SPDX license. Please read carefully before using this code."
1170
+ self.props = {"licenseId": "License id", "similarity": "Similarity"}
1171
+ self.suggestion = "Packages should avoid making modifications to standard licenses."
1172
+ self.title = "Modified license"
1173
+ self.emoji = "\u26a0\ufe0f"
1174
+ self.nextStepTitle = "What is a modified license?"
1175
+
1176
+ def __str__(self):
1177
+ return json.dumps(self.__dict__)
1178
+
1179
+
1180
+ class networkAccess:
1181
+ description: str
1182
+ props: dict
1183
+ suggestion: str
1184
+ title: str
1185
+ emoji: str
1186
+ capabilityName: str
1187
+ nextStepTitle: str
1188
+
1189
+ def __init__(self):
1190
+ self.description = "This module accesses the network."
1191
+ self.props = {"module": "Module"}
1192
+ self.suggestion = "Packages should remove all network access that is functionally unnecessary. Consumers should audit network access to ensure legitimate use."
1193
+ self.title = "Network access"
1194
+ self.emoji = "\u26a0\ufe0f"
1195
+ self.capabilityName = "network"
1196
+ self.nextStepTitle = "What is network access?"
1197
+
1198
+ def __str__(self):
1199
+ return json.dumps(self.__dict__)
1200
+
1201
+
1202
+ class newAuthor:
1203
+ description: str
1204
+ props: dict
1205
+ suggestion: str
1206
+ title: str
1207
+ emoji: str
1208
+ nextStepTitle: str
1209
+
1210
+ def __init__(self):
1211
+ self.description = "A new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package."
1212
+ self.props = {"newAuthor": "New author", "prevAuthor": "Previous author"}
1213
+ self.suggestion = "Scrutinize new collaborator additions to packages because they now have the ability to publish code into your dependency tree. Packages should avoid frequent or unnecessary additions or changes to publishing rights."
1214
+ self.title = "New author"
1215
+ self.emoji = "\u26a0\ufe0f"
1216
+ self.nextStepTitle = "What is new author?"
1217
+
1218
+ def __str__(self):
1219
+ return json.dumps(self.__dict__)
1220
+
1221
+
1222
+ class noAuthorData:
1223
+ description: str
1224
+ suggestion: str
1225
+ title: str
1226
+ emoji: str
1227
+ nextStepTitle: str
1228
+
1229
+ def __init__(self):
1230
+ self.description = "Package does not specify a list of contributors or an author in package.json."
1231
+ self.suggestion = "Add a author field or contributors array to package.json."
1232
+ self.title = "No contributors or author data"
1233
+ self.emoji = "\u26a0\ufe0f"
1234
+ self.nextStepTitle = "Why is contributor and author data important?"
1235
+
1236
+ def __str__(self):
1237
+ return json.dumps(self.__dict__)
1238
+
1239
+
1240
+ class noBugTracker:
1241
+ description: str
1242
+ suggestion: str
1243
+ title: str
1244
+ emoji: str
1245
+ nextStepTitle: str
1246
+
1247
+ def __init__(self):
1248
+ self.description = "Package does not have a linked bug tracker in package.json."
1249
+ self.suggestion = "Add a bugs field to package.json. https://docs.npmjs.com/cli/v8/configuring-npm/package-json#bugs"
1250
+ self.title = "No bug tracker"
1251
+ self.emoji = "\u26a0\ufe0f"
1252
+ self.nextStepTitle = "Why are bug trackers important?"
1253
+
1254
+ def __str__(self):
1255
+ return json.dumps(self.__dict__)
1256
+
1257
+
1258
+ class noREADME:
1259
+ description: str
1260
+ suggestion: str
1261
+ title: str
1262
+ emoji: str
1263
+ nextStepTitle: str
1264
+
1265
+ def __init__(self):
1266
+ self.description = "Package does not have a README. This may indicate a failed publish or a low quality package."
1267
+ self.suggestion = "Add a README to to the package and publish a new version."
1268
+ self.title = "No README"
1269
+ self.emoji = "\u26a0\ufe0f"
1270
+ self.nextStepTitle = "Why are READMEs important?"
1271
+
1272
+ def __str__(self):
1273
+ return json.dumps(self.__dict__)
1274
+
1275
+
1276
+ class noRepository:
1277
+ description: str
1278
+ suggestion: str
1279
+ title: str
1280
+ emoji: str
1281
+ nextStepTitle: str
1282
+
1283
+ def __init__(self):
1284
+ self.description = "Package does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package."
1285
+ self.suggestion = "Add a repository field to package.json. https://docs.npmjs.com/cli/v8/configuring-npm/package-json#repository"
1286
+ self.title = "No repository"
1287
+ self.emoji = "\u26a0\ufe0f"
1288
+ self.nextStepTitle = "Why are missing repositories important?"
1289
+
1290
+ def __str__(self):
1291
+ return json.dumps(self.__dict__)
1292
+
1293
+
1294
+ class noTests:
1295
+ description: str
1296
+ suggestion: str
1297
+ title: str
1298
+ emoji: str
1299
+ nextStepTitle: str
1300
+
1301
+ def __init__(self):
1302
+ self.description = "Package does not have any tests. This is a strong signal of a poorly maintained or low quality package."
1303
+ self.suggestion = "Add tests and publish a new version of the package. Consumers may look for an alternative package with better testing."
1304
+ self.title = "No tests"
1305
+ self.emoji = "\u26a0\ufe0f"
1306
+ self.nextStepTitle = "What does no tests mean?"
1307
+
1308
+ def __str__(self):
1309
+ return json.dumps(self.__dict__)
1310
+
1311
+
1312
+ class noV1:
1313
+ description: str
1314
+ suggestion: str
1315
+ title: str
1316
+ emoji: str
1317
+ nextStepTitle: str
1318
+
1319
+ def __init__(self):
1320
+ self.description = "Package is not semver >=1. This means it is not stable and does not support ^ ranges."
1321
+ self.suggestion = "If the package sees any general use, it should begin releasing at version 1.0.0 or later to benefit from semver."
1322
+ self.title = "No v1"
1323
+ self.emoji = "\u26a0\ufe0f"
1324
+ self.nextStepTitle = "What is wrong with semver < v1?"
1325
+
1326
+ def __str__(self):
1327
+ return json.dumps(self.__dict__)
1328
+
1329
+
1330
+ class noWebsite:
1331
+ description: str
1332
+ suggestion: str
1333
+ title: str
1334
+ emoji: str
1335
+ nextStepTitle: str
1336
+
1337
+ def __init__(self):
1338
+ self.description = "Package does not have a website."
1339
+ self.suggestion = "Add a homepage field to package.json. https://docs.npmjs.com/cli/v8/configuring-npm/package-json#homepage"
1340
+ self.title = "No website"
1341
+ self.emoji = "\u26a0\ufe0f"
1342
+ self.nextStepTitle = "What is a missing website?"
1343
+
1344
+ def __str__(self):
1345
+ return json.dumps(self.__dict__)
1346
+
1347
+
1348
+ class nonFSFLicense:
1349
+ description: str
1350
+ props: dict
1351
+ title: str
1352
+ suggestion: str
1353
+ emoji: str
1354
+ nextStepTitle: str
1355
+
1356
+ def __init__(self):
1357
+ self.description = "(Experimental) Package has a non-FSF-approved license."
1358
+ self.props = {"licenseId": "License id"}
1359
+ self.title = "Non FSF license"
1360
+ self.suggestion = "Consider the terms of the license for your given use case."
1361
+ self.emoji = "\u26a0\ufe0f"
1362
+ self.nextStepTitle = "What is a non FSF license?"
1363
+
1364
+ def __str__(self):
1365
+ return json.dumps(self.__dict__)
1366
+
1367
+
1368
+ class nonOSILicense:
1369
+ description: str
1370
+ props: dict
1371
+ title: str
1372
+ suggestion: str
1373
+ emoji: str
1374
+ nextStepTitle: str
1375
+
1376
+ def __init__(self):
1377
+ self.description = "(Experimental) Package has a non-OSI-approved license."
1378
+ self.props = {"licenseId": "License id"}
1379
+ self.title = "Non OSI license"
1380
+ self.suggestion = "Consider the terms of the license for your given use case."
1381
+ self.emoji = "\u26a0\ufe0f"
1382
+ self.nextStepTitle = "What is a non OSI license?"
1383
+
1384
+ def __str__(self):
1385
+ return json.dumps(self.__dict__)
1386
+
1387
+
1388
+ class nonSPDXLicense:
1389
+ description: str
1390
+ suggestion: str
1391
+ title: str
1392
+ emoji: str
1393
+ nextStepTitle: str
1394
+
1395
+ def __init__(self):
1396
+ self.description = "(Experimental) Package contains a non-standard license somewhere. Please read carefully before using."
1397
+ self.suggestion = "Package should adopt a standard SPDX license consistently across all license locations (LICENSE files, package.json license fields, and READMEs)."
1398
+ self.title = "Non SPDX license"
1399
+ self.emoji = "\u26a0\ufe0f"
1400
+ self.nextStepTitle = "What is a non SPDX license?"
1401
+
1402
+ def __str__(self):
1403
+ return json.dumps(self.__dict__)
1404
+
1405
+
1406
+ class notice:
1407
+ description: str
1408
+ title: str
1409
+ suggestion: str
1410
+ emoji: str
1411
+ nextStepTitle: str
1412
+
1413
+ def __init__(self):
1414
+ self.description = "(Experimental) Package contains a legal notice. This could increase your exposure to legal risk when using this project."
1415
+ self.title = "Legal notice"
1416
+ self.suggestion = "Consider the implications of the legal notice for your given use case."
1417
+ self.emoji = "\u26a0\ufe0f"
1418
+ self.nextStepTitle = "What is a legal notice?"
1419
+
1420
+ def __str__(self):
1421
+ return json.dumps(self.__dict__)
1422
+
1423
+
1424
+ class obfuscatedFile:
1425
+ description: str
1426
+ props: dict
1427
+ suggestion: str
1428
+ title: str
1429
+ emoji: str
1430
+ nextStepTitle: str
1431
+
1432
+ def __init__(self):
1433
+ self.description = "Obfuscated files are intentionally packed to hide their behavior. This could be a sign of malware"
1434
+ self.props = {"confidence": "Confidence"}
1435
+ self.suggestion = "Packages should not obfuscate their code. Consider not using packages with obfuscated code"
1436
+ self.title = "Obfuscated code"
1437
+ self.emoji = "\u26a0\ufe0f"
1438
+ self.nextStepTitle = "What is obfuscated code?"
1439
+
1440
+ def __str__(self):
1441
+ return json.dumps(self.__dict__)
1442
+
1443
+
1444
+ class obfuscatedRequire:
1445
+ description: str
1446
+ suggestion: str
1447
+ title: str
1448
+ emoji: str
1449
+ nextStepTitle: str
1450
+
1451
+ def __init__(self):
1452
+ self.description = "Package accesses dynamic properties of require and may be obfuscating code execution."
1453
+ self.suggestion = "The package should not access dynamic properties of module. Instead use import or require directly."
1454
+ self.title = "Obfuscated require"
1455
+ self.emoji = "\u26a0\ufe0f"
1456
+ self.nextStepTitle = "What is obfuscated require?"
1457
+
1458
+ def __str__(self):
1459
+ return json.dumps(self.__dict__)
1460
+
1461
+
1462
+ class peerDependency:
1463
+ description: str
1464
+ props: dict
1465
+ suggestion: str
1466
+ title: str
1467
+ emoji: str
1468
+ nextStepTitle: str
1469
+
1470
+ def __init__(self):
1471
+ self.description = "Package specifies peer dependencies in package.json."
1472
+ self.props = {"name": "Name"}
1473
+ self.suggestion = "Peer dependencies are fragile and can cause major problems across version changes. Be careful when updating this dependency and its peers."
1474
+ self.title = "Peer dependency"
1475
+ self.emoji = "\u26a0\ufe0f"
1476
+ self.nextStepTitle = "What are peer dependencies?"
1477
+
1478
+ def __str__(self):
1479
+ return json.dumps(self.__dict__)
1480
+
1481
+
1482
+ class semverAnomaly:
1483
+ description: str
1484
+ props: dict
1485
+ suggestion: str
1486
+ title: str
1487
+ emoji: str
1488
+ nextStepTitle: str
1489
+
1490
+ def __init__(self):
1491
+ self.description = "Package semver skipped several versions, this could indicate a dependency confusion attack or indicate the intention of disruptive breaking changes or major priority shifts for the project."
1492
+ self.props = {"newVersion": "New version", "prevVersion": "Previous version"}
1493
+ self.suggestion = "Packages should follow semantic versions conventions by not skipping subsequent version numbers. Consumers should research the purpose of the skipped version number."
1494
+ self.title = "Semver anomaly"
1495
+ self.emoji = "\u26a0\ufe0f"
1496
+ self.nextStepTitle = "What are semver anomalies?"
1497
+
1498
+ def __str__(self):
1499
+ return json.dumps(self.__dict__)
1500
+
1501
+
1502
+ class shellAccess:
1503
+ description: str
1504
+ props: dict
1505
+ suggestion: str
1506
+ title: str
1507
+ emoji: str
1508
+ capabilityName: str
1509
+ nextStepTitle: str
1510
+
1511
+ def __init__(self):
1512
+ self.description = "This module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code."
1513
+ self.props = {"module": "Module"}
1514
+ self.suggestion = "Packages should avoid accessing the shell which can reduce portability, and make it easier for malicious shell access to be introduced."
1515
+ self.title = "Shell access"
1516
+ self.emoji = "\u26a0\ufe0f"
1517
+ self.capabilityName = "shell"
1518
+ self.nextStepTitle = "What is shell access?"
1519
+
1520
+ def __str__(self):
1521
+ return json.dumps(self.__dict__)
1522
+
1523
+
1524
+ class shellScriptOverride:
1525
+ description: str
1526
+ props: dict
1527
+ suggestion: str
1528
+ title: str
1529
+ emoji: str
1530
+ nextStepTitle: str
1531
+
1532
+ def __init__(self):
1533
+ self.description = "This package re-exports a well known shell command via an npm bin script. This is possibly a supply chain attack"
1534
+ self.props = {"binScript": "Bin script"}
1535
+ self.suggestion = "Packages should not export bin scripts which conflict with well known shell commands"
1536
+ self.title = "Bin script shell injection"
1537
+ self.emoji = "\ud83e\udd80"
1538
+ self.nextStepTitle = "What is bin script shell injection?"
1539
+
1540
+ def __str__(self):
1541
+ return json.dumps(self.__dict__)
1542
+
1543
+
1544
+ class suspiciousString:
1545
+ description: str
1546
+ props: dict
1547
+ suggestion: str
1548
+ title: str
1549
+ emoji: str
1550
+ nextStepTitle: str
1551
+
1552
+ def __init__(self):
1553
+ self.description = "This package contains suspicious text patterns which are commonly associated with bad behavior"
1554
+ self.props = {"explanation": "Explanation", "pattern": "Pattern"}
1555
+ self.suggestion = "The package code should be reviewed before installing"
1556
+ self.title = "Suspicious strings"
1557
+ self.emoji = "\u26a0\ufe0f"
1558
+ self.nextStepTitle = "What are suspicious strings?"
1559
+
1560
+ def __str__(self):
1561
+ return json.dumps(self.__dict__)
1562
+
1563
+
1564
+ class telemetry:
1565
+ description: str
1566
+ props: dict
1567
+ title: str
1568
+ suggestion: str
1569
+ emoji: str
1570
+ nextStepTitle: str
1571
+
1572
+ def __init__(self):
1573
+ self.description = "This package contains telemetry which tracks how it is used."
1574
+ self.props = {"id": "Id", "note": "Note"}
1575
+ self.title = "Telemetry"
1576
+ self.suggestion = "Most telemetry comes with settings to disable it. Consider disabling telemetry if you do not want to be tracked."
1577
+ self.emoji = "\ud83d\udcde"
1578
+ self.nextStepTitle = "What is telemetry?"
1579
+
1580
+ def __str__(self):
1581
+ return json.dumps(self.__dict__)
1582
+
1583
+
1584
+ class trivialPackage:
1585
+ description: str
1586
+ props: dict
1587
+ suggestion: str
1588
+ title: str
1589
+ emoji: str
1590
+ nextStepTitle: str
1591
+
1592
+ def __init__(self):
1593
+ self.description = "Packages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency."
1594
+ self.props = {"linesOfCode": "Lines of code"}
1595
+ self.suggestion = "Removing this package as a dependency and implementing its logic will reduce supply chain risk."
1596
+ self.title = "Trivial Package"
1597
+ self.emoji = "\u26a0\ufe0f"
1598
+ self.nextStepTitle = "What are trivial packages?"
1599
+
1600
+ def __str__(self):
1601
+ return json.dumps(self.__dict__)
1602
+
1603
+
1604
+ class troll:
1605
+ description: str
1606
+ props: dict
1607
+ title: str
1608
+ suggestion: str
1609
+ emoji: str
1610
+ nextStepTitle: str
1611
+
1612
+ def __init__(self):
1613
+ self.description = "This package is a joke, parody, or includes undocumented or hidden behavior unrelated to its primary function."
1614
+ self.props = {"id": "Id", "note": "Note"}
1615
+ self.title = "Protestware or potentially unwanted behavior"
1616
+ self.suggestion = "Consider that consuming this package my come along with functionality unrelated to its primary purpose."
1617
+ self.emoji = "\ud83e\uddcc"
1618
+ self.nextStepTitle = "What is protestware?"
1619
+
1620
+ def __str__(self):
1621
+ return json.dumps(self.__dict__)
1622
+
1623
+
1624
+ class typeModuleCompatibility:
1625
+ description: str
1626
+ suggestion: str
1627
+ title: str
1628
+ emoji: str
1629
+ nextStepTitle: str
1630
+
1631
+ def __init__(self):
1632
+ self.description = "Package is CommonJS, but has a dependency which is type: \"module\". The two are likely incompatible."
1633
+ self.suggestion = "The package needs to switch to dynamic import on the esmodule dependency, or convert to esm itself. Consumers may experience errors resulting from this incompatibility."
1634
+ self.title = "CommonJS depending on ESModule"
1635
+ self.emoji = "\u26a0\ufe0f"
1636
+ self.nextStepTitle = "Why can't CJS depend on ESM?"
1637
+
1638
+ def __str__(self):
1639
+ return json.dumps(self.__dict__)
1640
+
1641
+
1642
+ class uncaughtOptionalDependency:
1643
+ description: str
1644
+ props: dict
1645
+ suggestion: str
1646
+ title: str
1647
+ emoji: str
1648
+ nextStepTitle: str
1649
+
1650
+ def __init__(self):
1651
+ self.description = "Package uses an optional dependency without handling a missing dependency exception. If you install it without the optional dependencies then it could cause runtime errors."
1652
+ self.props = {"name": "Name"}
1653
+ self.suggestion = "Package should handle the loading of the dependency when it is not present, or convert the optional dependency into a regular dependency."
1654
+ self.title = "Uncaught optional dependency"
1655
+ self.emoji = "\u26a0\ufe0f"
1656
+ self.nextStepTitle = "Why are uncaught optional dependencies?"
1657
+
1658
+ def __str__(self):
1659
+ return json.dumps(self.__dict__)
1660
+
1661
+
1662
+ class unclearLicense:
1663
+ description: str
1664
+ props: dict
1665
+ suggestion: str
1666
+ title: str
1667
+ emoji: str
1668
+ nextStepTitle: str
1669
+
1670
+ def __init__(self):
1671
+ self.description = "Package contains a reference to a license without a matching LICENSE file."
1672
+ self.props = {"possibleLicenseId": "Possible license id"}
1673
+ self.suggestion = "Add a LICENSE file that matches the license field in package.json. https://docs.npmjs.com/cli/v8/configuring-npm/package-json#license"
1674
+ self.title = "Unclear license"
1675
+ self.emoji = "\u26a0\ufe0f"
1676
+ self.nextStepTitle = "What are unclear licenses?"
1677
+
1678
+ def __str__(self):
1679
+ return json.dumps(self.__dict__)
1680
+
1681
+
1682
+ class shrinkwrap:
1683
+ description: str
1684
+ suggestion: str
1685
+ title: str
1686
+ emoji: str
1687
+ nextStepTitle: str
1688
+
1689
+ def __init__(self):
1690
+ self.description = "Package contains a shrinkwrap file. This may allow the package to bypass normal install procedures."
1691
+ self.suggestion = "Packages should never use npm shrinkwrap files due to the dangers they pose."
1692
+ self.title = "NPM Shrinkwrap"
1693
+ self.emoji = "\ud83e\uddca"
1694
+ self.nextStepTitle = "What is a shrinkwrap file?"
1695
+
1696
+ def __str__(self):
1697
+ return json.dumps(self.__dict__)
1698
+
1699
+
1700
+ class unmaintained:
1701
+ description: str
1702
+ props: dict
1703
+ suggestion: str
1704
+ title: str
1705
+ emoji: str
1706
+ nextStepTitle: str
1707
+
1708
+ def __init__(self):
1709
+ self.description = "Package has not been updated in more than 5 years and may be unmaintained. Problems with the package may go unaddressed."
1710
+ self.props = {"lastPublish": "Last publish"}
1711
+ self.suggestion = "Package should publish periodic maintenance releases if they are maintained, or deprecate if they have no intention in further maintenance."
1712
+ self.title = "Unmaintained"
1713
+ self.emoji = "\u26a0\ufe0f"
1714
+ self.nextStepTitle = "What are unmaintained packages?"
1715
+
1716
+ def __str__(self):
1717
+ return json.dumps(self.__dict__)
1718
+
1719
+
1720
+ class unpublished:
1721
+ description: str
1722
+ props: dict
1723
+ suggestion: str
1724
+ title: str
1725
+ emoji: str
1726
+ nextStepTitle: str
1727
+
1728
+ def __init__(self):
1729
+ self.description = "Package version was not found on the registry. It may exist on a different registry and need to be configured to pull from that registry."
1730
+ self.props = {"version": "The version that was not found"}
1731
+ self.suggestion = "Packages can be removed from the registry by manually un-publishing, a security issue removal, or may simply never have been published to the registry. Reliance on these packages will cause problem when they are not found."
1732
+ self.title = "Unpublished package"
1733
+ self.emoji = "\u26a0\ufe0f"
1734
+ self.nextStepTitle = "What are unpublished packages?"
1735
+
1736
+ def __str__(self):
1737
+ return json.dumps(self.__dict__)
1738
+
1739
+
1740
+ class unresolvedRequire:
1741
+ description: str
1742
+ suggestion: str
1743
+ title: str
1744
+ emoji: str
1745
+ nextStepTitle: str
1746
+
1747
+ def __init__(self):
1748
+ self.description = "Package imports a file which does not exist and may not work as is. It could also be importing a file that will be created at runtime which could be a vector for running malicious code."
1749
+ self.suggestion = "Fix imports so that they require declared dependencies or existing files."
1750
+ self.title = "Unresolved require"
1751
+ self.emoji = "\ud83d\udd75\ufe0f"
1752
+ self.nextStepTitle = "What is unresolved require?"
1753
+
1754
+ def __str__(self):
1755
+ return json.dumps(self.__dict__)
1756
+
1757
+
1758
+ class unsafeCopyright:
1759
+ description: str
1760
+ suggestion: str
1761
+ title: str
1762
+ emoji: str
1763
+ nextStepTitle: str
1764
+
1765
+ def __init__(self):
1766
+ self.description = "(Experimental) Package contains a copyright but no license. Using this package may expose you to legal risk."
1767
+ self.suggestion = "Clarify the license type by adding a license field to package.json and a LICENSE file."
1768
+ self.title = "Unsafe copyright"
1769
+ self.emoji = "\u26a0\ufe0f"
1770
+ self.nextStepTitle = "What is unsafe copyright?"
1771
+
1772
+ def __str__(self):
1773
+ return json.dumps(self.__dict__)
1774
+
1775
+
1776
+ class unstableOwnership:
1777
+ description: str
1778
+ props: dict
1779
+ suggestion: str
1780
+ title: str
1781
+ emoji: str
1782
+ nextStepTitle: str
1783
+
1784
+ def __init__(self):
1785
+ self.description = "A new collaborator has begun publishing package versions. Package stability and security risk may be elevated."
1786
+ self.props = {"author": "Author"}
1787
+ self.suggestion = "Try to reduce the amount of authors you depend on to reduce the risk to malicious actors gaining access to your supply chain. Packages should remove inactive collaborators with publishing rights from packages on npm."
1788
+ self.title = "Unstable ownership"
1789
+ self.emoji = "\u26a0\ufe0f"
1790
+ self.nextStepTitle = "What is unstable ownership?"
1791
+
1792
+ def __str__(self):
1793
+ return json.dumps(self.__dict__)
1794
+
1795
+
1796
+ class unusedDependency:
1797
+ description: str
1798
+ props: dict
1799
+ suggestion: str
1800
+ title: str
1801
+ emoji: str
1802
+ nextStepTitle: str
1803
+
1804
+ def __init__(self):
1805
+ self.description = "Package has unused dependencies. This package depends on code that it does not use. This can increase the attack surface for malware and slow down installation."
1806
+ self.props = {"name": "Name", "version": "Version"}
1807
+ self.suggestion = "Packages should only specify dependencies that they use directly."
1808
+ self.title = "Unused dependency"
1809
+ self.emoji = "\u26a0\ufe0f"
1810
+ self.nextStepTitle = "What are unused dependencies?"
1811
+
1812
+ def __str__(self):
1813
+ return json.dumps(self.__dict__)
1814
+
1815
+
1816
+ class urlStrings:
1817
+ description: str
1818
+ props: dict
1819
+ suggestion: str
1820
+ title: str
1821
+ emoji: str
1822
+ nextStepTitle: str
1823
+
1824
+ def __init__(self):
1825
+ self.description = "Package contains fragments of external URLs or IP addresses, which may indicate that it covertly exfiltrates data."
1826
+ self.props = {"urlFragment": "URL Fragment"}
1827
+ self.suggestion = "Avoid using packages that make connections to the network, since this helps to leak data."
1828
+ self.title = "URL strings"
1829
+ self.emoji = "\u26a0\ufe0f"
1830
+ self.nextStepTitle = "What are URL strings?"
1831
+
1832
+ def __str__(self):
1833
+ return json.dumps(self.__dict__)
1834
+
1835
+
1836
+ class usesEval:
1837
+ description: str
1838
+ props: dict
1839
+ suggestion: str
1840
+ title: str
1841
+ emoji: str
1842
+ capabilityName: str
1843
+ nextStepTitle: str
1844
+
1845
+ def __init__(self):
1846
+ self.description = "Package uses eval() which is a dangerous function. This prevents the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior."
1847
+ self.props = {"evalType": "Eval type"}
1848
+ self.suggestion = "Avoid packages that use eval, since this could potentially execute any code."
1849
+ self.title = "Uses eval"
1850
+ self.emoji = "\u26a0\ufe0f"
1851
+ self.capabilityName = "eval"
1852
+ self.nextStepTitle = "What is eval?"
1853
+
1854
+ def __str__(self):
1855
+ return json.dumps(self.__dict__)
1856
+
1857
+
1858
+ class zeroWidth:
1859
+ description: str
1860
+ suggestion: str
1861
+ title: str
1862
+ emoji: str
1863
+ nextStepTitle: str
1864
+
1865
+ def __init__(self):
1866
+ self.description = "Package files contain zero width unicode characters. This could indicate a supply chain attack."
1867
+ self.suggestion = "Packages should remove unnecessary zero width unicode characters and use their visible counterparts."
1868
+ self.title = "Zero width unicode chars"
1869
+ self.emoji = "\u26a0\ufe0f"
1870
+ self.nextStepTitle = "What are zero width unicode characters?"
1871
+
1872
+ def __str__(self):
1873
+ return json.dumps(self.__dict__)
1874
+
1875
+
1876
+ class floatingDependency:
1877
+ description: str
1878
+ suggestion: str
1879
+ title: str
1880
+ emoji: str
1881
+ nextStepTitle: str
1882
+ props: dict
1883
+
1884
+ def __init__(self):
1885
+ self.description = "Package has a dependency with a floating version range. This can cause issues if the dependency publishes a new major version."
1886
+ self.suggestion = "Packages should specify properly semver ranges to avoid version conflicts."
1887
+ self.title = "Floating dependency"
1888
+ self.emoji = "\ud83c\udf88"
1889
+ self.nextStepTitle = "What are floating dependencies?"
1890
+ self.props = {"dependency": "Dependency"}
1891
+
1892
+ def __str__(self):
1893
+ return json.dumps(self.__dict__)
1894
+
1895
+
1896
+ class unpopularPackage:
1897
+ description: str
1898
+ suggestion: str
1899
+ title: str
1900
+ emoji: str
1901
+ nextStepTitle: str
1902
+
1903
+ def __init__(self):
1904
+ self.description = "This package is not very popular."
1905
+ self.suggestion = "Unpopular packages may have less maintenance and contain other problems."
1906
+ self.title = "Unpopular package"
1907
+ self.emoji = "\ud83c\udfda\ufe0f"
1908
+ self.nextStepTitle = "What are unpopular packages?"
1909
+
1910
+ def __str__(self):
1911
+ return json.dumps(self.__dict__)
1912
+
1913
+
1914
+ class AllIssues:
1915
+ badEncoding: badEncoding
1916
+ badSemver: badSemver
1917
+ badSemverDependency: badSemverDependency
1918
+ bidi: bidi
1919
+ binScriptConfusion: binScriptConfusion
1920
+ chronoAnomaly: chronoAnomaly
1921
+ criticalCVE: criticalCVE
1922
+ cve: cve
1923
+ debugAccess: debugAccess
1924
+ deprecated: deprecated
1925
+ deprecatedException: deprecatedException
1926
+ explicitlyUnlicensedItem: explicitlyUnlicensedItem
1927
+ unidentifiedLicense: unidentifiedLicense
1928
+ noLicenseFound: noLicenseFound
1929
+ copyleftLicense: copyleftLicense
1930
+ nonpermissiveLicense: nonpermissiveLicense
1931
+ miscLicenseIssues: miscLicenseIssues
1932
+ deprecatedLicense: deprecatedLicense
1933
+ didYouMean: didYouMean
1934
+ dynamicRequire: dynamicRequire
1935
+ emptyPackage: emptyPackage
1936
+ envVars: envVars
1937
+ extraneousDependency: extraneousDependency
1938
+ fileDependency: fileDependency
1939
+ filesystemAccess: filesystemAccess
1940
+ gitDependency: gitDependency
1941
+ gitHubDependency: gitHubDependency
1942
+ hasNativeCode: hasNativeCode
1943
+ highEntropyStrings: highEntropyStrings
1944
+ homoglyphs: homoglyphs
1945
+ httpDependency: httpDependency
1946
+ installScripts: installScripts
1947
+ gptSecurity: gptSecurity
1948
+ gptAnomaly: gptAnomaly
1949
+ gptMalware: gptMalware
1950
+ potentialVulnerability: potentialVulnerability
1951
+ invalidPackageJSON: invalidPackageJSON
1952
+ invisibleChars: invisibleChars
1953
+ licenseChange: licenseChange
1954
+ licenseException: licenseException
1955
+ longStrings: longStrings
1956
+ missingTarball: missingTarball
1957
+ majorRefactor: majorRefactor
1958
+ malware: malware
1959
+ manifestConfusion: manifestConfusion
1960
+ mediumCVE: mediumCVE
1961
+ mildCVE: mildCVE
1962
+ minifiedFile: minifiedFile
1963
+ missingAuthor: missingAuthor
1964
+ missingDependency: missingDependency
1965
+ missingLicense: missingLicense
1966
+ mixedLicense: mixedLicense
1967
+ ambiguousClassifier: ambiguousClassifier
1968
+ modifiedException: modifiedException
1969
+ modifiedLicense: modifiedLicense
1970
+ networkAccess: networkAccess
1971
+ newAuthor: newAuthor
1972
+ noAuthorData: noAuthorData
1973
+ noBugTracker: noBugTracker
1974
+ noREADME: noREADME
1975
+ noRepository: noRepository
1976
+ noTests: noTests
1977
+ noV1: noV1
1978
+ noWebsite: noWebsite
1979
+ nonFSFLicense: nonFSFLicense
1980
+ nonOSILicense: nonOSILicense
1981
+ nonSPDXLicense: nonSPDXLicense
1982
+ notice: notice
1983
+ obfuscatedFile: obfuscatedFile
1984
+ obfuscatedRequire: obfuscatedRequire
1985
+ peerDependency: peerDependency
1986
+ semverAnomaly: semverAnomaly
1987
+ shellAccess: shellAccess
1988
+ shellScriptOverride: shellScriptOverride
1989
+ suspiciousString: suspiciousString
1990
+ telemetry: telemetry
1991
+ trivialPackage: trivialPackage
1992
+ troll: troll
1993
+ typeModuleCompatibility: typeModuleCompatibility
1994
+ uncaughtOptionalDependency: uncaughtOptionalDependency
1995
+ unclearLicense: unclearLicense
1996
+ shrinkwrap: shrinkwrap
1997
+ unmaintained: unmaintained
1998
+ unpublished: unpublished
1999
+ unresolvedRequire: unresolvedRequire
2000
+ unsafeCopyright: unsafeCopyright
2001
+ unstableOwnership: unstableOwnership
2002
+ unusedDependency: unusedDependency
2003
+ urlStrings: urlStrings
2004
+ usesEval: usesEval
2005
+ zeroWidth: zeroWidth
2006
+ floatingDependency: floatingDependency
2007
+ unpopularPackage: unpopularPackage
2008
+ def __init__(self):
2009
+ self.badEncoding = badEncoding()
2010
+ self.badSemver = badSemver()
2011
+ self.badSemverDependency = badSemverDependency()
2012
+ self.bidi = bidi()
2013
+ self.binScriptConfusion = binScriptConfusion()
2014
+ self.chronoAnomaly = chronoAnomaly()
2015
+ self.criticalCVE = criticalCVE()
2016
+ self.cve = cve()
2017
+ self.debugAccess = debugAccess()
2018
+ self.deprecated = deprecated()
2019
+ self.deprecatedException = deprecatedException()
2020
+ self.explicitlyUnlicensedItem = explicitlyUnlicensedItem()
2021
+ self.unidentifiedLicense = unidentifiedLicense()
2022
+ self.noLicenseFound = noLicenseFound()
2023
+ self.copyleftLicense = copyleftLicense()
2024
+ self.nonpermissiveLicense = nonpermissiveLicense()
2025
+ self.miscLicenseIssues = miscLicenseIssues()
2026
+ self.deprecatedLicense = deprecatedLicense()
2027
+ self.didYouMean = didYouMean()
2028
+ self.dynamicRequire = dynamicRequire()
2029
+ self.emptyPackage = emptyPackage()
2030
+ self.envVars = envVars()
2031
+ self.extraneousDependency = extraneousDependency()
2032
+ self.fileDependency = fileDependency()
2033
+ self.filesystemAccess = filesystemAccess()
2034
+ self.gitDependency = gitDependency()
2035
+ self.gitHubDependency = gitHubDependency()
2036
+ self.hasNativeCode = hasNativeCode()
2037
+ self.highEntropyStrings = highEntropyStrings()
2038
+ self.homoglyphs = homoglyphs()
2039
+ self.httpDependency = httpDependency()
2040
+ self.installScripts = installScripts()
2041
+ self.gptSecurity = gptSecurity()
2042
+ self.gptAnomaly = gptAnomaly()
2043
+ self.gptMalware = gptMalware()
2044
+ self.potentialVulnerability = potentialVulnerability()
2045
+ self.invalidPackageJSON = invalidPackageJSON()
2046
+ self.invisibleChars = invisibleChars()
2047
+ self.licenseChange = licenseChange()
2048
+ self.licenseException = licenseException()
2049
+ self.longStrings = longStrings()
2050
+ self.missingTarball = missingTarball()
2051
+ self.majorRefactor = majorRefactor()
2052
+ self.malware = malware()
2053
+ self.manifestConfusion = manifestConfusion()
2054
+ self.mediumCVE = mediumCVE()
2055
+ self.mildCVE = mildCVE()
2056
+ self.minifiedFile = minifiedFile()
2057
+ self.missingAuthor = missingAuthor()
2058
+ self.missingDependency = missingDependency()
2059
+ self.missingLicense = missingLicense()
2060
+ self.mixedLicense = mixedLicense()
2061
+ self.ambiguousClassifier = ambiguousClassifier()
2062
+ self.modifiedException = modifiedException()
2063
+ self.modifiedLicense = modifiedLicense()
2064
+ self.networkAccess = networkAccess()
2065
+ self.newAuthor = newAuthor()
2066
+ self.noAuthorData = noAuthorData()
2067
+ self.noBugTracker = noBugTracker()
2068
+ self.noREADME = noREADME()
2069
+ self.noRepository = noRepository()
2070
+ self.noTests = noTests()
2071
+ self.noV1 = noV1()
2072
+ self.noWebsite = noWebsite()
2073
+ self.nonFSFLicense = nonFSFLicense()
2074
+ self.nonOSILicense = nonOSILicense()
2075
+ self.nonSPDXLicense = nonSPDXLicense()
2076
+ self.notice = notice()
2077
+ self.obfuscatedFile = obfuscatedFile()
2078
+ self.obfuscatedRequire = obfuscatedRequire()
2079
+ self.peerDependency = peerDependency()
2080
+ self.semverAnomaly = semverAnomaly()
2081
+ self.shellAccess = shellAccess()
2082
+ self.shellScriptOverride = shellScriptOverride()
2083
+ self.suspiciousString = suspiciousString()
2084
+ self.telemetry = telemetry()
2085
+ self.trivialPackage = trivialPackage()
2086
+ self.troll = troll()
2087
+ self.typeModuleCompatibility = typeModuleCompatibility()
2088
+ self.uncaughtOptionalDependency = uncaughtOptionalDependency()
2089
+ self.unclearLicense = unclearLicense()
2090
+ self.shrinkwrap = shrinkwrap()
2091
+ self.unmaintained = unmaintained()
2092
+ self.unpublished = unpublished()
2093
+ self.unresolvedRequire = unresolvedRequire()
2094
+ self.unsafeCopyright = unsafeCopyright()
2095
+ self.unstableOwnership = unstableOwnership()
2096
+ self.unusedDependency = unusedDependency()
2097
+ self.urlStrings = urlStrings()
2098
+ self.usesEval = usesEval()
2099
+ self.zeroWidth = zeroWidth()
2100
+ self.floatingDependency = floatingDependency()
2101
+ self.unpopularPackage = unpopularPackage()