Child pages
  • WHM API 1 Functions - modsec_get_vendors
Skip to end of metadata
Go to start of metadata

Description

The function returns a list of configured ModSecurity™ vendors.

Examples


 JSON API
https://hostname.example.com:2087/cpsess##########/json-api/modsec_get_vendors?api.version=1
 XML API
https://hostname.example.com:2087/cpsess##########/xml-api/modsec_get_vendors?api.version=1
 Command Line
whmapi1 modsec_get_vendors


Notes:

  • You must URI-encode values.
  • For more information and additional output options, read our Guide to WHM API 1 documentation or run the whmapi1 --help command. 

 Output (JSON)
{
    "data": {
        "vendors": [
            {
                "vendor_url": "https://www.SAMPLE.org/index.php/Category:SAMPLE_ModSecurity_Core_Rule_Set_Project",
                "inst_dist": "SAMPLE_1415038544",
                "installed": 1,
                "report_url": "https://server.example.com/report",
                "dist_md5": "ffbaa3a7ead8dfaf0b661a729ce6ad3b",
                "enabled": 1,
                "vendor_id": "SAMPLE",
                "name": "SAMPLE ModSecurity Core Rule Set",
                "cpanel_provided": 0,
                "path": "/usr/local/apache/conf/modsec_vendor_configs/SAMPLE",
                "description": "Sample SAMPLE curated ModSecurity rule set",
                "installed_from": "http://www.example.com/meta_SAMPLE.yaml",
                "archive_url": "http://www.example.com/SAMPLE_1415038544.zip",
                "in_use": 32,
                "configs": [
                    {
                        "vendor_id": "SAMPLE",
                        "active": 1,
                        "config": "modsec_vendor_configs/SAMPLE/modsecurity_crs_10_setup.conf"
                    },
                    {
                        "vendor_id": "SAMPLE",
                        "active": 1,
                        "config": "modsec_vendor_configs/SAMPLE/optional_rules/modsecurity_crs_16_session_hijacking.conf"
                    },
                    {
                        "vendor_id": "SAMPLE",
                        "active": 1,
                        "config": "modsec_vendor_configs/SAMPLE/optional_rules/modsecurity_crs_46_av_scanning.conf"
                    },
                    {
                        "vendor_id": "SAMPLE",
                        "active": 1,
                        "config": "modsec_vendor_configs/SAMPLE/optional_rules/modsecurity_crs_49_header_tagging.conf"
                    },
                    {
                        "vendor_id": "SAMPLE",
                        "active": 1,
                        "config": "modsec_vendor_configs/SAMPLE/optional_rules/modsecurity_crs_16_authentication_tracking.conf"
                    },
                    {
                        "vendor_id": "SAMPLE",
                        "active": 1,
                        "config": "modsec_vendor_configs/SAMPLE/optional_rules/modsecurity_crs_11_avs_traffic.conf"
                    },
                    {
                        "vendor_id": "SAMPLE",
                        "active": 1,
                        "config": "modsec_vendor_configs/SAMPLE/optional_rules/modsecurity_crs_55_marketing.conf"
                    },
                    {
                        "vendor_id": "SAMPLE",
                        "active": 1,
                        "config": "modsec_vendor_configs/SAMPLE/optional_rules/modsecurity_crs_43_csrf_protection.conf"
                    },
                    {
                        "vendor_id": "SAMPLE",
                        "active": 1,
                        "config": "modsec_vendor_configs/SAMPLE/optional_rules/modsecurity_crs_47_skip_outbound_checks.conf"
                    },
                    {
                        "vendor_id": "SAMPLE",
                        "active": 1,
                        "config": "modsec_vendor_configs/SAMPLE/optional_rules/modsecurity_crs_13_xml_enabler.conf"
                    },
                    {
                        "vendor_id": "SAMPLE",
                        "active": 1,
                        "config": "modsec_vendor_configs/SAMPLE/optional_rules/modsecurity_crs_10_ignore_static.conf"
                    },
                    {
                        "vendor_id": "SAMPLE",
                        "active": 1,
                        "config": "modsec_vendor_configs/SAMPLE/optional_rules/modsecurity_crs_16_username_tracking.conf"
                    },
                    {
                        "vendor_id": "SAMPLE",
                        "active": 1,
                        "config": "modsec_vendor_configs/SAMPLE/optional_rules/modsecurity_crs_25_cc_known.conf"
                    },
                    {
                        "vendor_id": "SAMPLE",
                        "active": 1,
                        "config": "modsec_vendor_configs/SAMPLE/optional_rules/modsecurity_crs_42_comment_spam.conf"
                    },
                    {
                        "vendor_id": "SAMPLE",
                        "active": 1,
                        "config": "modsec_vendor_configs/SAMPLE/base_rules/modsecurity_crs_41_sql_injection_attacks.conf"
                    },
                    {
                        "vendor_id": "SAMPLE",
                        "active": 1,
                        "config": "modsec_vendor_configs/SAMPLE/base_rules/modsecurity_crs_41_xss_attacks.conf"
                    },
                    {
                        "vendor_id": "SAMPLE",
                        "active": 1,
                        "config": "modsec_vendor_configs/SAMPLE/base_rules/modsecurity_crs_59_outbound_blocking.conf"
                    },
                    {
                        "vendor_id": "SAMPLE",
                        "active": 1,
                        "config": "modsec_vendor_configs/SAMPLE/base_rules/modsecurity_crs_40_generic_attacks.conf"
                    },
                    {
                        "vendor_id": "SAMPLE",
                        "active": 1,
                        "config": "modsec_vendor_configs/SAMPLE/base_rules/modsecurity_crs_35_bad_robots.conf"
                    },
                    {
                        "vendor_id": "SAMPLE",
                        "active": 1,
                        "config": "modsec_vendor_configs/SAMPLE/base_rules/modsecurity_crs_23_request_limits.conf"
                    },
                    {
                        "vendor_id": "SAMPLE",
                        "active": 1,
                        "config": "modsec_vendor_configs/SAMPLE/base_rules/modsecurity_crs_45_trojans.conf"
                    },
                    {
                        "vendor_id": "SAMPLE",
                        "active": 1,
                        "config": "modsec_vendor_configs/SAMPLE/base_rules/modsecurity_crs_50_outbound.conf"
                    },
                    {
                        "vendor_id": "SAMPLE",
                        "active": 1,
                        "config": "modsec_vendor_configs/SAMPLE/base_rules/modsecurity_crs_49_inbound_blocking.conf"
                    },
                    {
                        "vendor_id": "SAMPLE",
                        "active": 1,
                        "config": "modsec_vendor_configs/SAMPLE/base_rules/modsecurity_crs_21_protocol_anomalies.conf"
                    },
                    {
                        "vendor_id": "SAMPLE",
                        "active": 1,
                        "config": "modsec_vendor_configs/SAMPLE/base_rules/modsecurity_crs_30_http_policy.conf"
                    },
                    {
                        "vendor_id": "SAMPLE",
                        "active": 1,
                        "config": "modsec_vendor_configs/SAMPLE/base_rules/modsecurity_crs_60_correlation.conf"
                    },
                    {
                        "vendor_id": "SAMPLE",
                        "active": 1,
                        "config": "modsec_vendor_configs/SAMPLE/base_rules/modsecurity_crs_42_tight_security.conf"
                    },
                    {
                        "vendor_id": "SAMPLE",
                        "active": 1,
                        "config": "modsec_vendor_configs/SAMPLE/base_rules/modsecurity_crs_20_protocol_violations.conf"
                    },
                    {
                        "vendor_id": "SAMPLE",
                        "active": 1,
                        "config": "modsec_vendor_configs/SAMPLE/base_rules/modsecurity_crs_47_common_exceptions.conf"
                    },
                    {
                        "vendor_id": "SAMPLE",
                        "active": 1,
                        "config": "modsec_vendor_configs/SAMPLE/slr_rules/modsecurity_crs_46_slr_et_wordpress_attacks.conf"
                    },
                    {
                        "vendor_id": "SAMPLE",
                        "active": 1,
                        "config": "modsec_vendor_configs/SAMPLE/slr_rules/modsecurity_crs_46_slr_et_phpbb_attacks.conf"
                    },
                    {
                        "vendor_id": "SAMPLE",
                        "active": 1,
                        "config": "modsec_vendor_configs/SAMPLE/slr_rules/modsecurity_crs_46_slr_et_joomla_attacks.conf"
                    }
                ],
                "update": 0
            }
        ]
    },
    "metadata": {
        "version": 1,
        "reason": "OK",
        "result": 1,
        "command": "modsec_get_vendors"
    }
}
 Output (XML)
<result>
    <data>
        <vendors>
            <vendor_url>
https://www.SAMPLE.org/index.php/Category:SAMPLE_ModSecurity_Core_Rule_Set_Project
</vendor_url>
            <inst_dist>SAMPLE_1415038544</inst_dist>
            <installed>1</installed>
            <report_url>https://server.example.com/report</report_url>
            <dist_md5>ffbaa3a7ead8dfaf0b661a729ce6ad3b</dist_md5>
            <enabled>1</enabled>
            <vendor_id>SAMPLE</vendor_id>
            <name>SAMPLE ModSecurity Core Rule Set</name>
            <cpanel_provided>0</cpanel_provided>
            <path>/usr/local/apache/conf/modsec_vendor_configs/SAMPLE</path>
            <description>Sample SAMPLE curated ModSecurity rule set</description>
            <installed_from>http://www.example.com/meta_SAMPLE.yaml</installed_from>
            <archive_url>http://www.example.com/SAMPLE_1415038544.zip</archive_url>
            <in_use>32</in_use>
            <configs>
                <vendor_id>SAMPLE</vendor_id>
                <active>1</active>
                <config>
modsec_vendor_configs/SAMPLE/modsecurity_crs_10_setup.conf
</config>
            </configs>
            <configs>
                <vendor_id>SAMPLE</vendor_id>
                <active>1</active>
                <config>
modsec_vendor_configs/SAMPLE/optional_rules/modsecurity_crs_16_session_hijacking.conf
</config>
            </configs>
            <configs>
                <vendor_id>SAMPLE</vendor_id>
                <active>1</active>
                <config>
modsec_vendor_configs/SAMPLE/optional_rules/modsecurity_crs_46_av_scanning.conf
</config>
            </configs>
            <configs>
                <vendor_id>SAMPLE</vendor_id>
                <active>1</active>
                <config>
modsec_vendor_configs/SAMPLE/optional_rules/modsecurity_crs_49_header_tagging.conf
</config>
            </configs>
            <configs>
                <vendor_id>SAMPLE</vendor_id>
                <active>1</active>
                <config>
modsec_vendor_configs/SAMPLE/optional_rules/modsecurity_crs_16_authentication_tracking.conf
</config>
            </configs>
            <configs>
                <vendor_id>SAMPLE</vendor_id>
                <active>1</active>
                <config>
modsec_vendor_configs/SAMPLE/optional_rules/modsecurity_crs_11_avs_traffic.conf
</config>
            </configs>
            <configs>
                <vendor_id>SAMPLE</vendor_id>
                <active>1</active>
                <config>
modsec_vendor_configs/SAMPLE/optional_rules/modsecurity_crs_55_marketing.conf
</config>
            </configs>
            <configs>
                <vendor_id>SAMPLE</vendor_id>
                <active>1</active>
                <config>
modsec_vendor_configs/SAMPLE/optional_rules/modsecurity_crs_43_csrf_protection.conf
</config>
            </configs>
            <configs>
                <vendor_id>SAMPLE</vendor_id>
                <active>1</active>
                <config>
modsec_vendor_configs/SAMPLE/optional_rules/modsecurity_crs_47_skip_outbound_checks.conf
</config>
            </configs>
            <configs>
                <vendor_id>SAMPLE</vendor_id>
                <active>1</active>
                <config>
modsec_vendor_configs/SAMPLE/optional_rules/modsecurity_crs_13_xml_enabler.conf
</config>
            </configs>
            <configs>
                <vendor_id>SAMPLE</vendor_id>
                <active>1</active>
                <config>
modsec_vendor_configs/SAMPLE/optional_rules/modsecurity_crs_10_ignore_static.conf
</config>
            </configs>
            <configs>
                <vendor_id>SAMPLE</vendor_id>
                <active>1</active>
                <config>
modsec_vendor_configs/SAMPLE/optional_rules/modsecurity_crs_16_username_tracking.conf
</config>
            </configs>
            <configs>
                <vendor_id>SAMPLE</vendor_id>
                <active>1</active>
                <config>
modsec_vendor_configs/SAMPLE/optional_rules/modsecurity_crs_25_cc_known.conf
</config>
            </configs>
            <configs>
                <vendor_id>SAMPLE</vendor_id>
                <active>1</active>
                <config>
modsec_vendor_configs/SAMPLE/optional_rules/modsecurity_crs_42_comment_spam.conf
</config>
            </configs>
            <configs>
                <vendor_id>SAMPLE</vendor_id>
                <active>1</active>
                <config>
modsec_vendor_configs/SAMPLE/base_rules/modsecurity_crs_41_sql_injection_attacks.conf
</config>
            </configs>
            <configs>
                <vendor_id>SAMPLE</vendor_id>
                <active>1</active>
                <config>
modsec_vendor_configs/SAMPLE/base_rules/modsecurity_crs_41_xss_attacks.conf
</config>
            </configs>
            <configs>
                <vendor_id>SAMPLE</vendor_id>
                <active>1</active>
                <config>
modsec_vendor_configs/SAMPLE/base_rules/modsecurity_crs_59_outbound_blocking.conf
</config>
            </configs>
            <configs>
                <vendor_id>SAMPLE</vendor_id>
                <active>1</active>
                <config>
modsec_vendor_configs/SAMPLE/base_rules/modsecurity_crs_40_generic_attacks.conf
</config>
            </configs>
            <configs>
                <vendor_id>SAMPLE</vendor_id>
                <active>1</active>
                <config>
modsec_vendor_configs/SAMPLE/base_rules/modsecurity_crs_35_bad_robots.conf
</config>
            </configs>
            <configs>
                <vendor_id>SAMPLE</vendor_id>
                <active>1</active>
                <config>
modsec_vendor_configs/SAMPLE/base_rules/modsecurity_crs_23_request_limits.conf
</config>
            </configs>
            <configs>
                <vendor_id>SAMPLE</vendor_id>
                <active>1</active>
                <config>
modsec_vendor_configs/SAMPLE/base_rules/modsecurity_crs_45_trojans.conf
</config>
            </configs>
            <configs>
                <vendor_id>SAMPLE</vendor_id>
                <active>1</active>
                <config>
modsec_vendor_configs/SAMPLE/base_rules/modsecurity_crs_50_outbound.conf
</config>
            </configs>
            <configs>
                <vendor_id>SAMPLE</vendor_id>
                <active>1</active>
                <config>
modsec_vendor_configs/SAMPLE/base_rules/modsecurity_crs_49_inbound_blocking.conf
</config>
            </configs>
            <configs>
                <vendor_id>SAMPLE</vendor_id>
                <active>1</active>
                <config>
modsec_vendor_configs/SAMPLE/base_rules/modsecurity_crs_21_protocol_anomalies.conf
</config>
            </configs>
            <configs>
                <vendor_id>SAMPLE</vendor_id>
                <active>1</active>
                <config>
modsec_vendor_configs/SAMPLE/base_rules/modsecurity_crs_30_http_policy.conf
</config>
            </configs>
            <configs>
                <vendor_id>SAMPLE</vendor_id>
                <active>1</active>
                <config>
modsec_vendor_configs/SAMPLE/base_rules/modsecurity_crs_60_correlation.conf
</config>
            </configs>
            <configs>
                <vendor_id>SAMPLE</vendor_id>
                <active>1</active>
                <config>
modsec_vendor_configs/SAMPLE/base_rules/modsecurity_crs_42_tight_security.conf
</config>
            </configs>
            <configs>
                <vendor_id>SAMPLE</vendor_id>
                <active>1</active>
                <config>
modsec_vendor_configs/SAMPLE/base_rules/modsecurity_crs_20_protocol_violations.conf
</config>
            </configs>
            <configs>
                <vendor_id>SAMPLE</vendor_id>
                <active>1</active>
                <config>
modsec_vendor_configs/SAMPLE/base_rules/modsecurity_crs_47_common_exceptions.conf
</config>
            </configs>
            <configs>
                <vendor_id>SAMPLE</vendor_id>
                <active>1</active>
                <config>
modsec_vendor_configs/SAMPLE/slr_rules/modsecurity_crs_46_slr_et_wordpress_attacks.conf
</config>
            </configs>
            <configs>
                <vendor_id>SAMPLE</vendor_id>
                <active>1</active>
                <config>
modsec_vendor_configs/SAMPLE/slr_rules/modsecurity_crs_46_slr_et_phpbb_attacks.conf
</config>
            </configs>
            <configs>
                <vendor_id>SAMPLE</vendor_id>
                <active>1</active>
                <config>
modsec_vendor_configs/SAMPLE/slr_rules/modsecurity_crs_46_slr_et_joomla_attacks.conf
</config>
            </configs>
            <update>0</update>
        </vendors>
    </data>
    <metadata>
        <version>1</version>
        <reason>OK</reason>
        <result>1</result>
        <command>modsec_get_vendors</command>
    </metadata>
</result>


Note:

Use WHM's API Shell interface (WHM >> Home >> Development >> API Shell) to directly test WHM API calls.

Parameters

This function does not accept parameters.

Returns

ReturnTypeDescriptionPossible valuesExample
vendorsarray of hashesAn array of hashes that represent the list of configured vendors on the system.

Each hash includes the enabled, update, cpanel_provided, vendor_url, archive_url, vendor_id, name, description, report_url, in_use, inst_dist, dist_md5, installed, installed_from, and path returns and the configs array.

 

enabled

BooleanWhether the vendor is enabled.

The function returns this value in the vendors array.
  • 1 — Enabled.
  • 0 — Disabled.
1

update

Boolean

Whether the vendor rule set can receive automatic updates.

The function returns this value in the vendors array.

  • 1 — Can receive automatic updates.
  • 0 — Cannot receive automatic updates.
1

cpanel_provided

Boolean

Whether cPanel & WHM installed the vendor rule set.

The function returns this value in the vendors array.

  • 1 — Installed.
  • 0Not installed.
1

vendor_url

string

The URL of the vendor's website.

The function returns this value in the vendors array.

A valid URL.
 Click to view...

  https://www.SAMPLE.org/index.php/Category:SAMPLE_ModSecurity_Core_Rule_Set_Project

archive_url

string

The URL to download the vendor rules.

The function returns this value in the vendors array.

A valid URL.
 Click to view...

 http://www.example.com/SAMPLE_1415038544.zip

vendor_id

string

The vendor's unique short name.

The function returns this value in the vendors array.

A valid string.SAMPLE

name

string

The vendor's name.

The function returns this value in the vendors array.

A valid string.

SAMPLE ModSecurity Core Rule Set

description

string

The ModSecurity vendor's description.

The function returns this value in the vendors array.

A valid string.

Sample SAMPLE curated ModSecurity rule set

report_url

string

The URL of the Report Receiver API endpoint that reports problems with the vendor's rules.

The function returns this value in the vendors array.

Note:

The function may not always return this parameter.

A valid URL.

https://server.example.com/report

in_use

integer

The number of configuration files in the vendor rule set.

The function returns this value in the vendors array.

A valid integer.32

inst_dist

string

The rule set version's unique identifier.

The function returns this value in the vendors array.

A valid string.

SAMPLE_1415038544

dist_md5

string

The download's MD5 checksum value.

The function returns this value in the vendors array.

A valid string.

ffbaa3a7ead8dfaf0b661a729ce6ad3b

installed

Boolean

Whether the vendor is installed.

The function returns this value in the vendors array.

  • 1 — Installed.
  • 0 — Not installed.
1

installed_from

string

The URL to the vendor's metadata file.

The function returns this value in the vendors array.

A valid URL.

http://www.example.com/meta_SAMPLE.yaml

path

string

The full path to the vendor's ModSecurity configuration files.

The function returns this value in the vendors array.

An absolute file path to the vendor's configuration files.

 Click to view...

/usr/local/apache/conf/modsec_vendor_configs/SAMPLE

configs

array

A hash of information about the configuration files that the vendor provides.

This array includes the active, vendor_id, and config returns.


active

Boolean

Whether the configuration is active.

The function returns this value in the configs array.

  • 1 — Active.
  • 0 — Inactive.
1

vendor_id

string

The vendor's unique short name.

The function returns this value in the configs array.

A valid string.SAMPLE

config

string

The configuration file path.

The function returns this value in the configs array.

A relative path to the Apache configuration base-directory of the /usr/local/Apache/conf configuration file.
 Click to view...

modsec_vendor_configs/SAMPLE/slr_rules/modsecurity_crs_46_slr_et_joomla_attacks.conf