owasp-depscan 5.5.0__tar.gz → 6.0.0a3__tar.gz
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.
- owasp_depscan-6.0.0a3/PKG-INFO +388 -0
- owasp_depscan-6.0.0a3/README.md +332 -0
- owasp_depscan-6.0.0a3/depscan/__init__.py +8 -0
- owasp_depscan-6.0.0a3/depscan/cli.py +1008 -0
- owasp_depscan-6.0.0a3/depscan/cli_options.py +302 -0
- {owasp_depscan-5.5.0 → owasp_depscan-6.0.0a3}/depscan/lib/audit.py +3 -1
- owasp_depscan-6.0.0a3/depscan/lib/bom.py +576 -0
- owasp_depscan-6.0.0a3/depscan/lib/config.py +321 -0
- owasp_depscan-6.0.0a3/depscan/lib/explainer.py +571 -0
- {owasp_depscan-5.5.0 → owasp_depscan-6.0.0a3}/depscan/lib/license.py +11 -10
- owasp_depscan-6.0.0a3/depscan/lib/logger.py +119 -0
- owasp_depscan-6.0.0a3/depscan/lib/package_query/cargo_pkg.py +124 -0
- owasp_depscan-6.0.0a3/depscan/lib/package_query/metadata.py +170 -0
- owasp_depscan-6.0.0a3/depscan/lib/package_query/npm_pkg.py +345 -0
- owasp_depscan-6.0.0a3/depscan/lib/package_query/pkg_query.py +195 -0
- owasp_depscan-6.0.0a3/depscan/lib/package_query/pypi_pkg.py +113 -0
- owasp_depscan-6.0.0a3/depscan/lib/tomlparse.py +116 -0
- {owasp_depscan-5.5.0 → owasp_depscan-6.0.0a3}/depscan/lib/utils.py +34 -188
- owasp_depscan-6.0.0a3/owasp_depscan.egg-info/PKG-INFO +388 -0
- {owasp_depscan-5.5.0 → owasp_depscan-6.0.0a3}/owasp_depscan.egg-info/SOURCES.txt +8 -8
- owasp_depscan-6.0.0a3/owasp_depscan.egg-info/requires.txt +39 -0
- owasp_depscan-6.0.0a3/pyproject.toml +98 -0
- {owasp_depscan-5.5.0 → owasp_depscan-6.0.0a3}/test/test_bom.py +1 -50
- {owasp_depscan-5.5.0 → owasp_depscan-6.0.0a3}/test/test_explainer.py +4 -3
- {owasp_depscan-5.5.0 → owasp_depscan-6.0.0a3}/test/test_license.py +1 -3
- {owasp_depscan-5.5.0 → owasp_depscan-6.0.0a3}/test/test_pkg_query.py +112 -17
- {owasp_depscan-5.5.0 → owasp_depscan-6.0.0a3}/test/test_utils.py +12 -66
- {owasp_depscan-5.5.0 → owasp_depscan-6.0.0a3}/vendor/choosealicense.com/_licenses/cern-ohl-p-2.0.txt +1 -1
- {owasp_depscan-5.5.0 → owasp_depscan-6.0.0a3}/vendor/choosealicense.com/_licenses/cern-ohl-s-2.0.txt +1 -1
- {owasp_depscan-5.5.0 → owasp_depscan-6.0.0a3}/vendor/choosealicense.com/_licenses/cern-ohl-w-2.0.txt +2 -2
- {owasp_depscan-5.5.0 → owasp_depscan-6.0.0a3}/vendor/choosealicense.com/_licenses/mit-0.txt +1 -1
- {owasp_depscan-5.5.0 → owasp_depscan-6.0.0a3}/vendor/spdx/json/licenses.json +904 -677
- owasp_depscan-5.5.0/PKG-INFO +0 -580
- owasp_depscan-5.5.0/README.md +0 -539
- owasp_depscan-5.5.0/depscan/cli.py +0 -1116
- owasp_depscan-5.5.0/depscan/lib/analysis.py +0 -1554
- owasp_depscan-5.5.0/depscan/lib/bom.py +0 -478
- owasp_depscan-5.5.0/depscan/lib/config.py +0 -572
- owasp_depscan-5.5.0/depscan/lib/csaf.py +0 -1860
- owasp_depscan-5.5.0/depscan/lib/explainer.py +0 -283
- owasp_depscan-5.5.0/depscan/lib/logger.py +0 -71
- owasp_depscan-5.5.0/depscan/lib/normalize.py +0 -312
- owasp_depscan-5.5.0/depscan/lib/orasclient.py +0 -142
- owasp_depscan-5.5.0/depscan/lib/pkg_query.py +0 -532
- owasp_depscan-5.5.0/owasp_depscan.egg-info/PKG-INFO +0 -580
- owasp_depscan-5.5.0/owasp_depscan.egg-info/requires.txt +0 -19
- owasp_depscan-5.5.0/pyproject.toml +0 -74
- owasp_depscan-5.5.0/test/test_analysis.py +0 -772
- owasp_depscan-5.5.0/test/test_csaf.py +0 -1055
- owasp_depscan-5.5.0/test/test_norm.py +0 -128
- {owasp_depscan-5.5.0 → owasp_depscan-6.0.0a3}/LICENSE +0 -0
- {owasp_depscan-5.5.0 → owasp_depscan-6.0.0a3}/MANIFEST.in +0 -0
- {owasp_depscan-5.5.0/depscan → owasp_depscan-6.0.0a3/depscan/lib}/__init__.py +0 -0
- {owasp_depscan-5.5.0 → owasp_depscan-6.0.0a3}/depscan/lib/github.py +0 -0
- {owasp_depscan-5.5.0/depscan/lib → owasp_depscan-6.0.0a3/depscan/lib/package_query}/__init__.py +0 -0
- {owasp_depscan-5.5.0 → owasp_depscan-6.0.0a3}/owasp_depscan.egg-info/dependency_links.txt +0 -0
- {owasp_depscan-5.5.0 → owasp_depscan-6.0.0a3}/owasp_depscan.egg-info/entry_points.txt +0 -0
- {owasp_depscan-5.5.0 → owasp_depscan-6.0.0a3}/owasp_depscan.egg-info/top_level.txt +0 -0
- {owasp_depscan-5.5.0 → owasp_depscan-6.0.0a3}/setup.cfg +0 -0
- {owasp_depscan-5.5.0 → owasp_depscan-6.0.0a3}/test/test_github.py +0 -0
- {owasp_depscan-5.5.0 → owasp_depscan-6.0.0a3}/vendor/__init__.py +0 -0
- {owasp_depscan-5.5.0 → owasp_depscan-6.0.0a3}/vendor/choosealicense.com/_data/fields.yml +0 -0
- {owasp_depscan-5.5.0 → owasp_depscan-6.0.0a3}/vendor/choosealicense.com/_data/meta.yml +0 -0
- {owasp_depscan-5.5.0 → owasp_depscan-6.0.0a3}/vendor/choosealicense.com/_data/rules.yml +0 -0
- {owasp_depscan-5.5.0 → owasp_depscan-6.0.0a3}/vendor/choosealicense.com/_licenses/0bsd.txt +0 -0
- {owasp_depscan-5.5.0 → owasp_depscan-6.0.0a3}/vendor/choosealicense.com/_licenses/afl-3.0.txt +0 -0
- {owasp_depscan-5.5.0 → owasp_depscan-6.0.0a3}/vendor/choosealicense.com/_licenses/agpl-3.0.txt +0 -0
- {owasp_depscan-5.5.0 → owasp_depscan-6.0.0a3}/vendor/choosealicense.com/_licenses/apache-2.0.txt +0 -0
- {owasp_depscan-5.5.0 → owasp_depscan-6.0.0a3}/vendor/choosealicense.com/_licenses/artistic-2.0.txt +0 -0
- {owasp_depscan-5.5.0 → owasp_depscan-6.0.0a3}/vendor/choosealicense.com/_licenses/blueoak-1.0.0.txt +0 -0
- {owasp_depscan-5.5.0 → owasp_depscan-6.0.0a3}/vendor/choosealicense.com/_licenses/bsd-2-clause-patent.txt +0 -0
- {owasp_depscan-5.5.0 → owasp_depscan-6.0.0a3}/vendor/choosealicense.com/_licenses/bsd-2-clause.txt +0 -0
- {owasp_depscan-5.5.0 → owasp_depscan-6.0.0a3}/vendor/choosealicense.com/_licenses/bsd-3-clause-clear.txt +0 -0
- {owasp_depscan-5.5.0 → owasp_depscan-6.0.0a3}/vendor/choosealicense.com/_licenses/bsd-3-clause.txt +0 -0
- {owasp_depscan-5.5.0 → owasp_depscan-6.0.0a3}/vendor/choosealicense.com/_licenses/bsd-4-clause.txt +0 -0
- {owasp_depscan-5.5.0 → owasp_depscan-6.0.0a3}/vendor/choosealicense.com/_licenses/bsl-1.0.txt +0 -0
- {owasp_depscan-5.5.0 → owasp_depscan-6.0.0a3}/vendor/choosealicense.com/_licenses/cc-by-4.0.txt +0 -0
- {owasp_depscan-5.5.0 → owasp_depscan-6.0.0a3}/vendor/choosealicense.com/_licenses/cc-by-sa-4.0.txt +0 -0
- {owasp_depscan-5.5.0 → owasp_depscan-6.0.0a3}/vendor/choosealicense.com/_licenses/cc0-1.0.txt +0 -0
- {owasp_depscan-5.5.0 → owasp_depscan-6.0.0a3}/vendor/choosealicense.com/_licenses/cecill-2.1.txt +0 -0
- {owasp_depscan-5.5.0 → owasp_depscan-6.0.0a3}/vendor/choosealicense.com/_licenses/ecl-2.0.txt +0 -0
- {owasp_depscan-5.5.0 → owasp_depscan-6.0.0a3}/vendor/choosealicense.com/_licenses/epl-1.0.txt +0 -0
- {owasp_depscan-5.5.0 → owasp_depscan-6.0.0a3}/vendor/choosealicense.com/_licenses/epl-2.0.txt +0 -0
- {owasp_depscan-5.5.0 → owasp_depscan-6.0.0a3}/vendor/choosealicense.com/_licenses/eupl-1.1.txt +0 -0
- {owasp_depscan-5.5.0 → owasp_depscan-6.0.0a3}/vendor/choosealicense.com/_licenses/eupl-1.2.txt +0 -0
- {owasp_depscan-5.5.0 → owasp_depscan-6.0.0a3}/vendor/choosealicense.com/_licenses/gfdl-1.3.txt +0 -0
- {owasp_depscan-5.5.0 → owasp_depscan-6.0.0a3}/vendor/choosealicense.com/_licenses/gpl-2.0.txt +0 -0
- {owasp_depscan-5.5.0 → owasp_depscan-6.0.0a3}/vendor/choosealicense.com/_licenses/gpl-3.0.txt +0 -0
- {owasp_depscan-5.5.0 → owasp_depscan-6.0.0a3}/vendor/choosealicense.com/_licenses/isc.txt +0 -0
- {owasp_depscan-5.5.0 → owasp_depscan-6.0.0a3}/vendor/choosealicense.com/_licenses/lgpl-2.1.txt +0 -0
- {owasp_depscan-5.5.0 → owasp_depscan-6.0.0a3}/vendor/choosealicense.com/_licenses/lgpl-3.0.txt +0 -0
- {owasp_depscan-5.5.0 → owasp_depscan-6.0.0a3}/vendor/choosealicense.com/_licenses/lppl-1.3c.txt +0 -0
- {owasp_depscan-5.5.0 → owasp_depscan-6.0.0a3}/vendor/choosealicense.com/_licenses/mit.txt +0 -0
- {owasp_depscan-5.5.0 → owasp_depscan-6.0.0a3}/vendor/choosealicense.com/_licenses/mpl-2.0.txt +0 -0
- {owasp_depscan-5.5.0 → owasp_depscan-6.0.0a3}/vendor/choosealicense.com/_licenses/ms-pl.txt +0 -0
- {owasp_depscan-5.5.0 → owasp_depscan-6.0.0a3}/vendor/choosealicense.com/_licenses/ms-rl.txt +0 -0
- {owasp_depscan-5.5.0 → owasp_depscan-6.0.0a3}/vendor/choosealicense.com/_licenses/mulanpsl-2.0.txt +0 -0
- {owasp_depscan-5.5.0 → owasp_depscan-6.0.0a3}/vendor/choosealicense.com/_licenses/ncsa.txt +0 -0
- {owasp_depscan-5.5.0 → owasp_depscan-6.0.0a3}/vendor/choosealicense.com/_licenses/odbl-1.0.txt +0 -0
- {owasp_depscan-5.5.0 → owasp_depscan-6.0.0a3}/vendor/choosealicense.com/_licenses/ofl-1.1.txt +0 -0
- {owasp_depscan-5.5.0 → owasp_depscan-6.0.0a3}/vendor/choosealicense.com/_licenses/osl-3.0.txt +0 -0
- {owasp_depscan-5.5.0 → owasp_depscan-6.0.0a3}/vendor/choosealicense.com/_licenses/postgresql.txt +0 -0
- {owasp_depscan-5.5.0 → owasp_depscan-6.0.0a3}/vendor/choosealicense.com/_licenses/unlicense.txt +0 -0
- {owasp_depscan-5.5.0 → owasp_depscan-6.0.0a3}/vendor/choosealicense.com/_licenses/upl-1.0.txt +0 -0
- {owasp_depscan-5.5.0 → owasp_depscan-6.0.0a3}/vendor/choosealicense.com/_licenses/vim.txt +0 -0
- {owasp_depscan-5.5.0 → owasp_depscan-6.0.0a3}/vendor/choosealicense.com/_licenses/wtfpl.txt +0 -0
- {owasp_depscan-5.5.0 → owasp_depscan-6.0.0a3}/vendor/choosealicense.com/_licenses/zlib.txt +0 -0
|
@@ -0,0 +1,388 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: owasp-depscan
|
|
3
|
+
Version: 6.0.0a3
|
|
4
|
+
Summary: Fully open-source security audit for project dependencies based on known vulnerabilities and advisories.
|
|
5
|
+
Author-email: Team AppThreat <cloud@appthreat.com>
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/owasp-dep-scan/dep-scan
|
|
8
|
+
Project-URL: Bug-Tracker, https://github.com/owasp-dep-scan/dep-scan/issues
|
|
9
|
+
Project-URL: Funding, https://owasp.org/donate/?reponame=www-project-dep-scan&title=OWASP+depscan
|
|
10
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
11
|
+
Classifier: Intended Audience :: Developers
|
|
12
|
+
Classifier: Intended Audience :: System Administrators
|
|
13
|
+
Classifier: Operating System :: OS Independent
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
18
|
+
Classifier: Topic :: Security
|
|
19
|
+
Classifier: Topic :: Utilities
|
|
20
|
+
Requires-Python: >=3.10
|
|
21
|
+
Description-Content-Type: text/markdown
|
|
22
|
+
License-File: LICENSE
|
|
23
|
+
Requires-Dist: appthreat-vulnerability-db[oras]
|
|
24
|
+
Requires-Dist: custom-json-diff>=2.1.6
|
|
25
|
+
Requires-Dist: defusedxml>=0.7.1
|
|
26
|
+
Requires-Dist: PyYAML>=6.0.2
|
|
27
|
+
Requires-Dist: rich>=14.0.0
|
|
28
|
+
Requires-Dist: Jinja2>=3.1.6
|
|
29
|
+
Requires-Dist: packageurl-python>=0.16.0
|
|
30
|
+
Requires-Dist: cvss>=3.4
|
|
31
|
+
Requires-Dist: tomli>=2.2.1; python_full_version <= "3.11"
|
|
32
|
+
Requires-Dist: ds-xbom-lib
|
|
33
|
+
Requires-Dist: ds-analysis-lib
|
|
34
|
+
Provides-Extra: dev
|
|
35
|
+
Requires-Dist: black>=25.1.0; extra == "dev"
|
|
36
|
+
Requires-Dist: flake8>=7.1.2; extra == "dev"
|
|
37
|
+
Requires-Dist: pytest>=8.3.4; extra == "dev"
|
|
38
|
+
Requires-Dist: pytest-cov>=6.0.0; extra == "dev"
|
|
39
|
+
Requires-Dist: httpretty>=1.1.4; extra == "dev"
|
|
40
|
+
Provides-Extra: server
|
|
41
|
+
Requires-Dist: quart>=0.20.0; extra == "server"
|
|
42
|
+
Provides-Extra: ext
|
|
43
|
+
Requires-Dist: atom-tools>=0.7.8; extra == "ext"
|
|
44
|
+
Requires-Dist: blint>=2.4.1; extra == "ext"
|
|
45
|
+
Requires-Dist: pdfkit>=1.0.0; extra == "ext"
|
|
46
|
+
Provides-Extra: perf
|
|
47
|
+
Requires-Dist: hishel[redis]>=0.1.1; extra == "perf"
|
|
48
|
+
Provides-Extra: all
|
|
49
|
+
Requires-Dist: atom-tools>=0.7.8; extra == "all"
|
|
50
|
+
Requires-Dist: blint>=2.4.1; extra == "all"
|
|
51
|
+
Requires-Dist: quart>=0.20.0; extra == "all"
|
|
52
|
+
Requires-Dist: pdfkit>=1.0.0; extra == "all"
|
|
53
|
+
Requires-Dist: PyGithub>=2.6.1; extra == "all"
|
|
54
|
+
Requires-Dist: hishel[redis]>=0.1.1; extra == "all"
|
|
55
|
+
Dynamic: license-file
|
|
56
|
+
|
|
57
|
+
# Introduction
|
|
58
|
+
|
|
59
|
+
OWASP dep-scan is a next-generation security and risk audit tool based on known vulnerabilities, advisories, and license limitations for project dependencies. Both local repositories and container images are supported as the input, and the tool is ideal for integration with ASPM/VM platforms and in CI environments.
|
|
60
|
+
|
|
61
|
+

|
|
62
|
+
|
|
63
|
+
[](https://github.com/owasp-dep-scan/dep-scan/actions/workflows/pythonpublish.yml)
|
|
64
|
+
|
|
65
|
+
## Contents
|
|
66
|
+
|
|
67
|
+
- [Features](#features)
|
|
68
|
+
- [Vulnerability Data sources](#vulnerability-data-sources)
|
|
69
|
+
- [Linux distros](#linux-distros)
|
|
70
|
+
- [Quick Start](#quick-start)
|
|
71
|
+
- [Scanning projects locally (Python version)](#scanning-projects-locally-python-version)
|
|
72
|
+
- [Scanning containers locally (Python version)](#scanning-containers-locally-python-version)
|
|
73
|
+
- [Scanning projects locally (Docker container)](#scanning-projects-locally-docker-container)
|
|
74
|
+
- [Server mode](#server-mode)
|
|
75
|
+
- [depscanGPT](https://chatgpt.com/g/g-674f260c887c819194e465d2c65f4061-owasp-dep-scan)
|
|
76
|
+
- [Documentation (depscan.readthedocs.io)](https://depscan.readthedocs.io)
|
|
77
|
+
- [Supported languages and package format](https://depscan.readthedocs.io/supported-languages)
|
|
78
|
+
- [Reachability analysis](https://depscan.readthedocs.io/reachability-analysis)
|
|
79
|
+
- [Example analysis for a Java project](https://depscan.readthedocs.io/reachability-analysis#example-analysis-for-a-java-project)
|
|
80
|
+
- [Example analysis for a JavaScript project](https://depscan.readthedocs.io/reachability-analysis#example-analysis-for-a-java-project)
|
|
81
|
+
- [Customization through environment variables](https://depscan.readthedocs.io/env-var#customization-through-environment-variables)
|
|
82
|
+
- [GitHub Security Advisory](https://depscan.readthedocs.io/adv-usage#github-security-advisory)
|
|
83
|
+
- [Suggest mode](https://depscan.readthedocs.io/adv-usage#suggest-mode)
|
|
84
|
+
- [Package Risk audit](https://depscan.readthedocs.io/adv-usage#package-risk-audit)
|
|
85
|
+
- [Automatic adjustment](https://depscan.readthedocs.io/adv-usage#automatic-adjustment)
|
|
86
|
+
- [Configuring weights](https://depscan.readthedocs.io/adv-usage#configuring-weights)
|
|
87
|
+
- [Live OS scan](https://depscan.readthedocs.io/adv-usage#live-os-scan)
|
|
88
|
+
- [License scan](https://depscan.readthedocs.io/adv-usage#license-scan)
|
|
89
|
+
- [Kubernetes and Cloud apps](https://depscan.readthedocs.io/adv-usage#kubernetes-and-cloud-apps)
|
|
90
|
+
- [PDF reports](https://depscan.readthedocs.io/adv-usage#pdf-reports)
|
|
91
|
+
- [Custom reports](https://depscan.readthedocs.io/adv-usage#custom-reports)
|
|
92
|
+
- [License](#license)
|
|
93
|
+
|
|
94
|
+
## Features
|
|
95
|
+
|
|
96
|
+
- Scan most application code - local repos, Linux container images, Kubernetes manifests, and OS - to identify known CVEs with prioritization
|
|
97
|
+
- Perform advanced reachability analysis for multiple languages (See reachability analysis)
|
|
98
|
+
- Package vulnerability scanning is performed locally and is quite fast. No server is used!
|
|
99
|
+
- Generate Software Bill-of-Materials (SBOM) with Vulnerability Disclosure Report (VDR) information
|
|
100
|
+
- Generate a Common Security Advisory Framework (CSAF) 2.0 VEX document (check out the [CSAF Readme](contrib/CSAF_README.md))
|
|
101
|
+
- Perform deep packages risk audit for dependency confusion attacks and maintenance risks (See risk audit)
|
|
102
|
+
|
|
103
|
+
### Precise Reachable data-flows
|
|
104
|
+
|
|
105
|
+
Detailed data flows to identify both reachable and non-reachable paths in your application based on the full context.
|
|
106
|
+
|
|
107
|
+

|
|
108
|
+
|
|
109
|
+
### Clear insights about CVEs
|
|
110
|
+
|
|
111
|
+
Understand CVEs clearly without having to read through the description.
|
|
112
|
+
|
|
113
|
+

|
|
114
|
+
|
|
115
|
+
### Automatic prioritization
|
|
116
|
+
|
|
117
|
+
Only focus on CVEs that need your attention.
|
|
118
|
+
|
|
119
|
+

|
|
120
|
+
|
|
121
|
+
### Stay proactive
|
|
122
|
+
|
|
123
|
+
Always stay a step ahead with advanced vulnerability and exploit prediction.
|
|
124
|
+
|
|
125
|
+

|
|
126
|
+
|
|
127
|
+
### Vulnerability Data sources
|
|
128
|
+
|
|
129
|
+
- OSV
|
|
130
|
+
- NVD
|
|
131
|
+
- GitHub
|
|
132
|
+
- NPM
|
|
133
|
+
- Linux [vuln-list](https://github.com/appthreat/vuln-list)
|
|
134
|
+
|
|
135
|
+
### Linux distros
|
|
136
|
+
|
|
137
|
+
- AlmaLinux
|
|
138
|
+
- Debian
|
|
139
|
+
- Alpine
|
|
140
|
+
- Amazon Linux
|
|
141
|
+
- Arch Linux
|
|
142
|
+
- RHEL/CentOS
|
|
143
|
+
- Rocky Linux
|
|
144
|
+
- Ubuntu
|
|
145
|
+
- OpenSUSE/SLES
|
|
146
|
+
- Photon
|
|
147
|
+
- Chainguard
|
|
148
|
+
- Wolfi OS
|
|
149
|
+
|
|
150
|
+
## Quick Start
|
|
151
|
+
|
|
152
|
+
dep-scan is ideal for use during continuous integration (CI) and as a local development tool.
|
|
153
|
+
|
|
154
|
+
### Scanning projects locally (Python version)
|
|
155
|
+
|
|
156
|
+
```bash
|
|
157
|
+
sudo npm install -g @cyclonedx/cdxgen
|
|
158
|
+
# Normal version recommended for most users (MIT)
|
|
159
|
+
pip install owasp-depscan
|
|
160
|
+
|
|
161
|
+
# For a full version with all extensions and server mode (Multiple Licenses)
|
|
162
|
+
pip install owasp-depscan[all]
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
This would install two commands called `cdxgen` and `depscan`.
|
|
166
|
+
|
|
167
|
+
You can invoke the scan command directly with the various options.
|
|
168
|
+
|
|
169
|
+
```bash
|
|
170
|
+
cd <project to scan>
|
|
171
|
+
depscan --src $PWD --reports-dir $PWD/reports
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
The full list of options is below:
|
|
175
|
+
|
|
176
|
+
```text
|
|
177
|
+
usage: depscan [-h] [--config CONFIG] [--no-banner] [-i SRC_DIR_IMAGE] [-o REPORTS_DIR] [--csaf]
|
|
178
|
+
[--profile {appsec,research,operational,threat-modeling,license-compliance,generic,machine-learning,ml,deep-learning,ml-deep,ml-tiny}]
|
|
179
|
+
[--lifecycle {pre-build,build,post-build} [{pre-build,build,post-build} ...]]
|
|
180
|
+
[--technique {auto,source-code-analysis,binary-analysis,manifest-analysis,hash-comparison,instrumentation,filename} [{auto,source-code-analysis,binary-analysis,manifest-analysis,hash-comparison,instrumentation,filename} ...]]
|
|
181
|
+
[--bom-engine {auto,CdxgenGenerator,CdxgenServerGenerator,CdxgenImageBasedGenerator,BlintGenerator} |
|
|
182
|
+
--vulnerability-analyzer {auto,VDRAnalyzer,LifecycleAnalyzer}] [--reachability-analyzer {off,FrameworkReachability,SemanticReachability}] [--no-suggest]
|
|
183
|
+
[--risk-audit] [--cdxgen-args CDXGEN_ARGS] [--private-ns PRIVATE_NS] [-t PROJECT_TYPE [PROJECT_TYPE ...]] [--bom BOM | --bom-dir BOM_DIR | --purl SEARCH_PURL]
|
|
184
|
+
[--report-template REPORT_TEMPLATE] [--report-name REPORT_NAME] [--deep] [--fuzzy-search] [--search-order {purl,pcu,cpe,cpu,url}] [--no-universal]
|
|
185
|
+
[--no-vuln-table] [--server] [--server-host SERVER_HOST] [--server-port SERVER_PORT] [--cdxgen-server CDXGEN_SERVER] [--debug] [-q | --explain] [-v]
|
|
186
|
+
|
|
187
|
+
Fully open-source security and license audit for application dependencies and container images based on known vulnerabilities and advisories.
|
|
188
|
+
|
|
189
|
+
options:
|
|
190
|
+
-h, --help show this help message and exit
|
|
191
|
+
--config CONFIG Path to the configuration file. Default: $PWD/.config/depscan.toml
|
|
192
|
+
--no-banner Do not display the logo and donation banner. Please make a donation to OWASP before using this argument.
|
|
193
|
+
-i, --src SRC_DIR_IMAGE
|
|
194
|
+
Source directory or container image or binary file
|
|
195
|
+
-o, --reports-dir REPORTS_DIR
|
|
196
|
+
Reports directory
|
|
197
|
+
--csaf Generate a OASIS CSAF VEX document
|
|
198
|
+
--profile {appsec,research,operational,threat-modeling,license-compliance,generic,machine-learning,ml,deep-learning,ml-deep,ml-tiny}
|
|
199
|
+
Profile to use while generating the BOM. For granular control, use the arguments --bom-engine, --vulnerability-analyzer, or --reachability-analyzer.
|
|
200
|
+
--lifecycle {pre-build,build,post-build} [{pre-build,build,post-build} ...]
|
|
201
|
+
Product lifecycle for the generated BOM. Multiple values allowed.
|
|
202
|
+
--technique {auto,source-code-analysis,binary-analysis,manifest-analysis,hash-comparison,instrumentation,filename} [{auto,source-code-analysis,binary-analysis,manifest-analysis,hash-comparison,instrumentation,filename} ...]
|
|
203
|
+
Analysis technique to use for BOM generation. Multiple values allowed.
|
|
204
|
+
--bom-engine {auto,CdxgenGenerator,CdxgenServerGenerator,CdxgenImageBasedGenerator,BlintGenerator}
|
|
205
|
+
BOM generation engine to use. Defaults to automatic selection based on project type and lifecycle.
|
|
206
|
+
--vulnerability-analyzer {auto,VDRAnalyzer,LifecycleAnalyzer}
|
|
207
|
+
Vulnerability analyzer to use. Defaults to automatic selection based on bom_dir argument.
|
|
208
|
+
--reachability-analyzer {off,FrameworkReachability,SemanticReachability}
|
|
209
|
+
Reachability analyzer to use. Default FrameworkReachability.
|
|
210
|
+
--no-suggest Disable suggest mode
|
|
211
|
+
--risk-audit Perform package risk audit (slow operation). Npm only.
|
|
212
|
+
--cdxgen-args CDXGEN_ARGS
|
|
213
|
+
Additional arguments to pass to cdxgen
|
|
214
|
+
--private-ns PRIVATE_NS
|
|
215
|
+
Private namespace to use while performing oss risk audit. Private packages should not be available in public registries by default. Comma separated
|
|
216
|
+
values accepted.
|
|
217
|
+
-t, --type PROJECT_TYPE [PROJECT_TYPE ...]
|
|
218
|
+
Override project types if auto-detection is incorrect. Multiple values supported.
|
|
219
|
+
--bom BOM Examine using the given Software Bill-of-Materials (SBOM) file in CycloneDX format. Use cdxgen command to produce one.
|
|
220
|
+
--bom-dir BOM_DIR Examine all the Bill-of-Materials (BOM) files in the given directory.
|
|
221
|
+
--purl SEARCH_PURL Scan a single package url.
|
|
222
|
+
--report-template REPORT_TEMPLATE
|
|
223
|
+
Jinja template file used for rendering a custom report
|
|
224
|
+
--report-name REPORT_NAME
|
|
225
|
+
Filename of the custom report written to the --reports-dir
|
|
226
|
+
--deep Perform deep scan by passing this --deep argument to cdxgen. Useful while scanning docker images and OS packages.
|
|
227
|
+
--fuzzy-search Perform fuzzy search by creating variations of package names. Use this when the input SBOM lacks a PURL.
|
|
228
|
+
--search-order {purl,pcu,cpe,cpu,url}
|
|
229
|
+
Attributes to use while searching for vulnerabilities. Default: PURL, CPE, URL (pcu).
|
|
230
|
+
--no-universal Depscan would attempt to perform a single universal scan instead of individual scans per language type.
|
|
231
|
+
--no-vuln-table Do not print the table with the full list of vulnerabilities. This can help reduce console output.
|
|
232
|
+
--server Run depscan as a server
|
|
233
|
+
--server-host SERVER_HOST
|
|
234
|
+
depscan server host
|
|
235
|
+
--server-port SERVER_PORT
|
|
236
|
+
depscan server port
|
|
237
|
+
--cdxgen-server CDXGEN_SERVER
|
|
238
|
+
cdxgen server url. Eg: http://cdxgen:9090
|
|
239
|
+
--debug Run depscan in debug mode.
|
|
240
|
+
-q, --quiet Makes depscan quiet.
|
|
241
|
+
--explain Makes depscan to explain the various analysis. Useful for creating detailed reports.
|
|
242
|
+
--explanation-mode {Endpoints,EndpointsAndReachables,NonReachables}
|
|
243
|
+
Style of explanation needed. Defaults to Endpoints and Reachables.
|
|
244
|
+
--annotate Include the generated text VDR report as an annotation. Defaults to true when explain is enabled; false otherwise.
|
|
245
|
+
-v, --version Display the version
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
### Scanning containers locally (Python version)
|
|
249
|
+
|
|
250
|
+
Scan a Java project.
|
|
251
|
+
|
|
252
|
+
```bash
|
|
253
|
+
depscan --src <path> -o containertests -t java
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
Scan `latest` tag of the container `shiftleft/scan-slim`
|
|
257
|
+
|
|
258
|
+
```bash
|
|
259
|
+
depscan --src shiftleft/scan-slim -o containertests -t docker
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
Include `license` to the type to perform the license audit.
|
|
263
|
+
|
|
264
|
+
```bash
|
|
265
|
+
depscan --src shiftleft/scan-slim -o containertests -t docker license
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
You can also specify the image using the sha256 digest
|
|
269
|
+
|
|
270
|
+
```bash
|
|
271
|
+
depscan --src redmine@sha256:a5c5f8a64a0d9a436a0a6941bc3fb156be0c89996add834fe33b66ebeed2439e -o containertests -t docker
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
You can also save container images using docker or podman save command and pass the archive to depscan for scanning.
|
|
275
|
+
|
|
276
|
+
```bash
|
|
277
|
+
docker save -o /tmp/scanslim.tar shiftleft/scan-slim:latest
|
|
278
|
+
# podman save --format oci-archive -o /tmp/scanslim.tar shiftleft/scan-slim:latest
|
|
279
|
+
depscan --src /tmp/scanslim.tar -o reports -t docker
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
Refer to the docker tests under the GitHub action workflow for this repo for more examples.
|
|
283
|
+
|
|
284
|
+
### Scanning projects locally (Docker container)
|
|
285
|
+
|
|
286
|
+
`ghcr.io/owasp-dep-scan/dep-scan` container image can be used to perform the scan.
|
|
287
|
+
|
|
288
|
+
To scan with default settings
|
|
289
|
+
|
|
290
|
+
```bash
|
|
291
|
+
docker run --rm -v $PWD:/app ghcr.io/owasp-dep-scan/dep-scan depscan --src /app --reports-dir /app/reports
|
|
292
|
+
```
|
|
293
|
+
|
|
294
|
+
To scan with custom environment variables based configuration
|
|
295
|
+
|
|
296
|
+
```bash
|
|
297
|
+
docker run --rm \
|
|
298
|
+
-e VDB_HOME=/db \
|
|
299
|
+
-e GITHUB_TOKEN=<token> \
|
|
300
|
+
-v /tmp:/db \
|
|
301
|
+
-v $PWD:/app ghcr.io/owasp-dep-scan/dep-scan depscan --src /app --reports-dir /app/reports
|
|
302
|
+
```
|
|
303
|
+
|
|
304
|
+
In the above example, `/tmp` is mounted as `/db` into the container. This directory is then specified as `VDB_HOME` for caching the vulnerability information. This way the database can be cached and reused to improve performance.
|
|
305
|
+
|
|
306
|
+
### Server mode
|
|
307
|
+
|
|
308
|
+
dep-scan and cdxgen could be run in server mode. Use the included docker-compose file to get started.
|
|
309
|
+
|
|
310
|
+
```bash
|
|
311
|
+
git clone https://github.com/owasp-dep-scan/dep-scan
|
|
312
|
+
docker compose up
|
|
313
|
+
```
|
|
314
|
+
|
|
315
|
+
```bash
|
|
316
|
+
depscan --server --server-host 0.0.0.0 --server-port 7070
|
|
317
|
+
```
|
|
318
|
+
|
|
319
|
+
In server mode, use the `/download-vdb` endpoint to cache the vulnerability database.
|
|
320
|
+
|
|
321
|
+
```bash
|
|
322
|
+
# This would take over 2 minutes
|
|
323
|
+
curl http://0.0.0.0:7070/download-vdb
|
|
324
|
+
```
|
|
325
|
+
|
|
326
|
+
Use the `/scan` endpoint to perform scans.
|
|
327
|
+
|
|
328
|
+
> [!NOTE]
|
|
329
|
+
> The `type` parameter is mandatory in server mode.
|
|
330
|
+
|
|
331
|
+
- Scanning a local directory.
|
|
332
|
+
Scanning an SBOM file (present locally).
|
|
333
|
+
|
|
334
|
+
```bash
|
|
335
|
+
curl --json '{"path": "/tmp/vulnerable-aws-koa-app/sbom_file.json", "type": "js"}' http://0.0.0.0:7070/scan
|
|
336
|
+
```
|
|
337
|
+
|
|
338
|
+
- Scanning a GitHub repo.
|
|
339
|
+
|
|
340
|
+
```bash
|
|
341
|
+
curl --json '{"url": "https://github.com/HooliCorp/vulnerable-aws-koa-app", "type": "js"}' http://0.0.0.0:7070/scan -o app.vdr.json
|
|
342
|
+
```
|
|
343
|
+
|
|
344
|
+
- Uploading an SBOM file and generating results based on it.
|
|
345
|
+
|
|
346
|
+
```bash
|
|
347
|
+
curl -X POST -H 'Content-Type: multipart/form-data' -F 'file=@/tmp/app/sbom_file.json' http://0.0.0.0:7070/scan?type=js
|
|
348
|
+
```
|
|
349
|
+
|
|
350
|
+
## Local development
|
|
351
|
+
|
|
352
|
+
Setup uv by following the official [documentation](https://docs.astral.sh/uv/).
|
|
353
|
+
|
|
354
|
+
```shell
|
|
355
|
+
uv sync --all-extras --all-packages
|
|
356
|
+
uv run depscan --help
|
|
357
|
+
uv run pytest
|
|
358
|
+
```
|
|
359
|
+
|
|
360
|
+
### Local VDB setup
|
|
361
|
+
|
|
362
|
+
```shell
|
|
363
|
+
vdb --clean
|
|
364
|
+
vdb --download-image
|
|
365
|
+
# To scan containers and OS images
|
|
366
|
+
# vdb --download-full-image
|
|
367
|
+
```
|
|
368
|
+
|
|
369
|
+
### Scan local depscan
|
|
370
|
+
|
|
371
|
+
```shell
|
|
372
|
+
uv run depscan --config .config/depscan-dev.toml
|
|
373
|
+
```
|
|
374
|
+
|
|
375
|
+
This would automatically use the configuration specified in the local config [file](./.config/depscan.toml).
|
|
376
|
+
|
|
377
|
+
## License
|
|
378
|
+
|
|
379
|
+
MIT License
|
|
380
|
+
|
|
381
|
+
This project was donated to the OWASP Foundation in August 2023 by AppThreat Ltd.
|
|
382
|
+
|
|
383
|
+
## Funding
|
|
384
|
+
|
|
385
|
+
This project is funded through [NGI Zero Core](https://nlnet.nl/core), a fund established by [NLnet](https://nlnet.nl) with financial support from the European Commission's [Next Generation Internet](https://ngi.eu) program. Learn more at the [NLnet project page](https://nlnet.nl/project/OWASP-dep-scan).
|
|
386
|
+
|
|
387
|
+
[<img src="https://nlnet.nl/logo/banner.png" alt="NLnet foundation logo" width="20%" />](https://nlnet.nl)
|
|
388
|
+
[<img src="https://nlnet.nl/image/logos/NGI0_tag.svg" alt="NGI Zero Logo" width="20%" />](https://nlnet.nl/core)
|