owasp-depscan 5.0.4__py3-none-any.whl → 5.1.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.
Potentially problematic release.
This version of owasp-depscan might be problematic. Click here for more details.
- depscan/cli.py +2 -1
- depscan/lib/utils.py +16 -5
- {owasp_depscan-5.0.4.dist-info → owasp_depscan-5.1.0.dist-info}/METADATA +22 -5
- {owasp_depscan-5.0.4.dist-info → owasp_depscan-5.1.0.dist-info}/RECORD +8 -8
- {owasp_depscan-5.0.4.dist-info → owasp_depscan-5.1.0.dist-info}/LICENSE +0 -0
- {owasp_depscan-5.0.4.dist-info → owasp_depscan-5.1.0.dist-info}/WHEEL +0 -0
- {owasp_depscan-5.0.4.dist-info → owasp_depscan-5.1.0.dist-info}/entry_points.txt +0 -0
- {owasp_depscan-5.0.4.dist-info → owasp_depscan-5.1.0.dist-info}/top_level.txt +0 -0
depscan/cli.py
CHANGED
|
@@ -1115,7 +1115,8 @@ def main():
|
|
|
1115
1115
|
# render report into template if wished
|
|
1116
1116
|
if args.report_template and os.path.isfile(args.report_template):
|
|
1117
1117
|
utils.render_template_report(
|
|
1118
|
-
|
|
1118
|
+
vdr_file=vdr_file,
|
|
1119
|
+
bom_file=bom_file,
|
|
1119
1120
|
summary=summary,
|
|
1120
1121
|
template_file=args.report_template,
|
|
1121
1122
|
result_file=os.path.join(reports_dir, args.report_name),
|
depscan/lib/utils.py
CHANGED
|
@@ -413,22 +413,33 @@ def export_pdf(
|
|
|
413
413
|
|
|
414
414
|
|
|
415
415
|
def render_template_report(
|
|
416
|
-
|
|
416
|
+
vdr_file,
|
|
417
|
+
bom_file,
|
|
417
418
|
summary,
|
|
418
419
|
template_file,
|
|
419
420
|
result_file,
|
|
420
421
|
):
|
|
421
422
|
"""
|
|
422
|
-
Render the given
|
|
423
|
+
Render the given vdr_file (falling back to bom_file if no vdr was written)
|
|
424
|
+
and summary dict using the template_file with Jinja, rendered output is written
|
|
425
|
+
to named result_file in reports directory.
|
|
423
426
|
"""
|
|
424
|
-
|
|
425
|
-
|
|
427
|
+
if vdr_file and os.path.isfile(vdr_file):
|
|
428
|
+
with open(vdr_file, "r", encoding="utf-8") as f:
|
|
429
|
+
bom = json.load(f)
|
|
430
|
+
else:
|
|
431
|
+
with open(bom_file, "r", encoding="utf-8") as f:
|
|
432
|
+
bom = json.load(f)
|
|
426
433
|
with open(template_file, "r", encoding="utf-8") as tmpl_file:
|
|
427
434
|
template = tmpl_file.read()
|
|
428
435
|
jinja_env = Environment(autoescape=False)
|
|
429
436
|
jinja_tmpl = jinja_env.from_string(template)
|
|
430
437
|
report_result = jinja_tmpl.render(
|
|
431
|
-
|
|
438
|
+
metadata=bom.get('metadata', None),
|
|
439
|
+
vulnerabilities=bom.get('vulnerabilities', None),
|
|
440
|
+
components=bom.get('components', None),
|
|
441
|
+
dependencies=bom.get('dependencies', None),
|
|
442
|
+
services=bom.get('services', None),
|
|
432
443
|
summary=summary,
|
|
433
444
|
)
|
|
434
445
|
with open(result_file, "w", encoding="utf-8") as outfile:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: owasp-depscan
|
|
3
|
-
Version: 5.0
|
|
3
|
+
Version: 5.1.0
|
|
4
4
|
Summary: Fully open-source security audit for project dependencies based on known vulnerabilities and advisories.
|
|
5
5
|
Author-email: Team AppThreat <cloud@appthreat.com>
|
|
6
6
|
License: MIT
|
|
@@ -20,7 +20,7 @@ Classifier: Topic :: Utilities
|
|
|
20
20
|
Requires-Python: >=3.8
|
|
21
21
|
Description-Content-Type: text/markdown
|
|
22
22
|
License-File: LICENSE
|
|
23
|
-
Requires-Dist: appthreat-vulnerability-db >=5.5.
|
|
23
|
+
Requires-Dist: appthreat-vulnerability-db >=5.5.6
|
|
24
24
|
Requires-Dist: defusedxml
|
|
25
25
|
Requires-Dist: oras
|
|
26
26
|
Requires-Dist: PyYAML
|
|
@@ -461,11 +461,19 @@ Giving it will pass the vulnerability report into your template for rendering th
|
|
|
461
461
|
Please find a basic example here:
|
|
462
462
|
|
|
463
463
|
```jinja
|
|
464
|
+
{% if metadata -%}
|
|
465
|
+
Report for {{ metadata.component.group }}:{{ metadata.component.name }}:{{ metadata.component.version }}
|
|
466
|
+
{% endif -%}
|
|
467
|
+
|
|
468
|
+
{% if vulnerabilities -%}
|
|
464
469
|
There were {{ vulnerabilities | length }} issues identified:
|
|
465
470
|
|
|
466
471
|
{% for vuln in vulnerabilities -%}
|
|
467
|
-
* {{ vuln
|
|
468
|
-
{% endfor
|
|
472
|
+
* {{ vuln['bom-ref'] }} - {{ vuln.recommendation }}
|
|
473
|
+
{% endfor -%}
|
|
474
|
+
{% else -%}
|
|
475
|
+
🏆 _No vulnerabilities found_
|
|
476
|
+
{% endif -%}
|
|
469
477
|
|
|
470
478
|
Severity counts:
|
|
471
479
|
* Low: {{ summary.LOW }}
|
|
@@ -475,10 +483,19 @@ Severity counts:
|
|
|
475
483
|
* Unspecified: {{ summary.UNSPECIFIED }}
|
|
476
484
|
```
|
|
477
485
|
|
|
478
|
-
The
|
|
486
|
+
The objects available are taken from the CycloneDX *.vdr.json BOM file generated, just have a look to the file for its full structure:
|
|
487
|
+
|
|
488
|
+
* `metadata`
|
|
489
|
+
* `vulnerabilities`
|
|
490
|
+
* `components`
|
|
491
|
+
* `dependencies`
|
|
492
|
+
* `services`
|
|
493
|
+
|
|
479
494
|
`summary` is a dictionary type with vulnerability severity quantities as shown in the example above.
|
|
480
495
|
Furthermore insights are imaginably to be made available to the template, please reach out or contribute on demand.
|
|
481
496
|
|
|
497
|
+
We appreciate if you like to contribute your report templates as examples, please add/find them [here](contrib/report-templates/).
|
|
498
|
+
|
|
482
499
|
## Discord support
|
|
483
500
|
|
|
484
501
|
The developers could be reached via the [discord](https://discord.gg/DCNxzaeUpd) channel for enterprise support.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
depscan/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
-
depscan/cli.py,sha256=
|
|
2
|
+
depscan/cli.py,sha256=rKylWBHfAPrNwn1OD5eRA3dADcaVtH1XdFSpTDy5L8w,40380
|
|
3
3
|
depscan/lib/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
4
4
|
depscan/lib/analysis.py,sha256=GdrQbZRorQcTf4_8lC5C11phbI1iIJUNx9FhqgF4agc,50988
|
|
5
5
|
depscan/lib/audit.py,sha256=6GmHOkhDYY1LCIRd-wUSrSISh6_IFR5PhOopPJIQTeE,1318
|
|
@@ -12,7 +12,7 @@ depscan/lib/license.py,sha256=y4-WZuD2MOunKaLd2EJGcSYP6s3Lp_dgssdzhcl9eEM,2332
|
|
|
12
12
|
depscan/lib/logger.py,sha256=UKsx_sKuSvkoR7Co4WwUzWe56Aidv0cNFQJM7lXU018,1576
|
|
13
13
|
depscan/lib/normalize.py,sha256=HOK6HPgX-wakYuUa6to81Z38atQ1iYXHF-s6nsIrsPU,10298
|
|
14
14
|
depscan/lib/pkg_query.py,sha256=Hlf3LypsL7EF309HevcfhdjAOPDZbN1XRQOmjQpnxlI,20082
|
|
15
|
-
depscan/lib/utils.py,sha256=
|
|
15
|
+
depscan/lib/utils.py,sha256=fAG6eTRqEvmmbPOsMBdgQzaKo4KWAYdijRgn-_MX6t8,14428
|
|
16
16
|
vendor/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
17
17
|
vendor/choosealicense.com/_data/fields.yml,sha256=ydNsITXFUuADzGPM-jcUcJnN0r_qSGgH51oV27nX3Qs,819
|
|
18
18
|
vendor/choosealicense.com/_data/meta.yml,sha256=rSNmnx0LE6VA9wnR29Y_P9s-TnADQqbdw2enE4i1mWM,1792
|
|
@@ -63,9 +63,9 @@ vendor/choosealicense.com/_licenses/vim.txt,sha256=d5GQjXB328L8EBkhKgxcjk344D3K7
|
|
|
63
63
|
vendor/choosealicense.com/_licenses/wtfpl.txt,sha256=BxXeubkvQm32MDmlZsBcbzJzBpR5kWgw0JxSR9d7f3k,948
|
|
64
64
|
vendor/choosealicense.com/_licenses/zlib.txt,sha256=e6dfCeLhxD3NCnIkY4cVIagRaWdRvencjNhHZ1APvpc,1678
|
|
65
65
|
vendor/spdx/json/licenses.json,sha256=_Vz_aACEg-giVk08ZBQLqB5Z3AnSWZmdD9I22ID3QNs,275192
|
|
66
|
-
owasp_depscan-5.0.
|
|
67
|
-
owasp_depscan-5.0.
|
|
68
|
-
owasp_depscan-5.0.
|
|
69
|
-
owasp_depscan-5.0.
|
|
70
|
-
owasp_depscan-5.0.
|
|
71
|
-
owasp_depscan-5.0.
|
|
66
|
+
owasp_depscan-5.1.0.dist-info/LICENSE,sha256=oQnCbnZtJ_NLDdOLc-rVY1D1N0RNWLHPpYXcc77xzSo,1073
|
|
67
|
+
owasp_depscan-5.1.0.dist-info/METADATA,sha256=Gf3cPNsgde0RurILElnXXVKasNqsXKzgtbpPwtTGeCw,24705
|
|
68
|
+
owasp_depscan-5.1.0.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
|
|
69
|
+
owasp_depscan-5.1.0.dist-info/entry_points.txt,sha256=FxQKHFWZTfKU2eBxHPFRxwhSNexntYygYhquykS8zxA,69
|
|
70
|
+
owasp_depscan-5.1.0.dist-info/top_level.txt,sha256=qbHOZvNU2dXANv946hMdP2vOi0ESQB5t2ZY5ktKtXvQ,15
|
|
71
|
+
owasp_depscan-5.1.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|