← Back to Baseline

MB-0782

Automated Sensitive deployment configuration excluded from Git index

MB-C01 File & Folder Permissions High

The readable current deployment Git index does not track app/etc/env.php. Historical commits, remote repositories and deployments without a readable Git index require separate evidence.

Overview

The readable current deployment Git index does not track app/etc/env.php. Historical commits, remote repositories and deployments without a readable Git index require separate evidence.

Why it Matters

Once env.php enters the Git index it may be copied to remote repositories and build artifacts. Ignore rules do not remove a file already tracked.

The current index check supports packaging hygiene but cannot revoke a secret or erase historical exposure.

Verification Steps

Manual Verification

  1. Verify a readable deployment Git index, then check whether app/etc/env.php is tracked.
  2. Review ignore rules and release packaging separately.
  3. If credentials were previously committed, investigate history and rotate them through the approved process.

Command / Review Sample

git ls-files --error-unmatch -- app/etc/env.php
git check-ignore app/etc/env.php
# A no-match index result and a readable index are both needed.

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: Privately confirm whether app/etc/env.php is tracked using git ls-files --error-unmatch -- app/etc/env.php. Remove it from the index through a reviewed repository change while preserving required local deployment configuration and adding the ignore rule.
  2. Validate the change: Rotate any credentials committed to the repository and review historical/remote exposure; verify the current index no longer contains the file. No Git index means separate deployment evidence is needed.
  3. Rerun MB-0782 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

The current deployment index tracks app/etc/env.php.

Pass Example

A readable current index does not track env.php; historical/remote exposure is independently reviewed.

Scope and Evidence Limits

Rule revision: 1. Target modes: LOCAL.

The readable current deployment Git index does not track app/etc/env.php. Historical commits, remote repositories and deployments without a readable Git index require separate evidence.

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