On this page, we will analyze the SBOM generated by the Trivy tool for the PyTorch GitHub Repository. The overall analysis for Trivy 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-trivy-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: 124
relationships: 126
Is this SBOM NTIA minimum element conformant? False
Individual elements
Status
All component names provided?
True
All component versions provided?
False
All component identifiers provided?
True
All component suppliers provided?
False
SBOM author name provided?
True
SBOM creation timestamp provided?
True
Dependency relationships provided?
True
Components missing a version: pytorch, pip, pip, pip, bundler, pip
# 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-trivy.relationship_full.html")
../../figs/cs1-trivy.relationship_full.html
Note: The tool discovered 5 metadata files, but did not classify them as spdx:File. Instead, it generated an spdx package for each file and connected the dependent packages in the file to it.