Add deps tracking for SBOMs

Test: m compliance_sbom

Bug: 242220547
Change-Id: Ife93e0e1cdc43490818798922d574ae1b1d441d1
diff --git a/tools/compliance/graph.go b/tools/compliance/graph.go
index 80a2f47..4a06634 100644
--- a/tools/compliance/graph.go
+++ b/tools/compliance/graph.go
@@ -88,6 +88,15 @@
 	return targets
 }
 
+// TargetNames returns the list of target node names in the graph. (unordered)
+func (lg *LicenseGraph) TargetNames() []string {
+	targets := make([]string, 0, len(lg.targets))
+	for target := range lg.targets {
+		targets = append(targets, target)
+	}
+	return targets
+}
+
 // compliance-only LicenseGraph methods
 
 // newLicenseGraph constructs a new, empty instance of LicenseGraph.