Skip to content

Commit 40bcc6c

Browse files
committed
feat: Implementation of WordPress Integrity Scanning
1 parent f4c713e commit 40bcc6c

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

src/SecureCommand.php

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -386,4 +386,21 @@ public function block_access_to_xmlrpc($args, $assoc_args) : void {
386386
public function flush($args, $assoc_args) : void {
387387
(new Flush($assoc_args))->output();
388388
}
389+
390+
/**
391+
* Verifies WordPress files against WordPress.org's checksums.
392+
*
393+
* Downloads md5 checksums for the current version from WordPress.org, and
394+
* compares those checksums against the currently installed files.
395+
*
396+
* It also returns a list of files that shouldn't be part of default WordPress installation.
397+
*
398+
* @param $args
399+
* @param $assoc_args
400+
*
401+
* @return void
402+
*/
403+
public function integrityscan($args, $assoc_args) : void {
404+
WP_CLI::runcommand('core verify-checksums');
405+
}
389406
}

0 commit comments

Comments
 (0)