class
Analyzer::Php::Magento
- Analyzer::Php::Magento
- Analyzer::Php::PhpEngine
- Analyzer
- Reference
- Object
Overview
Magento 2 attack-surface extractor.
Magento exposes two distinct HTTP surfaces:
-
Web API (REST) — declared in
etc/webapi.xml:... served under the/restprefix ->/rest/V1/products/{sku}. -
MVC controllers — a module's
etc/{area}/routes.xmlbinds a module to a URLfrontName, and eachController/.../Action.phpclass (with anexecute()method) maps to/{frontName}/{controller}/{action}.
We parse only webapi.xml / routes.xml (a Magento tree is full of
other XML — module.xml, di.xml, config.xml, acl.xml …) and
controller classes under /Controller/.
Defined in:
analyzer/analyzers/php/magento.crConstant Summary
-
HTTP_ACTION_INTERFACES =
{"HttpGetActionInterface" => "GET", "HttpPostActionInterface" => "POST", "HttpPutActionInterface" => "PUT", "HttpDeleteActionInterface" => "DELETE", "HttpPatchActionInterface" => "PATCH"} -
Http{Verb}ActionInterfacemarkers a controller can implement to declare the HTTP methods it accepts.