← Back to Baseline

MB-0805

Automated Collected Composer dependency sources match explicit policy

MB-C10 Abandoned Extensions Removal Medium

Every package in the readable bounded collected composer.lock inventory has source and/or dist URL and nonempty reference matching the supplied exact per-package source policy; replacement declarations and root composer.json repository declarations also match the supplied policy. Explicit metadata-only metapackages may have no source/dist. Missing package policies or incomplete source identity are unresolved. This compares collected declarations and does not verify installed bytes, canonical upstream truth or absence of malicious approved revisions.

Overview

Every package in the readable bounded collected composer.lock inventory has source and/or dist URL and nonempty reference matching the supplied exact per-package source policy; replacement declarations and root composer.json repository declarations also match the supplied policy. Explicit metadata-only metapackages may have no source/dist. Missing package policies or incomplete source identity are unresolved. This compares collected declarations and does not verify installed bytes, canonical upstream truth or absence of malicious approved revisions.

Why it Matters

Unexpected source or reference changes can introduce a different dependency while preserving a familiar package name. Exact declaration policy makes those differences visible before release.

Approved metadata cannot authenticate installed bytes or guarantee that an approved upstream has not been compromised.

Verification Steps

Manual Verification

  1. Read composer.lock, root composer.json and the explicit per-package source policy.
  2. Compare source/dist URLs, nonempty references, replacements and repositories.
  3. Review explicit metadata-only metapackage exceptions and treat missing package policies as unresolved.

Command / Review Sample

composer show --locked --format=json
# Compare exact URLs/references and root repositories/replacements with:
# .magebean/dependency-source-policy.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

  1. Compare the reported package, source/dist URL, revision, replacement and root repository declarations against the approved exact source policy. Investigate unexpected forks/replacements before updating either lockfile or allow-list; restore the intended package/revision through normal Composer dependency resolution and deploy a reviewed build.
  2. Maintain .magebean/dependency-source-policy.json for the complete collected package inventory and rerun against composer.lock plus composer.json. Independently verify installed artifact integrity and trusted upstream provenance; merely approving the observed source does not perform that verification.
  3. Rerun MB-0805 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

A package's source/dist declaration or reference differs from its approved exact policy.

Pass Example

All assessed package/root declarations match explicit policy, including documented metadata-only exceptions.

Scope and Evidence Limits

Rule revision: 1. Target modes: LOCAL.

Every package in the readable bounded collected composer.lock inventory has source and/or dist URL and nonempty reference matching the supplied exact per-package source policy; replacement declarations and root composer.json repository declarations also match the supplied policy. Explicit metadata-only metapackages may have no source/dist. Missing package policies or incomplete source identity are unresolved. This compares collected declarations and does not verify installed bytes, canonical upstream truth or absence of malicious approved revisions.

Original historical criterion is not silently reactivated or weakened. Original historical criterion and ID remain in the engineering backlog; this new ID records only its exact supported observation.

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

References