INNER CODE UNIT · Python

fail

wolfSSL/wolfBoot · tools/sbom/validate_sbom.py:37

def fail(path, msg):
    print(f"FAIL [{path}]: {msg}", file=sys.stderr)
    sys.exit(1)


def flatten_components(components):
    """Yield every component, including sub-components.

    CycloneDX nests a component that ships inside another one (wolfcrypt
    inside the wolfssl release) under `components[]`. A check that reads only
    the top level would report such a component as missing."""
    for comp in components or []:
        yield comp
        yield from flatten_components(comp.get("components"))


def validate_cyclonedx(path, d, name_prefix, min_properties, require_deps):
    if d.get("bomFormat") != "CycloneDX":

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…