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

Function needs_fix

deploy/sbom/resolve_licenses.py:342–353  ·  view source on GitHub ↗

Check if component has missing or hash-based license.

(comp: dict)

Source from the content-addressed store, hash-verified

340
341
342def needs_fix(comp: dict) -> bool:
343 """Check if component has missing or hash-based license."""
344 licenses = comp.get("licenses", [])
345 if not licenses:
346 return True
347 for entry in licenses:
348 lic = entry.get("license", {})
349 lid = lic.get("id", "")
350 lname = lic.get("name", "")
351 if lid.startswith("sha256:") or lname.startswith("sha256:"):
352 return True
353 return False
354
355
356def _find_sbom_files() -> list[Path]:

Callers 1

mainFunction · 0.85

Calls 1

getMethod · 0.45

Tested by

no test coverage detected