← Back to Baseline

MB-0818

Partially automated DI plugins target interceptable declarations

MB-C20 Module Integrity & Compatibility Medium

Enabled directly declared plugins use concrete plugin classes and supported hooks on interceptable target methods. Development without module order checks source declarations independently, without asserting effective runtime plugin activation.

Overview

Review enabled directly declared plugins, concrete plugin classes and supported hooks. Check interceptability of the target methods; static source does not establish runtime activation.

Why it Matters

Unsupported interception declarations can leave intended plugin behavior inactive.

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. Review enabled directly declared plugins, concrete plugin classes and supported hooks. Check interceptability of the target methods; static source does not establish runtime activation.
  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-0818 --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. Check the reported DI declaration and its area override.
  2. Verify the affected class or service in staging.
  3. Rerun MB-0818 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

Plugin attempts to intercept a final public target method.

Pass Example

Plugin hook names an eligible nonfinal public target method.
Concrete plugin class resolves; test effective interception in staging.

Scope and Evidence Limits

Rule revision: 2. Target modes: LOCAL.

Enabled directly declared plugins use concrete plugin classes and supported hooks on interceptable target methods. Development without module order checks source declarations independently, without asserting effective runtime plugin activation.

Static declaration analysis only. Unresolved symbols and unsupported runtime or generated behavior are collection gaps.

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

References