def are_vulnerabilities_equivalent(vulnerability_1, vulnerability_2):
    """
    Check if two vulnerability JSON objects are equivalent

    :param vulnerability_1: dict JSON object consisting of information about the vulnerability in the format
                            presented by the ECR Scan Tool
    :param vulnerability_2: dict JSON object consisting of information about the vulnerability in the format
                            presented by the ECR Scan Tool
    :return: bool True if the two input objects are equivalent, False otherwise
    """
    if (vulnerability_1["name"], vulnerability_1["severity"]) == (vulnerability_2["name"], vulnerability_2["severity"]):
        # Do not compare package_version, because this may have been obtained at the time the CVE was first observed
        # on the ECR Scan, which would result in unrelated version updates causing a mismatch while the CVE still
        # applies on both vulnerabilities.
        if all(
            attribute in vulnerability_2["attributes"]
            for attribute in vulnerability_1["attributes"]
            if not attribute["key"] == "package_version"
        ):
            return True
    return False