Skip to content

Add security-scan ability - #57

Merged
pluginslab merged 2 commits into
devfrom
feature/security-scan
Mar 20, 2026
Merged

pluginslab merged 2 commits into
devfrom
feature/security-scan

Conversation

@ivdimova

Copy link
Copy Markdown
Collaborator

Summary

  • Add security-scan ability to run basic WordPress security checks ([Ability] security-scan — Run basic security checks #9)
  • Checks: WP_DEBUG, WP_DEBUG_DISPLAY, wp-config permissions, auth salts, version exposure, directory listing
  • Results grouped by severity (critical/warning/info) with passed checks listed separately

Changes

  • includes/abilities/security-scan.php — PHP backend with 6 security checks and severity levels
  • src/extensions/abilities/security-scan.js — JS frontend with severity-grouped summarize output
  • includes/class-abilities.php — Register security-scan in core abilities
  • src/extensions/abilities/index.js — Import, re-export, and call registration
  • tests/abilities/core-abilities.test.js — 2 test cases for security-related queries

Testing

  • Unit tests pass (npm test) — 43/43
  • Ability tests pass (npm run test:abilities)
  • JS lint clean
  • PHP lint clean — pre-existing PHPCS config issue
  • Manually tested in browser

🤖 Generated with Claude Code

Run basic security checks: WP_DEBUG exposure, wp-config permissions, salt validation,
version exposure, and directory listing. Groups findings by severity (critical/warning/info).

Co-Authored-By: Claude Opus 4.6 <[email protected]>

@pluginslab pluginslab left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test Results

Merged with all other abilities and ran full suite — 32/33 (97%) in 75s. Both security-scan tests pass:

  • "run a security scan on my site" → security-scan ✓
  • "check for security vulnerabilities" → security-scan ✓

The one failure is a pre-existing flaky test ("what PHP version") unrelated to this PR. LGTM!

@pluginslab
pluginslab merged commit 1f58f65 into dev Mar 20, 2026
@pluginslab
pluginslab deleted the feature/security-scan branch May 27, 2026 23:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants