Repository navigation
fix(log): mask secret values in logged info tables - #1947
Merged
mrrobot47 merged 2 commits intoOct 12, 2026
Merged
Conversation
site clone runs ee site create in a child process and logs its output, which ends with the new site's info table. The parent never sees the generated passwords, so the DB Password, DB Root Password and WordPress Password values reached ee.log. mask_secret_patterns() now masks the value cell of any table row whose label names a password, secret, token or API key.
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The regex masks unrelated labels containing secret-key substrings, and regression tests are missing.
1 open finding
What changed in this PR
Adds last-resort masking for secret values appearing in logged information tables.
Changes:
- Masks password, secret, token, and API-key table cells.
- Preserves existing masking behavior for other formats.
| File | Description |
|---|---|
php/utils.php |
Adds table-row secret masking. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
A label like Cache bypass, Passenger or Tokenizer only contains a keyword, so its row was masked too. The keyword now has to be a word of the label (password, passwd, passphrase, pass, pwd, secret, token or API key, optionally plural).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

ee site clonecreates the destination with a nestedee site createand logs that command's output, which ends with the new site's info table. The parent process never sees the passwords the nested command generates, so the destination's database password reachedee.logonce per clone.The last-resort pattern masking now also masks the value cell of a table row whose label names a password, secret, token or API key, such as
| DB Password | … |, in multi-line and in flattened output. Other rows are left as they are, and what the command prints for the user is unchanged.Tested with PHPUnit (PHP 7.4, 8.2 and 8.5), CI and live with a local clone: the destination's password no longer appears in
ee.log, and the clone output still shows it.