@@ -12,4 +12,32 @@ is grouped into vendor, product, and version buckets. Other analyzers later
1212use this evidence to identify any Common Platform Enumeration (CPE)
1313identifiers that apply.
1414
15- Files Types Scanned: py, whl, egg, zip, PKG-INFO, and METADATA
15+ Files Types Scanned: py, whl, egg, zip, PKG-INFO, and METADATA
16+
17+ Analyzing packages built with ` poetry build `
18+ --------------------------------------------
19+
20+ Note that running ` dependency-check ` on Python packages built with
21+ [ Poetry] ( https://python-poetry.org ) 's
22+ [ ` poetry build ` ] ( https://python-poetry.org/docs/cli/#build ) command
23+ ** may throw an error** :
24+
25+ `[ ERROR] Python 'pyproject.toml' found and there is not a 'poetry.lock' or
26+ 'requirements.txt' - analysis will be incomplete`
27+
28+ This is ** known behaviour** (see
29+ [ #6356 ] ( https://github.com/dependency-check/DependencyCheck/issues/6356 ) )
30+ and is due to the analyzer analyzing the contents of the tarball
31+ that has been built (in ` dist/<package>-<version>.tar.gz ` if built using Poetry
32+ defaults). As per [ PEP 517] ( https://peps.python.org/pep-0517/ ) , the tarball
33+ contains the ` pyproject.toml ` manifest, but not the ` poetry.lock ` file
34+ that [ freezes] ( https://python-poetry.org/docs/cli/#lock ) dependencies at
35+ the versions used to build the project.
36+
37+ To ** circumvent this error** , exclude the tarball or the whole build target
38+ directory by running ` dependency-check ` with ` --exclude "dist/**" ` .
39+
40+ *** WARNING:*** This will not analyze the build artifact itself, but only the lock
41+ file. If dependencies have diverged between the two artifacts - e.g., after
42+ updating a depdendency and locking it without building again - the dependencies
43+ in the build artifact may be affected by vulnerabilities that will go undetected!
0 commit comments