1.3.0: WordPress-aware scanning and honest reporting - #1
Merged
Merged
Conversation
…ing clean core A scan now finds the WordPress install its targets belong to, prints the version, and tags every flagged file that is the site's own code as config, core, theme, or plugin, with advice to replace it with a clean copy rather than only quarantine it. Scanning only wp-content still knows its site. Folders named cache are scanned. The report counts the folders skipped by name and lists them, and --include puts them back, with "all" for everything. A website address is refused with the two ways to scan that site, over SSH or on a downloaded copy, instead of "no such file or folder". Rules match what malware writes, not what it resembles: the WSO rule wants WSO's own function and constant names; the hex rule wants a dangerous function or request variable spelled in hex, or a hex literal called as a function; the hidden iframe rule wants a hidden frame with a real destination and skips the Tag Manager noscript snippet. The long-line, high-entropy, and base64-blob heuristics also require a decoder, an execution call, or request input. A cached page whose only PHP is the die() guard is left alone. Tag attribute scans are bounded so a page of unterminated tags cannot stall a scan.
…n promise README gains a Requirements section, a step-by-step guide to scanning a WordPress site on any hosting with an after-the-scan checklist, the skip list and --include, and a plain account of what the scanner can and cannot do, with the clean-code corpus it is checked against. The landing page says the same in one line.
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.
What this changes
For a WordPress owner
config,core,theme,plugin) with advice to replace them with a clean copy rather than only quarantine them. Scanning onlywp-contentstill knows its site.jayshield https://example.comnow explains that JayShield reads files on disk and shows how to get them, instead of "no such file or folder".Honest reporting
cacheare scanned.wp-content/cacheis a common place to plant a shell, and the upload heuristic already treated it as one.--include <dir,...>scans them,--include allscans everything.Precision
A pristine WordPress 7.1 download was reported as 26 infected files, 5 critical. All were false positives. The WSO, hex-escape, and hidden-iframe rules and the long-line, high-entropy, and base64-blob heuristics are tightened to what malware actually writes (details in the changelog), and tag attribute scans are bounded so a page of unterminated tags cannot stall a scan.
Clean against WordPress 7.1 (with and without
--include vendor), WooCommerce 11.1.0, Astra 4.13.11, jQuery 3.7.1, and Laravel 12.x. Every planted threat in the fixtures is still found. 73 tests.After merging
npm publishfrom a freshgit pullon main (the package is at 1.3.0).v1.3.0and create the release from the changelog entry.