On this page, we will analyze the SBOM generated by the Tern tool for the PyTorch GitHub Repository. The overall analysis for Tern 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/di-pytorch-tern-spdx22.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: 181
relationships: 224
Is this SBOM NTIA minimum element conformant? False
The ntia_checker did not allow for a successful verification. An error occurred while attempting to check the file.
Considering the sbomqs score for the category related to the SBOM NTIA minimum element conformant, the file conforms to all fields except one:
# 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-tern.relationship_full.html")
../../figs/cs1-tern.relationship_full.html
Note: The component 99803d4b97f3db529ae9ca4174b0951afac6b309e7deaa8ec3214c584e02b3a8 contains most of the components, which appear to be the operating system, in this case, Ubuntu.
Note: There are many components that have names formed only by numbers.
Note: In addition to contains and describes, there are two relationship types generatedFrom and hasPrerequisite.