Skip to content

Commit

Permalink
Merge pull request #688 from WordPress/687-add-security-checks-to-plu…
Browse files Browse the repository at this point in the history
…gin-repo-category

Add Security checks to plugin repo category
  • Loading branch information
felixarntz authored Oct 4, 2024
2 parents a4a9785 + 94639e3 commit 98221d8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
5 changes: 4 additions & 1 deletion includes/Checker/Checks/Security/Direct_DB_Queries_Check.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ class Direct_DB_Queries_Check extends Abstract_PHP_CodeSniffer_Check {
* @return array The categories for the check.
*/
public function get_categories() {
return array( Check_Categories::CATEGORY_SECURITY );
return array(
Check_Categories::CATEGORY_SECURITY,
Check_Categories::CATEGORY_PLUGIN_REPO,
);
}

/**
Expand Down
5 changes: 4 additions & 1 deletion includes/Checker/Checks/Security/Late_Escaping_Check.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ class Late_Escaping_Check extends Abstract_PHP_CodeSniffer_Check {
* @return array The categories for the check.
*/
public function get_categories() {
return array( Check_Categories::CATEGORY_SECURITY );
return array(
Check_Categories::CATEGORY_SECURITY,
Check_Categories::CATEGORY_PLUGIN_REPO,
);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion tests/behat/features/plugin-list-checks.feature
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@ Feature: Test that the WP-CLI plugin list checks command works.
"""
And STDOUT should contain:
"""
late_escaping,security,stable
late_escaping,"security, plugin_repo",stable
"""

0 comments on commit 98221d8

Please sign in to comment.