← Back to Baseline

MB-0066

Automated No dev branches in composer.json

MB-C11 Composer Dependency Hygiene High

No dev branches in composer.json; assess only the collected Magento deployment scope.

Overview

No dev branches in composer.json; assess only the collected Magento deployment scope.

Why it Matters

Composer allows installing dependencies from dev-branch references (e.g., dev-master, dev-develop). These are unstable, not tagged for release, and may include incomplete features or insecure debugging code. Depending on dev branches in production removes version stability and exposes the store to unexpected breakage or vulnerabilities.

Production should only use tagged, stable releases. This ensures predictable behavior, reproducible builds, and access to properly reviewed security fixes.

Verification Steps

Manual Verification

  1. Inspect dependency constraints, minimum-stability and flags for development selections.
  2. Verify whether any exception is permitted by the intended policy.
  3. Select a reviewed stable constraint through the release process.

Command / Review Sample

composer validate --no-check-publish
# Review dev-main, dev branches and explicit stability flags.

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. Investigate and change: Replace the reported dev branch constraints with supported stable tagged releases where available. If a development reference is unavoidable, pin its immutable reference and document review, owner and expiry.
  2. Validate the change: Verify reproducible dependency resolution and security-update handling; do not silently suppress stability checks.
  3. Rerun MB-0066 against the same release, profile and relevant file/key/package scope; compare the new evidence and inspect any independent collection gaps.

Examples

Illustrative examples only. Interpret them within the current revision criterion above; missing collection evidence is unresolved, never PASS.

Fail Example

{"require":{"vendor/module":"dev-main"}}

Pass Example

{"require":{"vendor/module":"^2.4"},"minimum-stability":"stable"}
// Illustrative stable release constraint.

Scope and Evidence Limits

Rule revision: 2. Target modes: LOCAL.

No dev branches in composer.json; assess only the collected Magento deployment scope.

This check covers only the collected observation. Missing collection scope, external controls and runtime behavior require separate evidence.

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

References