In cPGuard, there are multiple options to whitelist certain entities from the scanner reports, and one of which is the directory whitelist. So using the directory whitelist option, you can whitelist a directory of a path (complete path of the partial path ) easily.
To whitelist a directory you need to go to cPGuard >> Settings >> Scanner >> Whitelist Files and specify the directory path.
For example: to whitelist a directory like "/home/user1/public_html/dir/exclude" - you can whitelist either of the following entries
1. Full path like "/home/user1/public_html/dir/exclude/"
2. Partial path like "user1/public_html/dir/exclude/"
NOTE :- If you add "/home/user1/public_html/dir/exclude" that will also whitelist "/home/user1/public_html/dir/exclude1" as well. So make sure to add exact string like "/home/user1/public_html/dir/exclude/"
Please contact support if you need any further details.