Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
03f0af5
fix(site): harden php-compat's image, memory, control files and mounts
mrrobot47 Nov 24, 2026
4e2938a
fix(site): coordinate php-compat with site delete, restore and signals
mrrobot47 Nov 24, 2026
7866293
Merge branch 'fix/php-compat-public-dir' into fix/php-compat-hardening
mrrobot47 Nov 24, 2026
87520ae
Merge branch 'fix/php-compat-public-dir' into fix/php-compat-hardening
mrrobot47 Nov 24, 2026
7bac36c
fix(site): find WordPress in its own directory through the served ind…
mrrobot47 Nov 24, 2026
52c9956
Merge branch 'fix/php-compat-public-dir' into fix/php-compat-hardening
mrrobot47 Nov 24, 2026
ba119ee
Merge branch 'fix/php-compat-public-dir' into fix/php-compat-hardening
mrrobot47 Nov 24, 2026
a6ec26b
fix(site): close the gaps review found in php-compat's hardening
mrrobot47 Nov 24, 2026
35cfd2e
Merge branch 'fix/php-compat-public-dir' into fix/php-compat-hardening
mrrobot47 Nov 24, 2026
3156cd5
fix(site): read php-compat's WordPress loader as one unconditional in…
mrrobot47 Nov 24, 2026
89b66ab
Merge branch 'fix/php-compat-public-dir' into fix/php-compat-hardening
mrrobot47 Nov 24, 2026
aa44a61
Merge remote-tracking branch 'upstream/develop' into fix/php-compat-h…
mrrobot47 Nov 24, 2026
63d0bf3
fix(site): read compose files without symfony/yaml and pass over defi…
mrrobot47 Nov 24, 2026
c86c9cf
fix(site): name the directory php-compat's wp scan covers in its no-c…
mrrobot47 Nov 24, 2026
73c3ad2
fix(site): read php-compat's WordPress config from one token pass and…
mrrobot47 Nov 24, 2026
5809f7f
Merge remote-tracking branch 'upstream/develop' into fix/php-compat-h…
mrrobot47 Nov 24, 2026
dd3cab8
fix(site): keep the delete's php-compat lock until the delete ends
mrrobot47 Nov 24, 2026
cd155e1
fix(site): keep a php-compat check running when the terminal hangs up
mrrobot47 Nov 24, 2026
34005fe
test(site): hang up the docker client too in the php-compat hangup sc…
mrrobot47 Nov 24, 2026
f947a64
fix(site): bound php-compat's cancel guard wait and tell a failed doc…
mrrobot47 Nov 24, 2026
af56290
fix(site): open php-compat and restore lock files close-on-exec
mrrobot47 Nov 24, 2026
d974e34
fix(site): tell a restore apart from a php-compat check
mrrobot47 Nov 24, 2026
fd407ea
fix(site): take php-compat's estimate lock after the image pull
mrrobot47 Nov 24, 2026
4962273
fix(site): don't refuse a site delete over php-compat's temporary dir…
mrrobot47 Nov 24, 2026
ed41fee
fix(site): keep scanner tags another php-compat check is about to use
mrrobot47 Nov 24, 2026
4cb83fb
test(site): never remove a healthy /dev/null in the Behat hooks
mrrobot47 Nov 24, 2026
466bbf8
fix(site): remove an interrupted php-compat estimate's container
mrrobot47 Nov 24, 2026
8600336
fix(site): keep the site lock in delete's php-compat fallback and pol…
mrrobot47 Nov 24, 2026
278dcac
Merge branch 'fix/php-compat-locks-546' into fix/php-compat-hardening
mrrobot47 Nov 24, 2026
4160c35
fix(site): never call a site safe when its config runs code the scan …
mrrobot47 Nov 24, 2026
e079cbd
fix(site): give php-compat verdicts only for layouts it recognises in…
mrrobot47 Nov 25, 2026
00f5680
fix(site): read php-compat's layout under the lock and never let it b…
mrrobot47 Nov 25, 2026
50adf0a
fix(site): accept every stock EE PHP and nginx config in php-compat
mrrobot47 Nov 25, 2026
075970c
feat(site): scope php-compat's verdict to what it checked and gate Wo…
mrrobot47 Nov 25, 2026
8c8d906
fix(site): make php-compat's report match its verdict and accept CI/C…
mrrobot47 Nov 25, 2026
19b012d
fix(site): close php-compat's second-review gaps in paths, links and …
mrrobot47 Nov 25, 2026
d5fd4ac
fix(site): close the third review's php-compat gaps in settings, walk…
mrrobot47 Nov 25, 2026
b306e55
fix(site): tighten php-compat's .. rule, install links and current-PH…
mrrobot47 Nov 25, 2026
a8a8a11
fix(site): accept the wp-config lines plugins and WordPress's handboo…
mrrobot47 Nov 25, 2026
467e7e6
fix(site): refuse what php-compat's tokens can't read the way the sit…
mrrobot47 Nov 25, 2026
9622384
fix(site): close php-compat's reference and include-base holes in wp-…
mrrobot47 Nov 25, 2026
ca001b1
fix(site): read the files wp-config.php loads as scanned code, within…
mrrobot47 Nov 25, 2026
435260a
fix(site): accept WP Engine's $wpe_* leftovers in wp-config.php
mrrobot47 Nov 25, 2026
9dece01
Merge branch 'fix/php-compat-grammar-546' into fix/php-compat-hardening
mrrobot47 Nov 25, 2026
a7a1b29
feat(site): give php-compat's positive verdict only when the scanner …
mrrobot47 Nov 25, 2026
7f793b0
fix(site): read the scanner's real file manifest in php-compat's cros…
mrrobot47 Nov 25, 2026
f897341
fix(site): say when php-compat's file walk fails, and scan mounted co…
mrrobot47 Nov 25, 2026
2a7a182
fix(site): accept EE's unused app/wp-config.php when WordPress loads …
mrrobot47 Nov 25, 2026
b1110ee
fix(site): never report php-compat's no_code_found for a site being d…
mrrobot47 Nov 25, 2026
d3e13fc
fix(site): exempt EE's unused app/wp-config.php only as itself and on…
mrrobot47 Nov 25, 2026
565b4e0
fix(site): refuse EE's app/wp-config.php under htdocs -> releases/N o…
mrrobot47 Nov 25, 2026
58fa1da
fix(site): refuse links php-compat can't follow like the kernel, link…
mrrobot47 Nov 25, 2026
1aa2dd9
fix(site): close php-compat's frozen-pair review findings: links into…
mrrobot47 Nov 25, 2026
72fd26b
fix(site): check the WP-CLI configs `wp` reads from the site, served …
mrrobot47 Nov 25, 2026
a1b8fb5
fix(site): ignore nginx-helper's unused bundled Predis and accept rel…
mrrobot47 Nov 26, 2026
0f0081c
fix(site): narrow php-compat's newest accept rules to exact shapes
mrrobot47 Nov 26, 2026
4094706
fix(site): accept the wp-cli.yml path EE writes for the site's stored…
mrrobot47 Nov 26, 2026
5dd9765
fix(site): tighten the Predis exemption, drop two acceptances, and re…
mrrobot47 Nov 26, 2026
33baf39
fix(site): close the Predis exemption's link and FPM gaps, and align …
mrrobot47 Nov 26, 2026
376be47
fix(site): compare the FPM master's start with config times to the su…
mrrobot47 Nov 26, 2026
4f664cd
fix(site): judge the Predis exemption by the running FPM master's mod…
mrrobot47 Nov 26, 2026
c5c0dbc
fix(site): close the Predis exemption's dangling-link and mount gaps,…
mrrobot47 Nov 26, 2026
cc4e366
fix(site): refuse quoted ini section names and links inside mounted code
mrrobot47 Nov 26, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions features/COVERAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -225,8 +225,9 @@ Every scan scenario needs core's `img-versions.json` to pin `easyengine/compat-s
| Item | Status | Scenarios |
|---|---|---|
| `--format=json` on a wp and a php site: one-line summary, exit 0, no findings | covered (wp part @wp) | compat: The JSON summary of a WordPress site; The JSON summary of a php site |
| Table: verdict line first ("Not safe", "Safe"), every error with file, line and sniff, static-analysis line last | covered ("Not safe" part @wp) | compat: The table starts with the verdict line...; The table of a php site without errors says it is safe |
| "Can't confirm" verdict line | not covered | needs a file uid 33 can't read; the scanner side is in the dockerfiles fixture test |
| Table: verdict line first ("Not safe", or "No PHP <v> problems found in …" scoped to what was checked; never "Safe to upgrade"), every error with file, line and sniff, static-analysis line last | covered ("Not safe" part @wp) | compat: The table starts with the verdict line...; The table of a php site without errors says what was checked, never "safe" |
| WordPress core gate: version.php read, too-old core is "Not safe", undeclared PHP (8.6) is "Can't confirm", JSON `wordpress` object | covered @wp | compat: A WordPress site's verdict covers what was checked, and core by its version |
| "Can't confirm" verdict line from unchecked files | not covered | needs a file uid 33 can't read; the scanner side is in the dockerfiles fixture test |
| `--output`: root-owned 0600, replaces an existing file, same fields as the summary, `report`/`report_bytes` | covered | compat: --output writes a root-owned 0600 report... |
| No finding text in ee.log | covered | compat: ee.log holds no finding text after a check with findings |
| html site refused, bad or missing `--php` (dispatcher and command checks), flags `--cancel` doesn't take | covered | compat: An html site is refused; A bad --php value, a missing one, or a flag --cancel does not take is rejected (outline) |
Expand Down
32 changes: 28 additions & 4 deletions features/bootstrap/FeatureContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -488,6 +488,9 @@ public function prepareScenario( BeforeScenarioScope $scope )
*/
public function cleanupScenario(AfterScenarioScope $scope)
{
// A failed --output check could have replaced /dev/null with a file; never leave the runner without it.
clearstatcache( true, '/dev/null' );
self::repairDevNull( @stat( '/dev/null' ) );
$this->commands = [];
chdir($this->ee_path);

Expand Down Expand Up @@ -991,12 +994,33 @@ public function devNullShouldStillBeTheNullDevice()
{
clearstatcache( true, '/dev/null' );
$stat = @lstat( '/dev/null' );
if ( $stat && 0020000 === ( $stat['mode'] & 0170000 ) && 259 === $stat['rdev'] ) {
// 259 is 1:3, the null device's numbers on Linux only.
if ( $stat && 0020000 === ( $stat['mode'] & 0170000 ) && ( 'Linux' !== PHP_OS_FAMILY || 259 === $stat['rdev'] ) ) {
return;
}
self::repairDevNull( @stat( '/dev/null' ) );
throw new Exception( '/dev/null was replaced: ' . var_export( $stat, true ) );
}

/**
* Recreate /dev/null only on Linux and only when it is no character device at all (e.g. replaced by a file), so a
* healthy one is never removed.
*
* @param array|false $stat stat() of /dev/null (a link to a character device counts as healthy).
*/
private static function repairDevNull( $stat )
{
if ( 'Linux' !== PHP_OS_FAMILY || ( $stat && 0020000 === ( $stat['mode'] & 0170000 ) ) ) {
return;
}
@unlink( '/dev/null' );
exec( 'mknod -m 666 /dev/null c 1 3' );
throw new Exception( '/dev/null was replaced (restored now): ' . var_export( $stat, true ) );
// Made beside it and renamed over it, so there is never a moment without /dev/null.
$tmp = '/dev/.null-' . getmypid();
@unlink( $tmp );
exec( 'mknod -m 666 ' . escapeshellarg( $tmp ) . ' c 1 3', $out, $code );
if ( 0 !== $code || ! rename( $tmp, '/dev/null' ) ) {
@unlink( $tmp );
throw new Exception( 'could not recreate /dev/null' );
}
}

/**
Expand Down
Loading