5dc053923afeefed29ce7fc6d56b26a62acac432,sbin/db_mgmt_json.py,,process_cve_item,#Any#,59

Before Change


                    if cpeuri["vulnerable"]:
                        query = {}
                        version_info = ""
                        if "versionStartExcluding" in cpeuri:
                            query["versionStartExcluding"] = cpeuri["versionStartExcluding"]
                            version_info += query["versionStartExcluding"]
                        if "versionStartIncluding" in cpeuri:
                            query["versionStartIncluding"] = cpeuri["versionStartIncluding"]
                            version_info += query["versionStartIncluding"]
                        if "versionEndExcluding" in cpeuri:

After Change


                        for cpeuri in child["cpe_match"]:
                            if cpeuri["vulnerable"]:
                                query, version_info = get_cpe_info(cpeuri)
                                if query != {}:
                                    query["id"] = hashlib.sha1(cpeuri["cpe23Uri"].encode("utf-8") + version_info.encode("utf-8")).hexdigest()
                                    cpe_info = db.getCPEVersionInformation(query)

                                    if cpe_info:
                                        if cpe_info["cpe_name"]:
                                            for vulnerable_version in cpe_info["cpe_name"]:
                                                cve["vulnerable_product"].append(vulnerable_version["cpe23Uri"])
                                                cve["vulnerable_configuration"].append(vulnerable_version["cpe23Uri"])
                                        else:
                                            cve["vulnerable_product"].append(cpeuri["cpe23Uri"])
                                            cve["vulnerable_configuration"].append(cpeuri["cpe23Uri"])
                                else:
                                    // If the cpe_match did not have any of the version start/end modifiers,
                                    // add the CPE string as it is.
                                    cve["vulnerable_product"].append(cpeuri["cpe23Uri"])
                                    cve["vulnerable_configuration"].append(cpeuri["cpe23Uri"])
                            else:
                                cve["vulnerable_configuration"].append(cpeuri["cpe23Uri"])
    if "problemtype" in item["cve"]:
        for problem in item["cve"]["problemtype"]["problemtype_data"]:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 9

Instances


Project Name: cve-search/cve-search
Commit Name: 5dc053923afeefed29ce7fc6d56b26a62acac432
Time: 2019-11-07
Author: sami.kairajarvi@gmail.com
File Name: sbin/db_mgmt_json.py
Class Name:
Method Name: process_cve_item


Project Name: dpressel/mead-baseline
Commit Name: c10aaab0fb6c0d58f9c6b8a78042fe62d84cc389
Time: 2020-04-14
Author: dpressel@gmail.com
File Name: addons/embed_bert.py
Class Name: BERTHubModel
Method Name: __init__


Project Name: onnx/onnx-coreml
Commit Name: bb9c92cf8c6ac6dfe8d95bc7ddc3be6b7d7562ed
Time: 2018-03-28
Author: aseem.elec@gmail.com
File Name: onnx_coreml/_operators.py
Class Name:
Method Name: _convert_pool