def get_components_with_cve(components):
    """Get all components with CVE record(s)."""
    result = []

    for component in components:
        assert "security" in component
        cve_items = component["security"]
        for cve_item in cve_items:
            if "CVE" in cve_item:
                result.append(component)

    return result