core/src/main/java/org/owasp/dependencycheck/data/nvdcve/CveItemOperator.java
/**
     * Attempts to determine the ecosystem based on the vendor, product and
     * targetSw.
     *
     * @param baseEcosystem the base ecosystem
     * @param vendor the vendor
     * @param product the product
     * @param targetSw the target software
     * @return the ecosystem if one is identified
     */
Attempts to determine the ecosystem based on the vendor, product and
targetSw.


Attempts to determine the ecosystem based on the vendor product and targetSw .
private String extractEcosystem(String baseEcosystem, String vendor, String product, String targetSw) {
        if (("mysql".equals(vendor) && "mysql".equals(product))
                || ("postgresql".equals(vendor) && "postgresql".equals(product))
                || ("picketlink".equals(vendor) && "picketlink".equals(product))
                || ("libxl_project".equals(vendor) && "libxl".equals(product))
                || ("ocaml".equals(vendor) && "postgresql-ocaml".equals(product))
                || ("curses_project".equals(vendor) && "curses".equals(product))
                || ("dalekjs".equals(vendor) && "dalekjs".equals(product))
                || ("microsoft".equals(vendor) && "internet_explorer".equals(product))
                || ("jenkins".equals(vendor) && "ssh_credentials".equals(product))
                || ("kubernetes".equals(vendor) && "kubernetes".equals(product))
                || ("gnome".equals(vendor) && "nautilus-python".equals(product))
                || ("apache".equals(vendor) && "qpid_proton".equals(product))
                || ("mysql-ocaml".equals(vendor) && "mysql-ocaml".equals(product))
                || ("google".equals(vendor) && "chrome".equals(product))
                || ("canonical".equals(vendor) && "ltsp_display_manager".equals(product))
                || ("gnome".equals(vendor) && "vala".equals(product))
                || ("apple".equals(vendor) && "safari".equals(product))
                || ("mapbox".equals(vendor) && "npm-test-sqlite3-trunk".equals(product))
                || ("apple".equals(vendor) && "webkit".equals(product))
                || ("mozilla".equals(vendor) && "firefox".equals(product))
                || ("apache".equals(vendor) && "thrift".equals(product))
                || ("apache".equals(vendor) && "qpid".equals(product))
                || ("mozilla".equals(vendor) && "thunderbird".equals(product))
                || ("mozilla".equals(vendor) && "firefox_esr".equals(product))
                || ("redhat".equals(vendor) && "jboss_amq_clients_2".equals(product))
                || ("node-opencv_project".equals(vendor) && "node-opencv".equals(product))
                || ("mozilla".equals(vendor) && "seamonkey".equals(product))
                || ("mozilla".equals(vendor) && "thunderbird_esr".equals(product))
                || ("mnet_soft_factory".equals(vendor) && "nodemanager_professional".equals(product))
                || ("mozilla".equals(vendor) && "mozilla_suite".equals(product))
                || ("theforeman".equals(vendor) && "hammer_cli".equals(product))
                || ("ibm".equals(vendor) && "websphere_application_server".equals(product))
                || ("sap".equals(vendor) && "hana_extend_application_services".equals(product))
                || ("apache".equals(vendor) && "zookeeper".equals(product))) {
            return null;
        }
        if ("ibm".equals(vendor)
                && "java".equals(product)) {
            return Ecosystem.NATIVE;
        }
        if ("oracle".equals(vendor)
                && "vm".equals(product)) {
            return Ecosystem.NATIVE;
        }
        switch (targetSw) {
            case "asp.net":
            case "c#":
            case ".net":
            case "dotnetnuke":
                return Ecosystem.DOTNET;
            case "android":
            case "java":
                return Ecosystem.JAVA;
            case "c/c++":
            case "borland_c++":
            case "visual_c++":
            case "gnu_c++":
            case "linux_kernel":
            case "linux":
            case "unix":
            case "suse_linux":
            case "redhat_enterprise_linux":
            case "debian":
                return Ecosystem.NATIVE;
            case "coldfusion":
                return Ecosystem.COLDFUSION;
            case "ios":
            case "iphone":
            case "ipad":
            case "iphone_os":
                return Ecosystem.IOS;
            case "jquery":script
                return Ecosystem.JAVASCRIPT;
            case "node.js":
            case "nodejs":
                return Ecosystem.NODEJS;
            case "perl":
                return Ecosystem.PERL;
            case "joomla!":
            case "joomla":
            case "mybb":
            case "simplesamlphp":
            case "craft_cms":
            case "moodle":
            case "phpcms":
            case "buddypress":
            case "typo3":
            case "php":
            case "wordpress":
            case "drupal":
            case "mediawiki":
            case "symfony":
            case "openpne":
            case "vbulletin3":
            case "vbulletin4":
                return Ecosystem.PHP;
            case "python":
                return Ecosystem.PYTHON;
            case "ruby":
                return Ecosystem.RUBY;
        }
        return baseEcosystem;
    }
private String extractEcosystem ( String baseEcosystem , String vendor , String product , String targetSw ) { if ( ( "mysql" . equals ( vendor ) && "mysql" . equals ( product ) ) || ( "postgresql" . equals ( vendor ) && "postgresql" . equals ( product ) ) || ( "picketlink" . equals ( vendor ) && "picketlink" . equals ( product ) ) || ( "libxl_project" . equals ( vendor ) && "libxl" . equals ( product ) ) || ( "ocaml" . equals ( vendor ) && "postgresql-ocaml" . equals ( product ) ) || ( "curses_project" . equals ( vendor ) && "curses" . equals ( product ) ) || ( "dalekjs" . equals ( vendor ) && "dalekjs" . equals ( product ) ) || ( "microsoft" . equals ( vendor ) && "internet_explorer" . equals ( product ) ) || ( "jenkins" . equals ( vendor ) && "ssh_credentials" . equals ( product ) ) || ( "kubernetes" . equals ( vendor ) && "kubernetes" . equals ( product ) ) || ( "gnome" . equals ( vendor ) && "nautilus-python" . equals ( product ) ) || ( "apache" . equals ( vendor ) && "qpid_proton" . equals ( product ) ) || ( "mysql-ocaml" . equals ( vendor ) && "mysql-ocaml" . equals ( product ) ) || ( "google" . equals ( vendor ) && "chrome" . equals ( product ) ) || ( "canonical" . equals ( vendor ) && "ltsp_display_manager" . equals ( product ) ) || ( "gnome" . equals ( vendor ) && "vala" . equals ( product ) ) || ( "apple" . equals ( vendor ) && "safari" . equals ( product ) ) || ( "mapbox" . equals ( vendor ) && "npm-test-sqlite3-trunk" . equals ( product ) ) || ( "apple" . equals ( vendor ) && "webkit" . equals ( product ) ) || ( "mozilla" . equals ( vendor ) && "firefox" . equals ( product ) ) || ( "apache" . equals ( vendor ) && "thrift" . equals ( product ) ) || ( "apache" . equals ( vendor ) && "qpid" . equals ( product ) ) || ( "mozilla" . equals ( vendor ) && "thunderbird" . equals ( product ) ) || ( "mozilla" . equals ( vendor ) && "firefox_esr" . equals ( product ) ) || ( "redhat" . equals ( vendor ) && "jboss_amq_clients_2" . equals ( product ) ) || ( "node-opencv_project" . equals ( vendor ) && "node-opencv" . equals ( product ) ) || ( "mozilla" . equals ( vendor ) && "seamonkey" . equals ( product ) ) || ( "mozilla" . equals ( vendor ) && "thunderbird_esr" . equals ( product ) ) || ( "mnet_soft_factory" . equals ( vendor ) && "nodemanager_professional" . equals ( product ) ) || ( "mozilla" . equals ( vendor ) && "mozilla_suite" . equals ( product ) ) || ( "theforeman" . equals ( vendor ) && "hammer_cli" . equals ( product ) ) || ( "ibm" . equals ( vendor ) && "websphere_application_server" . equals ( product ) ) || ( "sap" . equals ( vendor ) && "hana_extend_application_services" . equals ( product ) ) || ( "apache" . equals ( vendor ) && "zookeeper" . equals ( product ) ) ) { return null ; } if ( "ibm" . equals ( vendor ) && "java" . equals ( product ) ) { return Ecosystem . NATIVE ; } if ( "oracle" . equals ( vendor ) && "vm" . equals ( product ) ) { return Ecosystem . NATIVE ; } switch ( targetSw ) { case "asp.net" : case "c#" : case ".net" : case "dotnetnuke" : return Ecosystem . DOTNET ; case "android" : case "java" : return Ecosystem . JAVA ; case "c/c++" : case "borland_c++" : case "visual_c++" : case "gnu_c++" : case "linux_kernel" : case "linux" : case "unix" : case "suse_linux" : case "redhat_enterprise_linux" : case "debian" : return Ecosystem . NATIVE ; case "coldfusion" : return Ecosystem . COLDFUSION ; case "ios" : case "iphone" : case "ipad" : case "iphone_os" : return Ecosystem . IOS ; case "jquery" : return Ecosystem . JAVASCRIPT ; case "node.js" : case "nodejs" : return Ecosystem . NODEJS ; case "perl" : return Ecosystem . PERL ; case "joomla!" : case "joomla" : case "mybb" : case "simplesamlphp" : case "craft_cms" : case "moodle" : case "phpcms" : case "buddypress" : case "typo3" : case "php" : case "wordpress" : case "drupal" : case "mediawiki" : case "symfony" : case "openpne" : case "vbulletin3" : case "vbulletin4" : return Ecosystem . PHP ; case "python" : return Ecosystem . PYTHON ; case "ruby" : return Ecosystem . RUBY ; } return baseEcosystem ; }
Attempts to determine the ecosystem based on the vendor, product and
 targetSw.
Attempts to determine the ecosystem based on the vendor product and targetSw .
//TODO the following was added to reduce the need for the slow UPDATE_ECOSYSTEM2 query // the following should be analyzed to determine if an ecosystem should be returned. // Note that these all have 'bindings' in the description of a vulnerability in more than // one case these were related to language bindings; as such the list need to be reviewed and refined. //.net //.net //.net //.net //android //java //c++ //c++ //c++ //c++ //native //native //native //native //native //native //coldfusion //ios //ios //ios //ios //javascript //node.js //node.js //perl //php //php //php //php //php //php //php //php //php //php //php //php //php //php //php //php //php //python //ruby