This repository was archived by the owner on Aug 25, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 138
shouldi: deptree: Create dependency tree of project #596
Labels
Alice
Work related to our tutorial series "Rolling Alice"
enhancement
New feature or request
p3
Average Priority
security
Security related issues or improvements
tL
Esitmated Time To Complete: Long
Milestone
Comments
This would probably help us figure out what's wrong with #737 |
|
2022-10-25 Alice Initiative welcome aboard!
dffml/examples/shouldi/tests/test_dep_tree.py Lines 36 to 71 in 0a2e053
|
This comment was marked as off-topic.
This comment was marked as off-topic.
A discussion today revealed we should go with the file paring approach (rather than |
1 task
$ sbom4python --format json --sbom spdx -m black
{
"SPDXID": "SPDXRef-DOCUMENT",
"spdxVersion": "SPDX-2.2",
"creationInfo": {
"comment": "This document has been automatically generated.",
"creators": [
"Tool: sbom4python-0.7.0"
],
"created": "2023-03-02T13:53:48Z",
"licenseListVersion": "3.18"
},
"name": "black",
"dataLicense": "CC0-1.0",
"documentNamespace": "http://spdx.org/spdxdocs/black-7ebf1fb9-a781-41f5-9e57-a6bba6969ecb",
"packages": [
{
"SPDXID": "SPDXRef-Package-1-black",
"name": "black",
"versionInfo": "23.1.1.dev8+g25d886f",
"supplier": "Organization: ukasz Langa ([email protected])",
"downloadLocation": "NONE",
"filesAnalyzed": false,
"licenseConcluded": "MIT",
"licenseDeclared": "MIT",
"copyrightText": "NOASSERTION",
"externalRefs": [
{
"referenceCategory": "PACKAGE-MANAGER",
"referenceLocator": "pkg:pypi/[email protected]+g25d886f",
"referenceType": "purl"
},
{
"referenceCategory": "SECURITY",
"referenceLocator": "cpe:2.3:a:ukasz_langa:black:23.1.1.dev8+g25d886f:*:*:*:*:*:*:*",
"referenceType": "cpe23Type"
}
]
},
{
"SPDXID": "SPDXRef-Package-2-click",
"name": "click",
"versionInfo": "8.1.3",
"supplier": "Organization: Armin Ronacher ([email protected])",
"downloadLocation": "NONE",
"filesAnalyzed": false,
"licenseConcluded": "BSD-3-Clause",
"licenseDeclared": "BSD-3-Clause",
"copyrightText": "NOASSERTION",
"externalRefs": [
{
"referenceCategory": "PACKAGE-MANAGER",
"referenceLocator": "pkg:pypi/[email protected]",
"referenceType": "purl"
},
{
"referenceCategory": "SECURITY",
"referenceLocator": "cpe:2.3:a:armin_ronacher:click:8.1.3:*:*:*:*:*:*:*",
"referenceType": "cpe23Type"
}
]
},
{
"SPDXID": "SPDXRef-Package-3-mypy-extensions",
"name": "mypy-extensions",
"versionInfo": "1.0.0",
"supplier": "Organization: The mypy developers ([email protected])",
"downloadLocation": "NONE",
"filesAnalyzed": false,
"licenseConcluded": "MIT",
"licenseDeclared": "MIT",
"copyrightText": "NOASSERTION",
"externalRefs": [ [97/296]
{
"referenceCategory": "PACKAGE-MANAGER",
"referenceLocator": "pkg:pypi/[email protected]+g25d886f",
"referenceType": "purl"
},
{
"referenceCategory": "SECURITY",
"referenceLocator": "cpe:2.3:a:ukasz_langa:black:23.1.1.dev8+g25d886f:*:*:*:*:*:*:*",
"referenceType": "cpe23Type"
}
]
},
{
"SPDXID": "SPDXRef-Package-2-click",
"name": "click",
"versionInfo": "8.1.3",
"supplier": "Organization: Armin Ronacher ([email protected])",
"downloadLocation": "NONE",
"filesAnalyzed": false,
"licenseConcluded": "BSD-3-Clause",
"licenseDeclared": "BSD-3-Clause",
"copyrightText": "NOASSERTION",
"externalRefs": [
{
"referenceCategory": "PACKAGE-MANAGER",
"referenceLocator": "pkg:pypi/[email protected]",
"referenceType": "purl"
},
{
"referenceCategory": "SECURITY",
"referenceLocator": "cpe:2.3:a:armin_ronacher:click:8.1.3:*:*:*:*:*:*:*",
"referenceType": "cpe23Type"
}
]
},
{
"SPDXID": "SPDXRef-Package-3-mypy-extensions",
"name": "mypy-extensions",
"versionInfo": "1.0.0",
"supplier": "Organization: The mypy developers ([email protected])",
"downloadLocation": "NONE",
"filesAnalyzed": false,
"licenseConcluded": "MIT",
"licenseDeclared": "MIT",
"copyrightText": "NOASSERTION",
"externalRefs": [
{
"referenceCategory": "PACKAGE-MANAGER",
"referenceLocator": "pkg:pypi/[email protected]",
"referenceType": "purl"
},
{
"referenceCategory": "SECURITY",
"referenceLocator": "cpe:2.3:a:the_mypy_developers:mypy-extensions:1.0.0:*:*:*:*:*:*:*",
"referenceType": "cpe23Type"
}
]
},
{
"SPDXID": "SPDXRef-Package-4-packaging",
"name": "packaging",
"versionInfo": "23.0",
"supplier": "Organization: Donald Stufft ([email protected])",
"downloadLocation": "NONE",
"filesAnalyzed": false,
"licenseConcluded": "NOASSERTION",
"licenseDeclared": "NOASSERTION",
"copyrightText": "NOASSERTION",
"externalRefs": [
{
"referenceCategory": "PACKAGE-MANAGER",
"referenceLocator": "pkg:pypi/[email protected]",
"referenceType": "purl"
},
{
"referenceCategory": "SECURITY",
"referenceLocator": "cpe:2.3:a:donald_stufft:packaging:23.0:*:*:*:*:*:*:*",
"referenceType": "cpe23Type"
}
]
},
{
"SPDXID": "SPDXRef-Package-5-pathspec",
"name": "pathspec",
"versionInfo": "0.11.0",
"supplier": "Organization: Caleb P. ([email protected])",
"downloadLocation": "NONE",
"filesAnalyzed": false,
"licenseConcluded": "NOASSERTION",
"licenseDeclared": "NOASSERTION",
"copyrightText": "NOASSERTION",
"externalRefs": [ |
Closed
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
Alice
Work related to our tutorial series "Rolling Alice"
enhancement
New feature or request
p3
Average Priority
security
Security related issues or improvements
tL
Esitmated Time To Complete: Long
Uh oh!
There was an error while loading. Please reload this page.
https://github.com/intel/dffml/commits/shouldi_dep_tree
The idea behind the work that was done so far in the above branch was to produce the full dependency tree for a given python package. We'll want this to be the
shouldi deptree
command (as opposed toshouldi install
)It's currently in a state where it can grab package names out of setup.py files. It also needs to be able to grab them out of
setup.cfg
files and requirements.txt files.Another thing that's missing is the version number of the package. Right now the latest version of each package is being downloaded. We need to check if the package was pinned to a version and download that version (if
example_package==0.3.1
for example we'd download version 0.3.1 of example_package). Come up with reasonable ways to handle all the following cases: https://stackoverflow.com/a/50842265/12310488There is also a new output operation that needs to be made for this work. It's the
Tree
output operation. It's not working at the moment. What it should do is output adict
similar to the way config structures work with their use ofplugin
andconfig
(you'll see what I'm about when you read the existing code.requirements-dev.txt
service/http/setup.cfg
dffml/examples/shouldi/tests/test_dep_tree.py
Lines 1 to 169 in 0a2e053
The text was updated successfully, but these errors were encountered: