Check: Allowing Direct File Access to plugin files #603
Labels
Checks
Audit/test of the particular part of the plugin
[Team] Plugin Review
Issues owned by Plugin Review Team
This check consists to avoid direct file access if someone directly queries a file.
For files that only contain a PHP class the risk of something funky happening when directly accessed is pretty small. For files that contain procedural code, functions and function calls, the chance of security risks is a lot bigger.
We can avoid this by putting this code at the top of all PHP files that could potentially execute code if accessed directly :
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
What we do actually in the internal scanner:
Finally in results we say all files that does not contain this header.
The text was updated successfully, but these errors were encountered: