---
title: Whitelist files and folders
canonical: https://wpsecurityninja.com/docs/malware-scanner/whitelist-files-and-folders-in-malware-scanner/
---
If a scan flags files you know are safe, you can whitelist them so they stop appearing as findings.

## Whitelist from scan results

1. Run a scan from **Security Ninja → Malware**.
2. Next to a result, click **Whitelist**.
3. Confirm with **OK**.

![Issues found - Whitelist files in malware scanner](https://wpsecurityninja.com/media/2022/04/issues-found-whitelist-files-in-malware-scanner-1024x968.webp)

![Are you sure you want to whitelist this file?](https://wpsecurityninja.com/media/2022/04/are-you-sure-you-want-tot-whitelist-this-file.webp)

The file is skipped on later scans until you use **Revert Whitelist**.

To skip whole folders or path patterns (not just one file), use [Exclude paths from the Malware Scanner](https://wpsecurityninja.com/docs/malware-scanner/how-to-exclude-paths-from-the-malware-scanner/).

## Whitelist via code

You can also add custom code in a child theme’s `functions.php` or a small custom plugin.

See the [`securityninja_whitelist` filter](https://wpsecurityninja.com/docs/filters-hooks/securityninja_whitelist/) for details.
