Overview
No wildcard constraints in composer.json; assess only the collected Magento deployment scope.
Why it Matters
Composer allows version constraints like * or x.* which match any version. Using wildcards is dangerous because it removes control over which package version gets installed. A new release (even with breaking changes or vulnerabilities) may be pulled in automatically without review, leading to unexpected regressions or exposure to untested code.
Requiring explicit, pinned, or semver-safe ranges (^, ~) ensures only intended versions are installed and security upgrades can be managed in a controlled way.
Verification Steps
Manual Verification
- Inspect require and require-dev values in composer.json.
- Replace wildcard ranges with intentional supported constraints and validate the manifest.
- Review resulting updates through the normal release workflow.
Command / Review Sample
composer validate --no-check-publish
# Inspect dependency constraints in composer.json.
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
- Investigate and change: Replace the reported wildcard dependency constraints with explicit supported compatible release ranges based on vendor/Magento compatibility. Resolve and review composer.lock in a branch.
- Validate the change: Verify constraints and locked versions after integration tests; a stricter range must still allow security updates.
- Rerun MB-0065 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":"*"}}
Pass Example
{"require":{"vendor/module":"^2.4"}}
// Review compatibility and commit the corresponding lockfile.
Scope and Evidence Limits
Rule revision: 2. Target modes: LOCAL.
No wildcard constraints 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.