Check the files behind your website

JaySift reads the files that make up a website and reports the ones that look like malware, with the file, the line, and the reason. It is free, open source, and small enough to read.

What you need

Node.js 18 or newer

On the machine that runs the scan. Check with node -v. If that prints nothing or an older version, install Node from nodejs.org.

The site's files on that machine

JaySift reads files on disk. It does not connect to a website address. Either run it on your server, or scan a downloaded copy of the site.

A terminal

Terminal on macOS, PowerShell on Windows, or any shell on Linux. Nothing else: no account, no PHP, no database access, no background service.

Two ways to get the files in front of it

On the server

If your host gives you SSH, log in and check for Node with node -v. Then scan the site root, which is usually public_html, htdocs, www, or /var/www/your-site. If Node is missing, many shared hosts let you add it through a Node.js app setting in the control panel.

On a downloaded copy

This works on any hosting, including hosting with no SSH. Download the whole site folder with an SFTP client or your host's file manager, unzip it on your computer, and scan that folder. The report is about the copy, so clean the live site by hand using the paths it gives you.

Scan the whole site root. Attackers also edit wp-config.php, .htaccess, and the root index.php, which live outside wp-content.

Four steps, nothing deleted

Each step leaves the one before it intact. You decide when a file moves, and you can always move it back.

  1. Scan
    • One folder
    • Known techniques
    • Packed and hidden code
    • Skips listed
  2. Read
    • File and line
    • The reason
    • Ranked by severity
    • You judge it
  3. Quarantine
    • Dry run first
    • Local vault
    • Byte for byte
    • Site stops serving it
  4. Restore
    • One command
    • Back where it was
    • Unchanged
    • If a finding was wrong

Start with a scan

No install needed. The first command runs the current version straight from npm and scans the folder you name.

Scan a folder
npx jaysift ./public_html

Replace ./public_html with the folder that holds your site. A single dot means the current folder.

Prove it works first
npx jaysift --selftest

Detects the harmless, industry-standard EICAR test file end to end, so you know the setup is right before you scan anything real.

Optional: install it once
npm install -g jaysift

After this you can type jaysift instead of the npx command.

Full documentation on GitHub

Reading the report

Findings are ranked critical, high, medium, and low. Each one names the file, the line, and the reason in plain language, so you can open the file and judge it yourself.

On a WordPress site, JaySift recognises the install and tags flagged files that belong to WordPress itself.

Exit codes: 0 clean, 1 threats found, 2 error. That makes it easy to use in a CI pipeline or a cron job.

No tag
A file in uploads, cache, or loose in the root. Often planted, though the scanner can be wrong. Open it and read the reason first. Quarantine can be undone.
[wordpress core], [wordpress config], [wordpress theme], [wordpress plugin]
The tag identifies where the file belongs in WordPress. A finding can be wrong: read the evidence and compare with a trusted copy before making changes. If malicious code is confirmed, restore or repair from a trusted source. Quarantining this file may break the site or one of its features.

Quarantine and restore

A scan only reads and reports. Quarantine moves each flagged file into a local vault and records where it came from. Review the findings and run a dry run first. Files in the vault can be restored unless you explicitly purge them.

Preview what would move, changing nothing
npx jaysift ./public_html --quarantine --dry-run

Move every threat into the vault
npx jaysift ./public_html --quarantine

See what is in the vault
npx jaysift --list

Put one file back if a finding was wrong
npx jaysift --restore <id>

Put everything back
npx jaysift --restore

After the scan

Removing the files is the start, not the end. JaySift cannot do these for you.

  1. Update WordPress, every plugin, and every theme, and delete the ones you do not use. The way in was almost always an outdated or pirated one.
  2. Change every password: WordPress admins, hosting panel, SFTP, and the database user in wp-config.php. Rotate the salts in wp-config.php.
  3. Look for admin users you did not create and remove them.
  4. Check the database, which JaySift never reads: siteurl and home in wp_options, unknown entries there, and script or iframe tags inside post content.
  5. Verify core files against the official checksums with WP-CLI: wp core verify-checksums.
  6. Read .htaccess for redirects you did not write.
  7. If Google flagged the site, request a review in Search Console once it is clean.

What it can and cannot promise

It can

  • Read every file under the folders you name, except the skipped folder names and oversized files it tells you about.
  • Show the exact file, line, and evidence for every finding.
  • Recognise a WordPress install and tell you which flagged files are the site's own code.
  • Quarantine without data loss. Every moved file is kept byte for byte and can be restored.
  • Fit a pipeline: JSON output, exit codes, no dependencies, no network calls.

It cannot

  • Scan a website by its address. It has no crawler.
  • Read a database.
  • Prove a file is unchanged. It has no copy of the official checksums.
  • Know which plugin versions are vulnerable, or how the attacker got in.
  • Watch in real time, block requests, or replace a firewall and backups.
  • Catch everything, or be right every time.

Not the person who manages the files?

Copy this note and send it to whoever looks after your website. It has everything they need to run a scan.

Could you run JaySift on our website files? It is a free, open-source malware scanner from JayHackPro® (MIT license, no dependencies, needs Node.js 18 or newer).

Scan the site root:
  npx jaysift ./public_html

Preview quarantine without changing anything:
  npx jaysift ./public_html --quarantine --dry-run

Setup and documentation: https://www.jayhackpro.com/jaysift
Source: https://github.com/JayHackPro/JaySift

Questions people ask while setting up

Which folder should I scan?

The whole site root. Attackers also change wp-config.php, .htaccess, and the root index.php, and JaySift can only report on what it is pointed at. For a deeper scan add --include vendor so plugin dependency folders are read too.

Will quarantine break my site?

Quarantining a planted file does not. Quarantining a file tagged as WordPress core, config, theme, or plugin takes that part of the site offline until you replace it with a clean copy. Run the dry run first and read the tags.

Why were some folders skipped?

Folders named .git, .svn, .hg, node_modules, vendor, .cache, and the quarantine vault are skipped by default so a scan stays fast. Files over 5 MB are skipped for size. The report says what was skipped, and --include vendor, --include all, or --max-size change that.

Can I use it in CI or a cron job?

Yes. Exit code 0 means clean, 1 means threats found, 2 means error. Add --json for a machine-readable report and --min-severity high to fail a build only on serious findings.

Command reference
How do I silence a rule I have checked?

Pass its id with --ignore-rule, for example --ignore-rule js.packer. Run with -v to see rule ids in the report. If a rule flags clean code, that is a bug worth reporting to the project.

Open an issue
quarantine vault

Have a question about a finding?

Tell us what you ran and what JaySift reported. Use email for anything private, or a GitHub issue for a public bug report.