MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / main

Function main

deploy/sbom/sbom_to_csv.py:68–80  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

66
67
68def main() -> None:
69 files = [Path(p) for p in sys.argv[1:]] if len(sys.argv) > 1 else _find_sbom_files()
70
71 if not files:
72 print("No SBOM JSON files found.")
73 print("Run 'mise run sbom:generate' first, or pass file paths as arguments.")
74 sys.exit(1)
75
76 for path in files:
77 csv_path = sbom_to_csv(path)
78 with csv_path.open() as count_fh:
79 components_count = sum(1 for _ in count_fh) - 1 # minus header
80 print(f"{path.name} -> {csv_path.name} ({components_count} components)")
81
82
83if __name__ == "__main__":

Callers 1

sbom_to_csv.pyFile · 0.70

Calls 2

sbom_to_csvFunction · 0.85
_find_sbom_filesFunction · 0.70

Tested by

no test coverage detected