Problem/Motivation

In this Drupal application, lower environments (such as development, testing, or staging) may still be able to send real emails to end users, which can leak test data, confuse users, or unintentionally trigger real-world workflows during testing.

Steps to reproduce

Proposed resolution

Add a new Security FitCheck plugin LowEnvironmentEmailRerouteCheck that:

  • Detects when the site is running in a non-production environment (for example via environment settings or configuration flags).
  • Checks the mail system configuration to ensure outgoing emails are rerouted to a safe sink address (or disabled) instead of being sent to real recipients.
  • Fails with FitWeight::High when a lower environment can send mail to arbitrary addresses, listing the current mail settings and recommending enabling an email reroute/sandbox configuration.

Remaining tasks

User interface changes

API changes

Data model changes

Issue fork drupalfit-3558976

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

harivansh created an issue. See original summary.

harivansh’s picture

shubham.prakash made their first commit to this issue’s fork.

shubham.prakash’s picture

Status: Active » Needs review

harivansh’s picture

Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

harivansh’s picture

Status: Fixed » Closed (fixed)