On this page, we will analyze the SBOM generated by the gh-sbom tool for the PyTorch GitHub Repository. The overall analysis for gh-sbom is available here.
The SPDX SBOM was generated in the JSON format and converted to RDF/XML using pyspdxtools. It is a valid spdx file and can be validated using the spdx online validator.
SBOM size
kg = kglab.KnowledgeGraph()kg.load_rdf("../../../data/tools_cs1/sboms/rdf/pytorch-gh-sbom-spdx23.rdf.xml", format="xml")print("Files:", len(get_files_data(kg)))print("Packages:", len(get_package_data(kg)))print("relationships:", len(get_relationship_data(kg)))
Files: 0
Packages: 231
relationships: 1
Is this SBOM NTIA minimum element conformant? False
# get the relationship graph to be visualizedgraph = visualize_relationship_graph(kg)# optional: set the physics layout of the networkgraph.force_atlas_2based()graph.set_edge_smooth('dynamic')# show graphgraph.show("../../figs/cs1-gh-sbom.relationship_full.html")
../../figs/cs1-gh-sbom.relationship_full.html
Note: There is only one relationship between spdx:Document and the main package. There are no relationships between the detected packages.