owasp-depscan 5.1.4__py3-none-any.whl → 5.1.5__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.

Potentially problematic release.


This version of owasp-depscan might be problematic. Click here for more details.

depscan/lib/config.py CHANGED
@@ -243,6 +243,8 @@ OS_PKG_TYPES = (
243
243
  "suse",
244
244
  "photon",
245
245
  "microsoft",
246
+ "wolfi",
247
+ "chainguard",
246
248
  )
247
249
 
248
250
  # List of Linux distros with support for editions
@@ -297,8 +299,22 @@ npm_app_info = {"name": "appthreat-depscan", "version": "1.0.0"}
297
299
 
298
300
  pypi_server = "https://pypi.org/pypi"
299
301
 
300
- vdb_database_url = "ghcr.io/appthreat/vdb:v5"
301
- vdb_rafs_database_url = "ghcr.io/appthreat/vdb:v5-rafs"
302
+ vdb_database_url = os.getenv("VDB_DATABASE_URL", "ghcr.io/appthreat/vdb:v5")
303
+ vdb_rafs_database_url = os.getenv(
304
+ "VDB_RAFS_DATABASE_URL", "ghcr.io/appthreat/vdb:v5-rafs"
305
+ )
306
+
307
+ # Larger 10 year database
308
+ vdb_10y_database_url = os.getenv(
309
+ "VDB_10Y_DATABASE_URL", "ghcr.io/appthreat/vdb-10y:v5"
310
+ )
311
+ vdb_10y_rafs_database_url = os.getenv(
312
+ "VDB_10Y_RAFS_DATABASE_URL", "ghcr.io/appthreat/vdb-10y:v5-rafs"
313
+ )
314
+
315
+ if os.getenv("USE_VDB_10Y", "") in ("true", "1"):
316
+ vdb_database_url = vdb_10y_database_url
317
+ vdb_rafs_database_url = vdb_10y_rafs_database_url
302
318
 
303
319
  # Package risk scoring using a simple weighted formula with no backing
304
320
  # research All parameters and their max value and weight can be overridden
@@ -322,7 +338,9 @@ mod_create_min_seconds = get_float_from_env(
322
338
  mod_create_min_seconds_max = get_float_from_env(
323
339
  "mod_create_min_seconds_max", 1000 * seconds_in_day
324
340
  )
325
- mod_create_min_seconds_weight = get_float_from_env("mod_create_min_seconds_weight", 1)
341
+ mod_create_min_seconds_weight = get_float_from_env(
342
+ "mod_create_min_seconds_weight", 1
343
+ )
326
344
 
327
345
  # At least 12 hours difference between the latest version and the current time
328
346
  latest_now_min_seconds = get_float_from_env(
@@ -331,7 +349,9 @@ latest_now_min_seconds = get_float_from_env(
331
349
  latest_now_min_seconds_max = get_float_from_env(
332
350
  "latest_now_min_seconds_max", 1000 * seconds_in_day
333
351
  )
334
- latest_now_min_seconds_weight = get_float_from_env("latest_now_min_seconds_weight", 0.5)
352
+ latest_now_min_seconds_weight = get_float_from_env(
353
+ "latest_now_min_seconds_weight", 0.5
354
+ )
335
355
 
336
356
  # Time period after which certain risks can be considered safe. Quarantine
337
357
  # period For eg: Packages that are over 1 year old
@@ -352,7 +372,9 @@ latest_now_max_seconds = get_float_from_env(
352
372
  latest_now_max_seconds_max = get_float_from_env(
353
373
  "latest_now_max_seconds_max", 6 * 365 * seconds_in_day
354
374
  )
355
- latest_now_max_seconds_weight = get_float_from_env("latest_now_max_seconds_weight", 0.5)
375
+ latest_now_max_seconds_weight = get_float_from_env(
376
+ "latest_now_max_seconds_weight", 0.5
377
+ )
356
378
 
357
379
  # Package should have at least 2 maintainers
358
380
  pkg_min_maintainers = get_float_from_env("pkg_min_maintainers", 2)
@@ -436,3 +458,89 @@ UNIVERSAL_SCAN_TYPE = "universal"
436
458
  max_reachable_explanations = get_int_from_env("max_reachable_explanations", 20)
437
459
 
438
460
  max_purl_per_flow = get_int_from_env("max_purl_per_flow", 6)
461
+
462
+ # List of CWEs that could lead to damages, exploits, and container escapes
463
+ OS_VULN_KEY_CWES = (
464
+ 20,
465
+ 23,
466
+ 24,
467
+ 25,
468
+ 26,
469
+ 27,
470
+ 28,
471
+ 29,
472
+ 30,
473
+ 31,
474
+ 32,
475
+ 33,
476
+ 34,
477
+ 35,
478
+ 36,
479
+ 37,
480
+ 38,
481
+ 39,
482
+ 40,
483
+ 58,
484
+ 61,
485
+ 62,
486
+ 64,
487
+ 65,
488
+ 67,
489
+ 69,
490
+ 73,
491
+ 77,
492
+ 78,
493
+ 79,
494
+ 91,
495
+ 119,
496
+ 120,
497
+ 121,
498
+ 122,
499
+ 125,
500
+ 126,
501
+ 127,
502
+ 200,
503
+ 250,
504
+ 264,
505
+ 269,
506
+ 279,
507
+ 416,
508
+ 422,
509
+ 439,
510
+ 502,
511
+ 506,
512
+ 507,
513
+ 508,
514
+ 509,
515
+ 510,
516
+ 511,
517
+ 512,
518
+ 514,
519
+ 515,
520
+ 552,
521
+ 553,
522
+ 786,
523
+ 787,
524
+ 788,
525
+ 789,
526
+ 862,
527
+ 1386,
528
+ )
529
+
530
+ max_distro_vulnerabilities = get_int_from_env("max_distro_vulnerabilities", 200)
531
+
532
+ OS_PKG_UNINSTALLABLE = (
533
+ "openssh",
534
+ "cups",
535
+ "imagemagick",
536
+ "curl",
537
+ "tar",
538
+ "git",
539
+ "avahi",
540
+ "libssh",
541
+ "subversion",
542
+ "vim",
543
+ "vim-minimal",
544
+ )
545
+
546
+ OS_PKG_IGNORABLE = ("linux", "systemd", "ncurses", "kernel")