← Back to Baseline

MB-0811

Partially automated REST declaration references a public service method

MB-C20 Module Integrity & Compatibility Medium

Selected global webapi.xml entries reference a public method on a uniquely indexed service class or interface within supported resolution scope.

Overview

Resolve webapi.xml service class and method to a unique indexed symbol. Check that the named method is public before testing the route in staging.

Why it Matters

A route pointing to a nonpublic or absent service method can fail when called.

Interpret the reported resource and collection scope before making changes. Unsupported source, unresolved symbols and bounded collection gaps cannot establish a clean result.

Verification Steps

Manual Verification

  1. Resolve webapi.xml service class and method to a unique indexed symbol. Check that the named method is public before testing the route in staging.
  2. Inspect the reported file, declaration, package or evidence record in the same selected release. Keep source observations separate from effective runtime behavior.
  3. Apply the rule-specific remediation below, validate the affected behavior in staging, and rerun the same selection.

Command / Review Sample

php magebean.phar audit --path=/var/www/magento --profile=module-integrity --rules=MB-0811 --modules=Vendor_Module

Use the assessed Magento project and the appropriate application or read-only review account. Replace example hosts, paths and identifiers with the assessment scope; configuration and source fragments are illustrative.

Remediation / Fix Guidance

  1. Point the route at the intended public service contract.
  2. Verify the corrected behavior in an authorized staging environment.
  3. Rerun MB-0811 with the same module selection.

Examples

Illustrative declaration/review examples, not recorded scan output. A pass example concerns only the stated predicate and supported collected scope.

Fail Example

webapi.xml service method: fetch
Indexed service has only protected fetch().

Pass Example

webapi.xml service method: fetch
Uniquely indexed service declares public fetch().
Authorization and live routing are separate checks.

Scope and Evidence Limits

Rule revision: 1. Target modes: LOCAL.

Selected global webapi.xml entries reference a public method on a uniquely indexed service class or interface within supported resolution scope.

Unindexed classes and unresolved inheritance remain collection gaps. DI preferences and generated runtime behavior are outside scope.

Catalog coverage describes implementation capability, not a scan outcome. An incomplete manual review cannot establish that the criterion is satisfied.

References