Replies: 3 comments
-
Branch to follow - #347 Python is turning out to be one of the most complex feature developed for cdxgen. There is a lack of understanding on the following topics:
Some sample projects suggested by @Kasyap-R are scipy, requests |
Beta Was this translation helpful? Give feedback.
-
cdxgen 8.6.0 got released with several improvements for Python. We focused on improving the precision and recall for direct dependencies first. The release was only possible with several community members' hard work. In particular, I want to thank: @Kasyap-R - For huge help from raising tickets with test cases to continuously testing our development branch To give you an idea about the level of improvements, let's take a complex project like scipy and look at the dependency list generated by GitHub. https://github.com/scipy/scipy/network/dependencies Now compare with the list from cdxgen https://github.com/CycloneDX/cdxgen/actions/runs/5346454398/jobs/9693518561#step:13:606 We can continue to iterate and resolve any issues from this release and then look into improving the detection of transitive dependencies. |
Beta Was this translation helpful? Give feedback.
-
In 9.1.x, we added transitive dependencies and dependency tree generation for setup.py, requirements.txt, and pyproject.toml projects. |
Beta Was this translation helpful? Give feedback.
-
The gist is that we need to parse Python code and identify import statements (including magic imports) to improve the accuracy for direct dependencies. This seems to be the approach taken by projects like pigar and pipreqs and my personal dep-scan.
Once we have the direct dependencies nailed, we can identify the indirect dependencies by querying pypi, a feature recently removed from cdxgen due to some bugs.
Perhaps, this is a great excuse to introduce atom from AppThreat to the CycloneDX community. It can parse Python and create a json slice for the Usages. We need an npm wrapper package to bundle atom as an optional dependency.
Beta Was this translation helpful? Give feedback.
All reactions