Usefulness of this enhancement though I think would have greater potential if it handled the GitHub API’s output natively.
Sure, why not. Considering that this feature will not be used by many people, I’ve decided to support GitHub repositories exclusively rather than open this option to random URLs, here is the commit [1] I guess this will also be useful for people who want to check their installation against the alpha version of WordPress [2].
WARNING! Everything related to this new feature works as expected. However, if you enable the “Diff Utility” from the scanner panel in the plugin’ settings page you will notice some problems. Here is why:
With the diff utility enabled, you can click the files in the integrity panel and the plugin will display a popup with the differences between the file in your WordPress installation and the file in API. To do this, the plugin downloads a copy of the selected file in the temporary partition of your server, then uses the Unix diff command to compare these two files. This command doesn’t knows how to understand certain white spaces, so the plugin will report that there are no differences between those two files even when their checksums are different. Below is an example:
XMLRPC.php by WordPress
0830 73732d49 58522e70 68702729 3b0a696e |ss-IXR.php');.in|
0840 636c7564 655f6f6e 63652841 42535041 |clude_once(ABSPA|
0850 5448202e 20575049 4e43202e 20272f63 |TH . WPINC . '/c|
0860 6c617373 2d77702d 786d6c72 70632d73 |lass-wp-xmlrpc-s|
0870 65727665 722e7068 7027293b 200a0a2f |erver.php'); ../|
XMLRPC.php by ProjectNami
0830 73732d49 58522e70 68702729 3b0a696e |ss-IXR.php');.in|
0840 636c7564 655f6f6e 63652841 42535041 |clude_once(ABSPA|
0850 5448202e 20575049 4e43202e 20272f63 |TH . WPINC . '/c|
0860 6c617373 2d77702d 786d6c72 70632d73 |lass-wp-xmlrpc-s|
0870 65727665 722e7068 7027293b 0a0a2f2a |erver.php');../*|
Notice how the code provided by WordPress has an extra white space right after the semi-colon at the end of the inclusion of “class-wp-xmlrpc-server.php” while the code provided by ProjectNami is clean. These changes are difficult to catch, so while the plugin will correctly flag this file as modified, the diff utility will print an error message saying “there are no differences between these two files”.
As in my previous comment, feel free to install the development version of the plugin from here [2] or wait until the public release in a couple of weeks. Enjoy it!
[1] https://github.com/Sucuri/sucuri-wordpress-plugin/pull/40/commits/c2f005e
[2] https://github.com/cixtor/sucuri-wordpress-plugin/archive/master.zip