Skip to content

Instantly share code, notes, and snippets.

@alanef
Created November 7, 2023 18:52
Show Gist options
  • Save alanef/670ece23155894a71eee47af2d0c0989 to your computer and use it in GitHub Desktop.
Save alanef/670ece23155894a71eee47af2d0c0989 to your computer and use it in GitHub Desktop.
PHPCS WP Sec Rules 3.0
<?xml version="1.0"?>
<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Example Project"
xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/squizlabs/PHP_CodeSniffer/master/phpcs.xsd">
<description>WP Security</description>
<rule ref="WordPress.Security.EscapeOutput">
</rule>
<rule ref="WordPress.Security.SafeRedirect">
</rule>
<rule ref="WordPress.Security.NonceVerification">
</rule>
<rule ref="WordPress.Security.PluginMenuSlug">
</rule>
<rule ref="Squiz.PHP.Eval">
</rule>
<rule ref="WordPress.PHP.RestrictedPHPFunctions">
</rule>
<rule ref="WordPress.Security.ValidatedSanitizedInput">
</rule>
</ruleset>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment