@the-bearded-bear/claude-craft 9.2.0 → 9.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Dev/i18n/base/Angular/rules/00-project-context.md.template +1 -1
- package/Dev/i18n/base/Angular/rules/03-coding-standards.md +17 -16
- package/Dev/i18n/base/Angular/rules/06-tooling.md +2 -2
- package/Dev/i18n/base/CSharp/rules/06-tooling.md +8 -6
- package/Dev/i18n/base/Common/hooks/scripts/block-dangerous-commands.sh +93 -48
- package/Dev/i18n/base/Common/hooks/scripts/guard-network.sh +58 -0
- package/Dev/i18n/base/Common/hooks/scripts/lib/hook-io.sh +181 -0
- package/Dev/i18n/base/Common/hooks/scripts/notify-slack.sh +21 -32
- package/Dev/i18n/base/Common/hooks/scripts/output-filter.sh +23 -0
- package/Dev/i18n/base/Common/hooks/scripts/output-size-hint.sh +19 -0
- package/Dev/i18n/base/Common/hooks/scripts/post-edit-lint.sh +29 -53
- package/Dev/i18n/base/Common/hooks/scripts/post-tool-failure.sh +50 -0
- package/Dev/i18n/base/Common/hooks/scripts/pre-commit-check.sh +59 -63
- package/Dev/i18n/base/Common/hooks/scripts/pre-compact.sh +52 -0
- package/Dev/i18n/base/Common/hooks/scripts/protect-sensitive-files.sh +16 -0
- package/Dev/i18n/base/Common/hooks/scripts/quality-gate.sh +49 -92
- package/Dev/i18n/base/Common/hooks/scripts/session-end.sh +51 -0
- package/Dev/i18n/base/Common/hooks/scripts/session-init.sh +45 -69
- package/Dev/i18n/base/Common/hooks/templates/examples/README.md +59 -0
- package/Dev/i18n/base/Common/hooks/templates/examples/auto-format.json +18 -0
- package/Dev/i18n/base/Common/hooks/templates/examples/block-dangerous-commands.json +18 -0
- package/Dev/i18n/base/Common/hooks/templates/examples/context-reinject.json +28 -0
- package/Dev/i18n/base/Common/hooks/templates/examples/output-filter.json +18 -0
- package/Dev/i18n/base/Common/hooks/templates/examples/pre-compact.json +18 -0
- package/Dev/i18n/base/Common/hooks/templates/examples/protect-files.json +18 -0
- package/Dev/i18n/base/Common/hooks/templates/examples/security-block.json +18 -0
- package/Dev/i18n/base/Common/hooks/templates/examples/stop-hook.json +16 -0
- package/Dev/i18n/base/Common/hooks/templates/examples/user-prompt-submit.json +16 -0
- package/Dev/i18n/base/Common/hooks/templates/hooks.default.json +72 -0
- package/Dev/i18n/base/Common/hooks/templates/{settings-hooks.json → hooks.full.json} +22 -23
- package/Dev/i18n/base/Common/hooks/templates/hooks.memory.json +62 -0
- package/Dev/i18n/base/Common/templates/AGENTS.md.template +1 -1
- package/Dev/i18n/base/Common/templates/settings.json.template +46 -0
- package/Dev/i18n/base/Flutter/rules/00-project-context.md.template +9 -9
- package/Dev/i18n/base/Laravel/checks/code-quality.md +1 -1
- package/Dev/i18n/base/Laravel/rules/00-project-context.md.template +2 -2
- package/Dev/i18n/base/Laravel/rules/06-tooling.md +10 -8
- package/Dev/i18n/base/Laravel/rules/07-testing-laravel.md +2 -0
- package/Dev/i18n/base/Laravel/rules/08-quality-tools.md +2 -2
- package/Dev/i18n/base/PHP/rules/00-project-context.md.template +2 -2
- package/Dev/i18n/base/Tauri/rules/02-architecture-tauri.md +1 -0
- package/Dev/i18n/base/Vercel/checks/all.md +1 -1
- package/Dev/i18n/base/Vercel/checks/architecture.md +1 -1
- package/Dev/i18n/base/Vercel/rules/02-architecture-vercel.md +4 -2
- package/Dev/i18n/base/Vercel/rules/06-tooling.md +7 -5
- package/Dev/i18n/base/Vercel/rules/11-security-vercel.md +1 -1
- package/Dev/i18n/base/Vite/rules/06-tooling.md +2 -1
- package/Dev/i18n/base/Vite/rules/08-quality-tools.md +1 -1
- package/Dev/i18n/base/VueJS/rules/06-tooling.md +3 -3
- package/Dev/i18n/base/VueJS/rules/07-testing-vuejs.md +9 -8
- package/Dev/i18n/base/VueJS/rules/08-quality-tools.md +1 -1
- package/Dev/i18n/base/WordPress/checklists/new-feature.md +59 -0
- package/Dev/i18n/base/WordPress/checklists/pre-commit.md +125 -0
- package/Dev/i18n/base/WordPress/checks/all.md +257 -0
- package/Dev/i18n/base/WordPress/checks/architecture.md +157 -0
- package/Dev/i18n/base/WordPress/checks/code-quality.md +158 -0
- package/Dev/i18n/base/WordPress/checks/security.md +158 -0
- package/Dev/i18n/base/WordPress/checks/testing.md +157 -0
- package/Dev/i18n/base/WordPress/commands/check.md +28 -0
- package/Dev/i18n/base/WordPress/rules/00-project-context.md.template +169 -0
- package/Dev/i18n/base/WordPress/rules/02-architecture-wordpress.md +174 -0
- package/Dev/i18n/base/WordPress/rules/03-coding-standards.md +98 -0
- package/Dev/i18n/base/WordPress/rules/06-tooling.md +146 -0
- package/Dev/i18n/base/WordPress/rules/07-testing-wordpress.md +150 -0
- package/Dev/i18n/base/WordPress/rules/08-quality-tools.md +161 -0
- package/Dev/i18n/base/WordPress/rules/11-security-wordpress.md +175 -0
- package/Dev/i18n/base/WordPress/skills/woocommerce/REFERENCE.md +214 -0
- package/Dev/i18n/base/WordPress/skills/woocommerce/SKILL.md +40 -0
- package/Dev/i18n/base/WordPress/skills/woocommerce/checklist.md +66 -0
- package/Dev/i18n/base/WordPress/templates/block.md +235 -0
- package/Dev/i18n/base/WordPress/templates/plugin-bootstrap.md +215 -0
- package/Dev/i18n/base/WordPress/templates/rest-endpoint.md +246 -0
- package/Dev/i18n/de/Angular/CLAUDE.md.template +2 -1
- package/Dev/i18n/de/Angular/agents/angular-reviewer.md +23 -7
- package/Dev/i18n/de/Common/agents/devops-engineer.md +1 -1
- package/Dev/i18n/de/Common/agents/migration-specialist.md +1 -1
- package/Dev/i18n/de/Common/commands/ralph-run.md +3 -3
- package/Dev/i18n/de/Common/commands/setup-rtk.md +2 -9
- package/Dev/i18n/de/Common/hooks/HOOKS-QUICKSTART.md +33 -45
- package/Dev/i18n/de/Common/rules/04-solid-principles.md +2 -2
- package/Dev/i18n/de/Common/rules/09-git-workflow.md +7 -1
- package/Dev/i18n/de/Common/rules/10-documentation.md +2 -2
- package/Dev/i18n/de/Common/rules/11-security.md +12 -12
- package/Dev/i18n/de/Common/rules/12-context-management.md +5 -3
- package/Dev/i18n/de/Flutter/commands/analyze-performance.md +1 -1
- package/Dev/i18n/de/Flutter/rules/06-tooling.md +6 -2
- package/Dev/i18n/de/Flutter/rules/11-security-flutter.md +1 -1
- package/Dev/i18n/de/PHP/rules/03-coding-standards.md +10 -0
- package/Dev/i18n/de/PHP/rules/06-tooling.md +7 -3
- package/Dev/i18n/de/Paperclip/CLAUDE.md.template +2 -2
- package/Dev/i18n/de/Paperclip/README.md +1 -1
- package/Dev/i18n/de/Paperclip/checks/security.md +1 -0
- package/Dev/i18n/de/Paperclip/rules/11-security-paperclip.md +3 -1
- package/Dev/i18n/de/Python/agents/python-reviewer.md +1 -1
- package/Dev/i18n/de/Python/checks/code-quality.md +4 -4
- package/Dev/i18n/de/Python/checks/security.md +2 -2
- package/Dev/i18n/de/Python/checks/testing.md +2 -2
- package/Dev/i18n/de/Python/rules/02-architecture.md +1 -8
- package/Dev/i18n/de/Python/rules/03-coding-standards.md +16 -5
- package/Dev/i18n/de/Python/templates/repository.md +2 -2
- package/Dev/i18n/de/React/rules/02-architecture.md +17 -20
- package/Dev/i18n/de/React/rules/03-coding-standards.md +15 -16
- package/Dev/i18n/de/React/templates/component.md +11 -9
- package/Dev/i18n/de/ReactNative/agents/reactnative-reviewer.md +4 -4
- package/Dev/i18n/de/ReactNative/rules/06-tooling.md +15 -14
- package/Dev/i18n/de/ReactNative/rules/14-navigation.md +2 -0
- package/Dev/i18n/de/Ruby/agents/ruby-reviewer.md +1 -1
- package/Dev/i18n/de/Ruby/rules/06-tooling.md +2 -2
- package/Dev/i18n/de/Ruby/rules/11-security-ruby.md +13 -1
- package/Dev/i18n/de/Rust/rules/03-coding-standards.md +1 -1
- package/Dev/i18n/de/Rust/rules/11-security-rust.md +1 -1
- package/Dev/i18n/de/Symfony/adr/README.md +1 -1
- package/Dev/i18n/de/Symfony/checks/code-quality.md +2 -2
- package/Dev/i18n/de/Symfony/rules/03-coding-standards.md +15 -0
- package/Dev/i18n/de/Symfony/rules/06-docker-hadolint.md +1 -1
- package/Dev/i18n/de/Symfony/rules/08-quality-tools.md +1 -3
- package/Dev/i18n/de/Symfony/rules/15-doctrine-extensions.md +5 -5
- package/Dev/i18n/de/Symfony/rules/16-i18n.md +1 -1
- package/Dev/i18n/de/Symfony/templates/README.md +1 -1
- package/Dev/i18n/de/Tauri/agents/tauri-reviewer.md +3 -0
- package/Dev/i18n/de/Vercel/agents/vercel-reviewer.md +1 -0
- package/Dev/i18n/de/Vercel/checks/all.md +1 -1
- package/Dev/i18n/de/Vite/agents/vite-reviewer.md +11 -11
- package/Dev/i18n/de/WordPress/CLAUDE.md.template +100 -0
- package/Dev/i18n/de/WordPress/agents/wordpress-reviewer.md +350 -0
- package/Dev/i18n/de/WordPress/checks/all.md +242 -0
- package/Dev/i18n/de/WordPress/commands/check.md +28 -0
- package/Dev/i18n/en/Angular/CLAUDE.md.template +3 -2
- package/Dev/i18n/en/Angular/agents/angular-reviewer.md +23 -7
- package/Dev/i18n/en/Common/agents/devops-engineer.md +1 -1
- package/Dev/i18n/en/Common/agents/migration-specialist.md +1 -1
- package/Dev/i18n/en/Common/commands/ralph-run.md +3 -3
- package/Dev/i18n/en/Common/commands/setup-rtk.md +2 -9
- package/Dev/i18n/en/Common/hooks/HOOKS-QUICKSTART.md +31 -43
- package/Dev/i18n/en/Common/rules/04-solid-principles.md +2 -2
- package/Dev/i18n/en/Common/rules/09-git-workflow.md +7 -1
- package/Dev/i18n/en/Common/rules/10-documentation.md +2 -2
- package/Dev/i18n/en/Common/rules/11-security.md +12 -12
- package/Dev/i18n/en/Common/rules/12-context-management.md +5 -3
- package/Dev/i18n/en/Flutter/commands/analyze-performance.md +1 -1
- package/Dev/i18n/en/Flutter/rules/06-tooling.md +6 -2
- package/Dev/i18n/en/Flutter/rules/11-security-flutter.md +1 -1
- package/Dev/i18n/en/Laravel/CLAUDE.md.template +1 -1
- package/Dev/i18n/en/Laravel/agents/laravel-reviewer.md +3 -3
- package/Dev/i18n/en/PHP/rules/03-coding-standards.md +10 -0
- package/Dev/i18n/en/PHP/rules/06-tooling.md +7 -3
- package/Dev/i18n/en/Paperclip/CLAUDE.md.template +2 -2
- package/Dev/i18n/en/Paperclip/README.md +1 -1
- package/Dev/i18n/en/Paperclip/checks/security.md +1 -0
- package/Dev/i18n/en/Paperclip/rules/11-security-paperclip.md +3 -1
- package/Dev/i18n/en/Python/agents/python-reviewer.md +1 -1
- package/Dev/i18n/en/Python/checks/code-quality.md +4 -4
- package/Dev/i18n/en/Python/checks/security.md +2 -2
- package/Dev/i18n/en/Python/checks/testing.md +2 -2
- package/Dev/i18n/en/Python/rules/02-architecture.md +1 -8
- package/Dev/i18n/en/Python/rules/03-coding-standards.md +16 -5
- package/Dev/i18n/en/Python/templates/repository.md +2 -2
- package/Dev/i18n/en/React/rules/02-architecture.md +17 -20
- package/Dev/i18n/en/React/rules/03-coding-standards.md +15 -16
- package/Dev/i18n/en/React/templates/component.md +11 -9
- package/Dev/i18n/en/ReactNative/agents/reactnative-reviewer.md +4 -4
- package/Dev/i18n/en/ReactNative/rules/02-architecture.md +4 -4
- package/Dev/i18n/en/ReactNative/rules/06-tooling.md +15 -14
- package/Dev/i18n/en/ReactNative/rules/07-testing-reactnative.md +1 -1
- package/Dev/i18n/en/ReactNative/rules/14-navigation.md +2 -0
- package/Dev/i18n/en/Ruby/agents/ruby-reviewer.md +1 -1
- package/Dev/i18n/en/Ruby/rules/06-tooling.md +2 -2
- package/Dev/i18n/en/Ruby/rules/11-security-ruby.md +13 -1
- package/Dev/i18n/en/Rust/rules/03-coding-standards.md +1 -1
- package/Dev/i18n/en/Rust/rules/11-security-rust.md +1 -1
- package/Dev/i18n/en/Symfony/adr/README.md +1 -1
- package/Dev/i18n/en/Symfony/checks/code-quality.md +2 -2
- package/Dev/i18n/en/Symfony/rules/03-coding-standards.md +15 -0
- package/Dev/i18n/en/Symfony/rules/06-docker-hadolint.md +1 -1
- package/Dev/i18n/en/Symfony/rules/08-quality-tools.md +1 -3
- package/Dev/i18n/en/Symfony/rules/15-doctrine-extensions.md +5 -5
- package/Dev/i18n/en/Symfony/rules/16-i18n.md +1 -1
- package/Dev/i18n/en/Symfony/templates/README.md +1 -1
- package/Dev/i18n/en/Tauri/agents/tauri-reviewer.md +3 -0
- package/Dev/i18n/en/Vercel/agents/vercel-reviewer.md +1 -0
- package/Dev/i18n/en/Vercel/checks/all.md +1 -1
- package/Dev/i18n/en/Vite/agents/vite-reviewer.md +11 -11
- package/Dev/i18n/en/WordPress/CLAUDE.md.template +100 -0
- package/Dev/i18n/en/WordPress/agents/wordpress-reviewer.md +350 -0
- package/Dev/i18n/en/WordPress/checks/all.md +241 -0
- package/Dev/i18n/en/WordPress/commands/check.md +28 -0
- package/Dev/i18n/es/Angular/CLAUDE.md.template +3 -2
- package/Dev/i18n/es/Angular/agents/angular-reviewer.md +23 -7
- package/Dev/i18n/es/Common/agents/devops-engineer.md +1 -1
- package/Dev/i18n/es/Common/agents/migration-specialist.md +1 -1
- package/Dev/i18n/es/Common/commands/ralph-run.md +3 -3
- package/Dev/i18n/es/Common/commands/setup-rtk.md +2 -9
- package/Dev/i18n/es/Common/hooks/HOOKS-QUICKSTART.md +33 -45
- package/Dev/i18n/es/Common/rules/04-solid-principles.md +2 -2
- package/Dev/i18n/es/Common/rules/09-git-workflow.md +7 -1
- package/Dev/i18n/es/Common/rules/10-documentation.md +2 -2
- package/Dev/i18n/es/Common/rules/11-security.md +12 -12
- package/Dev/i18n/es/Common/rules/12-context-management.md +5 -3
- package/Dev/i18n/es/Flutter/commands/analyze-performance.md +1 -1
- package/Dev/i18n/es/Flutter/rules/06-tooling.md +6 -2
- package/Dev/i18n/es/Flutter/rules/11-security-flutter.md +1 -1
- package/Dev/i18n/es/Laravel/agents/laravel-reviewer.md +2 -2
- package/Dev/i18n/es/PHP/rules/03-coding-standards.md +10 -0
- package/Dev/i18n/es/PHP/rules/06-tooling.md +7 -3
- package/Dev/i18n/es/Paperclip/CLAUDE.md.template +2 -2
- package/Dev/i18n/es/Paperclip/README.md +1 -1
- package/Dev/i18n/es/Paperclip/checks/security.md +1 -0
- package/Dev/i18n/es/Paperclip/rules/11-security-paperclip.md +3 -1
- package/Dev/i18n/es/Python/agents/python-reviewer.md +1 -1
- package/Dev/i18n/es/Python/checks/code-quality.md +4 -4
- package/Dev/i18n/es/Python/checks/security.md +2 -2
- package/Dev/i18n/es/Python/checks/testing.md +2 -2
- package/Dev/i18n/es/Python/rules/02-architecture.md +1 -8
- package/Dev/i18n/es/Python/rules/03-coding-standards.md +16 -5
- package/Dev/i18n/es/Python/templates/repository.md +2 -2
- package/Dev/i18n/es/React/rules/03-coding-standards.md +15 -16
- package/Dev/i18n/es/React/templates/component.md +11 -9
- package/Dev/i18n/es/ReactNative/agents/reactnative-reviewer.md +4 -4
- package/Dev/i18n/es/ReactNative/rules/06-tooling.md +15 -14
- package/Dev/i18n/es/ReactNative/rules/14-navigation.md +2 -0
- package/Dev/i18n/es/Ruby/agents/ruby-reviewer.md +1 -1
- package/Dev/i18n/es/Ruby/rules/06-tooling.md +2 -2
- package/Dev/i18n/es/Ruby/rules/11-security-ruby.md +13 -1
- package/Dev/i18n/es/Rust/rules/03-coding-standards.md +1 -1
- package/Dev/i18n/es/Rust/rules/11-security-rust.md +1 -1
- package/Dev/i18n/es/Symfony/adr/README.md +1 -1
- package/Dev/i18n/es/Symfony/checks/code-quality.md +2 -2
- package/Dev/i18n/es/Symfony/rules/03-coding-standards.md +15 -0
- package/Dev/i18n/es/Symfony/rules/06-docker-hadolint.md +1 -1
- package/Dev/i18n/es/Symfony/rules/08-quality-tools.md +1 -3
- package/Dev/i18n/es/Symfony/rules/15-doctrine-extensions.md +5 -5
- package/Dev/i18n/es/Symfony/rules/16-i18n.md +1 -1
- package/Dev/i18n/es/Symfony/templates/README.md +1 -1
- package/Dev/i18n/es/Tauri/agents/tauri-reviewer.md +3 -0
- package/Dev/i18n/es/Vercel/agents/vercel-reviewer.md +2 -1
- package/Dev/i18n/es/Vercel/checks/all.md +1 -1
- package/Dev/i18n/es/Vite/agents/vite-reviewer.md +11 -11
- package/Dev/i18n/es/WordPress/CLAUDE.md.template +100 -0
- package/Dev/i18n/es/WordPress/agents/wordpress-reviewer.md +350 -0
- package/Dev/i18n/es/WordPress/checks/all.md +241 -0
- package/Dev/i18n/es/WordPress/commands/check.md +28 -0
- package/Dev/i18n/fr/Angular/CLAUDE.md.template +3 -2
- package/Dev/i18n/fr/Angular/agents/angular-reviewer.md +23 -7
- package/Dev/i18n/fr/Common/agents/devops-engineer.md +1 -1
- package/Dev/i18n/fr/Common/agents/migration-specialist.md +1 -1
- package/Dev/i18n/fr/Common/commands/ralph-run.md +3 -3
- package/Dev/i18n/fr/Common/commands/setup-rtk.md +2 -9
- package/Dev/i18n/fr/Common/hooks/HOOKS-QUICKSTART.md +32 -44
- package/Dev/i18n/fr/Common/rules/04-solid-principles.md +2 -2
- package/Dev/i18n/fr/Common/rules/09-git-workflow.md +7 -1
- package/Dev/i18n/fr/Common/rules/10-documentation.md +2 -2
- package/Dev/i18n/fr/Common/rules/11-security.md +12 -12
- package/Dev/i18n/fr/Common/rules/12-context-management.md +5 -3
- package/Dev/i18n/fr/Flutter/commands/analyze-performance.md +1 -1
- package/Dev/i18n/fr/Flutter/rules/02-architecture.md +4 -4
- package/Dev/i18n/fr/Flutter/rules/06-tooling.md +6 -2
- package/Dev/i18n/fr/Flutter/rules/11-security-flutter.md +1 -1
- package/Dev/i18n/fr/Laravel/CLAUDE.md.template +1 -1
- package/Dev/i18n/fr/Laravel/agents/laravel-reviewer.md +3 -3
- package/Dev/i18n/fr/PHP/rules/03-coding-standards.md +10 -0
- package/Dev/i18n/fr/PHP/rules/06-tooling.md +7 -3
- package/Dev/i18n/fr/Paperclip/CLAUDE.md.template +2 -2
- package/Dev/i18n/fr/Paperclip/README.md +1 -1
- package/Dev/i18n/fr/Paperclip/checks/security.md +1 -0
- package/Dev/i18n/fr/Paperclip/rules/11-security-paperclip.md +3 -1
- package/Dev/i18n/fr/Python/agents/python-reviewer.md +1 -1
- package/Dev/i18n/fr/Python/checks/code-quality.md +4 -4
- package/Dev/i18n/fr/Python/checks/security.md +2 -2
- package/Dev/i18n/fr/Python/checks/testing.md +2 -2
- package/Dev/i18n/fr/Python/commands/dependency-audit.md +1 -2
- package/Dev/i18n/fr/Python/commands/generate-endpoint.md +7 -11
- package/Dev/i18n/fr/Python/commands/generate-model.md +6 -6
- package/Dev/i18n/fr/Python/rules/02-architecture.md +9 -24
- package/Dev/i18n/fr/Python/rules/03-coding-standards.md +19 -7
- package/Dev/i18n/fr/Python/templates/repository.md +9 -10
- package/Dev/i18n/fr/React/commands/generate-component.md +52 -51
- package/Dev/i18n/fr/React/rules/02-architecture.md +17 -20
- package/Dev/i18n/fr/React/rules/03-coding-standards.md +15 -16
- package/Dev/i18n/fr/React/templates/component.md +11 -9
- package/Dev/i18n/fr/ReactNative/agents/reactnative-reviewer.md +4 -4
- package/Dev/i18n/fr/ReactNative/rules/06-tooling.md +15 -14
- package/Dev/i18n/fr/ReactNative/rules/14-navigation.md +2 -0
- package/Dev/i18n/fr/Ruby/agents/ruby-reviewer.md +1 -1
- package/Dev/i18n/fr/Ruby/rules/06-tooling.md +2 -2
- package/Dev/i18n/fr/Ruby/rules/11-security-ruby.md +13 -1
- package/Dev/i18n/fr/Rust/rules/03-coding-standards.md +1 -1
- package/Dev/i18n/fr/Rust/rules/11-security-rust.md +1 -1
- package/Dev/i18n/fr/Symfony/adr/README.md +1 -1
- package/Dev/i18n/fr/Symfony/checks/code-quality.md +2 -2
- package/Dev/i18n/fr/Symfony/rules/03-coding-standards.md +15 -0
- package/Dev/i18n/fr/Symfony/rules/06-docker-hadolint.md +1 -1
- package/Dev/i18n/fr/Symfony/rules/08-quality-tools.md +1 -3
- package/Dev/i18n/fr/Symfony/rules/15-doctrine-extensions.md +5 -5
- package/Dev/i18n/fr/Symfony/rules/16-i18n.md +1 -1
- package/Dev/i18n/fr/Symfony/templates/README.md +1 -1
- package/Dev/i18n/fr/Tauri/agents/tauri-reviewer.md +3 -0
- package/Dev/i18n/fr/Vercel/agents/vercel-reviewer.md +1 -0
- package/Dev/i18n/fr/Vercel/checks/all.md +1 -1
- package/Dev/i18n/fr/Vite/agents/vite-reviewer.md +11 -11
- package/Dev/i18n/fr/WordPress/CLAUDE.md.template +100 -0
- package/Dev/i18n/fr/WordPress/agents/wordpress-reviewer.md +350 -0
- package/Dev/i18n/fr/WordPress/checks/all.md +242 -0
- package/Dev/i18n/fr/WordPress/commands/check.md +28 -0
- package/Dev/i18n/pt/Angular/CLAUDE.md.template +3 -2
- package/Dev/i18n/pt/Angular/agents/angular-reviewer.md +23 -7
- package/Dev/i18n/pt/Common/agents/devops-engineer.md +1 -1
- package/Dev/i18n/pt/Common/agents/migration-specialist.md +1 -1
- package/Dev/i18n/pt/Common/commands/ralph-run.md +3 -3
- package/Dev/i18n/pt/Common/commands/setup-rtk.md +2 -9
- package/Dev/i18n/pt/Common/hooks/HOOKS-QUICKSTART.md +33 -45
- package/Dev/i18n/pt/Common/rules/04-solid-principles.md +2 -2
- package/Dev/i18n/pt/Common/rules/09-git-workflow.md +7 -1
- package/Dev/i18n/pt/Common/rules/10-documentation.md +2 -2
- package/Dev/i18n/pt/Common/rules/11-security.md +12 -12
- package/Dev/i18n/pt/Common/rules/12-context-management.md +5 -3
- package/Dev/i18n/pt/Flutter/commands/analyze-performance.md +1 -1
- package/Dev/i18n/pt/Flutter/rules/06-tooling.md +6 -2
- package/Dev/i18n/pt/Flutter/rules/11-security-flutter.md +1 -1
- package/Dev/i18n/pt/Laravel/agents/laravel-reviewer.md +2 -2
- package/Dev/i18n/pt/PHP/rules/03-coding-standards.md +10 -0
- package/Dev/i18n/pt/PHP/rules/06-tooling.md +7 -3
- package/Dev/i18n/pt/Paperclip/CLAUDE.md.template +2 -2
- package/Dev/i18n/pt/Paperclip/README.md +1 -1
- package/Dev/i18n/pt/Paperclip/checks/security.md +1 -0
- package/Dev/i18n/pt/Paperclip/rules/11-security-paperclip.md +3 -1
- package/Dev/i18n/pt/Python/agents/python-reviewer.md +1 -1
- package/Dev/i18n/pt/Python/checks/code-quality.md +4 -4
- package/Dev/i18n/pt/Python/checks/security.md +2 -2
- package/Dev/i18n/pt/Python/checks/testing.md +2 -2
- package/Dev/i18n/pt/Python/rules/02-architecture.md +1 -8
- package/Dev/i18n/pt/Python/rules/03-coding-standards.md +16 -5
- package/Dev/i18n/pt/Python/templates/repository.md +2 -2
- package/Dev/i18n/pt/React/rules/02-architecture.md +17 -20
- package/Dev/i18n/pt/React/rules/03-coding-standards.md +15 -16
- package/Dev/i18n/pt/React/templates/component.md +12 -10
- package/Dev/i18n/pt/ReactNative/agents/reactnative-reviewer.md +4 -4
- package/Dev/i18n/pt/ReactNative/rules/06-tooling.md +15 -14
- package/Dev/i18n/pt/ReactNative/rules/14-navigation.md +2 -0
- package/Dev/i18n/pt/Ruby/agents/ruby-reviewer.md +1 -1
- package/Dev/i18n/pt/Ruby/rules/06-tooling.md +2 -2
- package/Dev/i18n/pt/Ruby/rules/11-security-ruby.md +13 -1
- package/Dev/i18n/pt/Rust/rules/03-coding-standards.md +1 -1
- package/Dev/i18n/pt/Rust/rules/11-security-rust.md +1 -1
- package/Dev/i18n/pt/Symfony/adr/README.md +1 -1
- package/Dev/i18n/pt/Symfony/checks/code-quality.md +2 -2
- package/Dev/i18n/pt/Symfony/rules/03-coding-standards.md +15 -0
- package/Dev/i18n/pt/Symfony/rules/06-docker-hadolint.md +1 -1
- package/Dev/i18n/pt/Symfony/rules/08-quality-tools.md +1 -3
- package/Dev/i18n/pt/Symfony/rules/15-doctrine-extensions.md +5 -5
- package/Dev/i18n/pt/Symfony/rules/16-i18n.md +1 -1
- package/Dev/i18n/pt/Symfony/templates/README.md +1 -1
- package/Dev/i18n/pt/Tauri/agents/tauri-reviewer.md +3 -0
- package/Dev/i18n/pt/Vercel/agents/vercel-reviewer.md +1 -0
- package/Dev/i18n/pt/Vercel/checks/all.md +1 -1
- package/Dev/i18n/pt/Vite/agents/vite-reviewer.md +11 -11
- package/Dev/i18n/pt/WordPress/CLAUDE.md.template +100 -0
- package/Dev/i18n/pt/WordPress/agents/wordpress-reviewer.md +350 -0
- package/Dev/i18n/pt/WordPress/checks/all.md +241 -0
- package/Dev/i18n/pt/WordPress/commands/check.md +28 -0
- package/Dev/scripts/check-config.sh +1 -1
- package/Dev/scripts/install-common-rules.sh +65 -0
- package/Dev/scripts/install-from-config.sh +3 -0
- package/Dev/scripts/install-paperclip-rules.sh +1 -1
- package/Dev/scripts/install-wordpress-rules.sh +153 -0
- package/Dev/scripts/lib/merge-hooks.mjs +110 -0
- package/Dev/scripts/memory-lifecycle/README.md +10 -9
- package/Dev/scripts/memory-lifecycle/_db.sh +1 -1
- package/Dev/scripts/memory-lifecycle/post-tool.sh +1 -1
- package/Dev/scripts/memory-lifecycle/pre-compact.sh +5 -5
- package/Dev/scripts/memory-lifecycle/prompt-submit.sh +1 -1
- package/Dev/scripts/memory-lifecycle/session-end.sh +1 -1
- package/Dev/scripts/memory-lifecycle/session-start.sh +5 -4
- package/Dev/stack-profiles/wordpress/permissions.txt +10 -0
- package/Dev/stack-profiles/wordpress/quality.md +4 -0
- package/Dev/stack-profiles/wordpress/stack.txt +2 -0
- package/Infra/i18n/de/Ansible/agents/ansible-architect.md +3 -1
- package/Infra/i18n/de/Ansible/agents/ansible-debug.md +1 -0
- package/Infra/i18n/de/Ansible/agents/ansible-deployment.md +3 -0
- package/Infra/i18n/de/Ansible/agents/ansible-security.md +2 -0
- package/Infra/i18n/de/Ansible/commands/security-audit.md +1 -1
- package/Infra/i18n/de/Coolify/agents/coolify-debug.md +1 -0
- package/Infra/i18n/de/Coolify/agents/coolify-deployment.md +5 -1
- package/Infra/i18n/de/Coolify/commands/coolify-debug.md +1 -0
- package/Infra/i18n/de/Coolify/commands/coolify-deploy.md +1 -0
- package/Infra/i18n/de/FrankenPHP/agents/frankenphp-architect.md +4 -2
- package/Infra/i18n/de/FrankenPHP/agents/frankenphp-deployment.md +2 -2
- package/Infra/i18n/de/FrankenPHP/agents/frankenphp-security.md +1 -1
- package/Infra/i18n/de/FrankenPHP/commands/deploy-setup.md +1 -1
- package/Infra/i18n/de/Hcloud/agents/hcloud-architect.md +16 -14
- package/Infra/i18n/de/Hcloud/agents/hcloud-cost.md +11 -9
- package/Infra/i18n/de/Hcloud/agents/hcloud-deployment.md +1 -1
- package/Infra/i18n/de/Hcloud/agents/hcloud-security.md +1 -1
- package/Infra/i18n/de/Hcloud/commands/architecture.md +2 -2
- package/Infra/i18n/de/Hcloud/commands/debug.md +3 -3
- package/Infra/i18n/de/Kubernetes/agents/kubernetes-architect.md +4 -0
- package/Infra/i18n/de/Kubernetes/agents/kubernetes-deployment.md +31 -0
- package/Infra/i18n/de/Kubernetes/agents/kubernetes-security.md +5 -1
- package/Infra/i18n/de/OpenTofu/agents/opentofu-architect.md +3 -1
- package/Infra/i18n/de/OpenTofu/agents/opentofu-deployment.md +2 -2
- package/Infra/i18n/de/OpenTofu/agents/opentofu-security.md +5 -5
- package/Infra/i18n/de/OpenTofu/commands/security-audit.md +1 -1
- package/Infra/i18n/de/PgBouncer/agents/pgbouncer-architect.md +1 -0
- package/Infra/i18n/de/PgBouncer/agents/pgbouncer-deployment.md +3 -3
- package/Infra/i18n/de/PgBouncer/agents/pgbouncer-monitoring.md +1 -1
- package/Infra/i18n/de/PgBouncer/commands/deploy-setup.md +1 -1
- package/Infra/i18n/en/Ansible/agents/ansible-architect.md +3 -1
- package/Infra/i18n/en/Ansible/agents/ansible-debug.md +1 -0
- package/Infra/i18n/en/Ansible/agents/ansible-deployment.md +3 -0
- package/Infra/i18n/en/Ansible/agents/ansible-security.md +2 -0
- package/Infra/i18n/en/Ansible/commands/security-audit.md +1 -1
- package/Infra/i18n/en/Coolify/agents/coolify-debug.md +1 -0
- package/Infra/i18n/en/Coolify/agents/coolify-deployment.md +5 -1
- package/Infra/i18n/en/Coolify/commands/coolify-debug.md +1 -0
- package/Infra/i18n/en/Coolify/commands/coolify-deploy.md +1 -0
- package/Infra/i18n/en/FrankenPHP/agents/frankenphp-architect.md +4 -2
- package/Infra/i18n/en/FrankenPHP/agents/frankenphp-deployment.md +2 -2
- package/Infra/i18n/en/FrankenPHP/agents/frankenphp-security.md +1 -1
- package/Infra/i18n/en/FrankenPHP/commands/deploy-setup.md +1 -1
- package/Infra/i18n/en/Hcloud/agents/hcloud-architect.md +10 -8
- package/Infra/i18n/en/Hcloud/agents/hcloud-cost.md +11 -9
- package/Infra/i18n/en/Hcloud/agents/hcloud-deployment.md +1 -1
- package/Infra/i18n/en/Kubernetes/agents/kubernetes-architect.md +4 -0
- package/Infra/i18n/en/Kubernetes/agents/kubernetes-deployment.md +31 -0
- package/Infra/i18n/en/Kubernetes/agents/kubernetes-security.md +5 -1
- package/Infra/i18n/en/OpenTofu/agents/opentofu-architect.md +3 -1
- package/Infra/i18n/en/OpenTofu/agents/opentofu-deployment.md +2 -2
- package/Infra/i18n/en/OpenTofu/agents/opentofu-security.md +5 -5
- package/Infra/i18n/en/OpenTofu/commands/security-audit.md +1 -1
- package/Infra/i18n/en/PgBouncer/agents/pgbouncer-architect.md +1 -0
- package/Infra/i18n/en/PgBouncer/agents/pgbouncer-deployment.md +3 -3
- package/Infra/i18n/en/PgBouncer/agents/pgbouncer-monitoring.md +1 -1
- package/Infra/i18n/en/PgBouncer/commands/deploy-setup.md +1 -1
- package/Infra/i18n/es/Ansible/agents/ansible-architect.md +3 -1
- package/Infra/i18n/es/Ansible/agents/ansible-debug.md +1 -0
- package/Infra/i18n/es/Ansible/agents/ansible-deployment.md +3 -0
- package/Infra/i18n/es/Ansible/agents/ansible-security.md +2 -0
- package/Infra/i18n/es/Ansible/commands/security-audit.md +1 -1
- package/Infra/i18n/es/Coolify/agents/coolify-debug.md +1 -0
- package/Infra/i18n/es/Coolify/agents/coolify-deployment.md +5 -1
- package/Infra/i18n/es/Coolify/commands/coolify-debug.md +1 -0
- package/Infra/i18n/es/Coolify/commands/coolify-deploy.md +1 -0
- package/Infra/i18n/es/FrankenPHP/agents/frankenphp-architect.md +4 -2
- package/Infra/i18n/es/FrankenPHP/agents/frankenphp-deployment.md +2 -2
- package/Infra/i18n/es/FrankenPHP/agents/frankenphp-security.md +1 -1
- package/Infra/i18n/es/FrankenPHP/commands/deploy-setup.md +1 -1
- package/Infra/i18n/es/Hcloud/agents/hcloud-architect.md +11 -9
- package/Infra/i18n/es/Hcloud/agents/hcloud-cost.md +11 -9
- package/Infra/i18n/es/Hcloud/agents/hcloud-deployment.md +1 -1
- package/Infra/i18n/es/Hcloud/commands/debug.md +1 -1
- package/Infra/i18n/es/Kubernetes/agents/kubernetes-architect.md +4 -0
- package/Infra/i18n/es/Kubernetes/agents/kubernetes-deployment.md +31 -0
- package/Infra/i18n/es/Kubernetes/agents/kubernetes-security.md +5 -1
- package/Infra/i18n/es/OpenTofu/agents/opentofu-architect.md +3 -1
- package/Infra/i18n/es/OpenTofu/agents/opentofu-deployment.md +2 -2
- package/Infra/i18n/es/OpenTofu/agents/opentofu-security.md +5 -5
- package/Infra/i18n/es/OpenTofu/commands/security-audit.md +1 -1
- package/Infra/i18n/es/PgBouncer/agents/pgbouncer-architect.md +1 -0
- package/Infra/i18n/es/PgBouncer/agents/pgbouncer-deployment.md +3 -3
- package/Infra/i18n/es/PgBouncer/agents/pgbouncer-monitoring.md +1 -1
- package/Infra/i18n/es/PgBouncer/commands/deploy-setup.md +1 -1
- package/Infra/i18n/fr/Ansible/agents/ansible-architect.md +3 -1
- package/Infra/i18n/fr/Ansible/agents/ansible-debug.md +1 -0
- package/Infra/i18n/fr/Ansible/agents/ansible-deployment.md +3 -0
- package/Infra/i18n/fr/Ansible/agents/ansible-security.md +2 -0
- package/Infra/i18n/fr/Ansible/commands/security-audit.md +1 -1
- package/Infra/i18n/fr/Coolify/agents/coolify-debug.md +1 -0
- package/Infra/i18n/fr/Coolify/agents/coolify-deployment.md +5 -1
- package/Infra/i18n/fr/Coolify/commands/coolify-debug.md +1 -0
- package/Infra/i18n/fr/Coolify/commands/coolify-deploy.md +1 -0
- package/Infra/i18n/fr/FrankenPHP/agents/frankenphp-architect.md +4 -2
- package/Infra/i18n/fr/FrankenPHP/agents/frankenphp-deployment.md +2 -2
- package/Infra/i18n/fr/FrankenPHP/agents/frankenphp-security.md +1 -1
- package/Infra/i18n/fr/FrankenPHP/commands/deploy-setup.md +1 -1
- package/Infra/i18n/fr/Hcloud/agents/hcloud-architect.md +7 -5
- package/Infra/i18n/fr/Hcloud/agents/hcloud-cost.md +11 -9
- package/Infra/i18n/fr/Hcloud/agents/hcloud-deployment.md +1 -1
- package/Infra/i18n/fr/Kubernetes/agents/kubernetes-architect.md +4 -0
- package/Infra/i18n/fr/Kubernetes/agents/kubernetes-deployment.md +31 -0
- package/Infra/i18n/fr/Kubernetes/agents/kubernetes-security.md +5 -1
- package/Infra/i18n/fr/OpenTofu/agents/opentofu-architect.md +3 -1
- package/Infra/i18n/fr/OpenTofu/agents/opentofu-deployment.md +2 -2
- package/Infra/i18n/fr/OpenTofu/agents/opentofu-security.md +5 -5
- package/Infra/i18n/fr/OpenTofu/commands/security-audit.md +1 -1
- package/Infra/i18n/fr/PgBouncer/agents/pgbouncer-architect.md +1 -0
- package/Infra/i18n/fr/PgBouncer/agents/pgbouncer-deployment.md +3 -3
- package/Infra/i18n/fr/PgBouncer/agents/pgbouncer-monitoring.md +1 -1
- package/Infra/i18n/fr/PgBouncer/commands/deploy-setup.md +1 -1
- package/Infra/i18n/pt/Ansible/agents/ansible-architect.md +3 -1
- package/Infra/i18n/pt/Ansible/agents/ansible-debug.md +1 -0
- package/Infra/i18n/pt/Ansible/agents/ansible-deployment.md +3 -0
- package/Infra/i18n/pt/Ansible/agents/ansible-security.md +2 -0
- package/Infra/i18n/pt/Ansible/commands/security-audit.md +1 -1
- package/Infra/i18n/pt/Coolify/agents/coolify-debug.md +1 -0
- package/Infra/i18n/pt/Coolify/agents/coolify-deployment.md +5 -1
- package/Infra/i18n/pt/Coolify/commands/coolify-debug.md +1 -0
- package/Infra/i18n/pt/Coolify/commands/coolify-deploy.md +1 -0
- package/Infra/i18n/pt/FrankenPHP/agents/frankenphp-architect.md +4 -2
- package/Infra/i18n/pt/FrankenPHP/agents/frankenphp-deployment.md +2 -2
- package/Infra/i18n/pt/FrankenPHP/agents/frankenphp-security.md +1 -1
- package/Infra/i18n/pt/FrankenPHP/commands/deploy-setup.md +1 -1
- package/Infra/i18n/pt/Hcloud/agents/hcloud-architect.md +9 -7
- package/Infra/i18n/pt/Hcloud/agents/hcloud-cost.md +11 -9
- package/Infra/i18n/pt/Hcloud/agents/hcloud-deployment.md +1 -1
- package/Infra/i18n/pt/Hcloud/commands/architecture.md +1 -1
- package/Infra/i18n/pt/Hcloud/commands/debug.md +1 -1
- package/Infra/i18n/pt/Kubernetes/agents/kubernetes-architect.md +4 -0
- package/Infra/i18n/pt/Kubernetes/agents/kubernetes-deployment.md +31 -0
- package/Infra/i18n/pt/Kubernetes/agents/kubernetes-security.md +5 -1
- package/Infra/i18n/pt/OpenTofu/agents/opentofu-architect.md +3 -1
- package/Infra/i18n/pt/OpenTofu/agents/opentofu-deployment.md +2 -2
- package/Infra/i18n/pt/OpenTofu/agents/opentofu-security.md +5 -5
- package/Infra/i18n/pt/OpenTofu/commands/security-audit.md +1 -1
- package/Infra/i18n/pt/PgBouncer/agents/pgbouncer-architect.md +1 -0
- package/Infra/i18n/pt/PgBouncer/agents/pgbouncer-deployment.md +3 -3
- package/Infra/i18n/pt/PgBouncer/agents/pgbouncer-monitoring.md +1 -1
- package/Infra/i18n/pt/PgBouncer/commands/deploy-setup.md +1 -1
- package/README.md +27 -15
- package/Tools/PluginExport/export-plugin.sh +15 -17
- package/Tools/Ralph/README.md +17 -7
- package/Tools/Ralph/hooks/lib/ralph-common.sh +101 -0
- package/Tools/Ralph/hooks/pre-tool-context.sh +28 -0
- package/Tools/Ralph/hooks/session-restore.sh +94 -0
- package/Tools/Ralph/hooks/stop-dod-gate.sh +60 -0
- package/Tools/Ralph/lib/hooks-generator.sh +109 -93
- package/bundles/cursor/.cursorrules +11 -10
- package/bundles/windsurf/.windsurfrules +11 -10
- package/cli/index.js +1 -0
- package/cli/lib/doctor.js +4 -3
- package/cli/lib/help.js +1 -0
- package/cli/lib/installer.js +1 -1
- package/cli/lib/parse-args.js +12 -0
- package/cli/lib/tech-registry.js +15 -5
- package/package.json +2 -1
- package/Dev/i18n/de/Common/hooks/scripts/post-tool-failure.sh +0 -89
- package/Dev/i18n/de/Common/hooks/scripts/pre-compact.sh +0 -53
- package/Dev/i18n/de/Common/hooks/scripts/session-end.sh +0 -98
- package/Dev/i18n/de/Common/templates/settings.json.template +0 -128
- package/Dev/i18n/en/Common/hooks/scripts/post-tool-failure.sh +0 -89
- package/Dev/i18n/en/Common/hooks/scripts/pre-compact.sh +0 -53
- package/Dev/i18n/en/Common/hooks/scripts/session-end.sh +0 -98
- package/Dev/i18n/en/Common/templates/settings.json.template +0 -128
- package/Dev/i18n/es/Common/hooks/scripts/post-tool-failure.sh +0 -89
- package/Dev/i18n/es/Common/hooks/scripts/pre-compact.sh +0 -53
- package/Dev/i18n/es/Common/hooks/scripts/session-end.sh +0 -98
- package/Dev/i18n/es/Common/templates/settings.json.template +0 -128
- package/Dev/i18n/fr/Common/hooks/scripts/post-tool-failure.sh +0 -88
- package/Dev/i18n/fr/Common/hooks/scripts/pre-compact.sh +0 -53
- package/Dev/i18n/fr/Common/hooks/scripts/session-end.sh +0 -98
- package/Dev/i18n/fr/Common/templates/settings.json.template +0 -128
- package/Dev/i18n/pt/Common/hooks/scripts/post-tool-failure.sh +0 -89
- package/Dev/i18n/pt/Common/hooks/scripts/pre-compact.sh +0 -53
- package/Dev/i18n/pt/Common/hooks/scripts/session-end.sh +0 -98
- package/Dev/i18n/pt/Common/templates/settings.json.template +0 -128
- package/Tools/Ralph/.ralph/hooks/pre-tool-context.sh +0 -100
- package/Tools/Ralph/.ralph/hooks/session-restore.sh +0 -118
- package/Tools/Ralph/.ralph/hooks/status-injector.sh +0 -147
- package/Tools/Ralph/.ralph/hooks/stop-dod-gate.sh +0 -137
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
# Check WordPress Security
|
|
2
|
+
|
|
3
|
+
## Arguments
|
|
4
|
+
|
|
5
|
+
$ARGUMENTS (optional: path to the plugin or theme to analyze)
|
|
6
|
+
|
|
7
|
+
## Plan Mode
|
|
8
|
+
|
|
9
|
+
> Plan mode is activated automatically when the scope spans several plugins/themes, includes file uploads or payment-like flows, or requires cross-cutting investigation.
|
|
10
|
+
|
|
11
|
+
## MISSION
|
|
12
|
+
|
|
13
|
+
Audit the security of a WordPress plugin or block theme against the WordPress Plugin Handbook security guidance and OWASP Top 10:2025. Stance: **validate input early, sanitize before storing, escape late on output, check capabilities and nonces on every state change, and never trust the request**. Most plugin vulnerabilities are missing authorization, missing nonce checks, SQL injection and unescaped output.
|
|
14
|
+
|
|
15
|
+
All commands run in Docker (`docker compose exec app ...`). Never run exploit attempts against a production site.
|
|
16
|
+
|
|
17
|
+
### Step 1: Authorization and Nonces (7 points)
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
docker compose exec app grep -rnE 'current_user_can|user_can\(|is_user_logged_in|is_super_admin' --include=*.php . --exclude-dir=vendor
|
|
21
|
+
docker compose exec app grep -rnE 'wp_verify_nonce|check_admin_referer|check_ajax_referer|wp_nonce_field|wp_create_nonce|wp_nonce_url' --include=*.php . --exclude-dir=vendor
|
|
22
|
+
docker compose exec app grep -rnE 'admin_post_|wp_ajax_(nopriv_)?|admin_init|add_(menu|submenu|options)_page' --include=*.php . --exclude-dir=vendor
|
|
23
|
+
docker compose exec app grep -rnE '[$]_(POST|GET|REQUEST)' --include=*.php . --exclude-dir=vendor
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Checklist:
|
|
27
|
+
- [ ] Every state-changing handler (`admin_post_*`, `wp_ajax_*`, form handlers on `init` / `admin_init`, REST write routes) checks a specific capability with `current_user_can()` (`manage_options`, `edit_post` with the post id, a custom capability), not `is_admin()` and not `is_user_logged_in()` alone
|
|
28
|
+
- [ ] Every form and action link carries a nonce (`wp_nonce_field()` / `wp_nonce_url()`) verified server-side with `check_admin_referer()`, `check_ajax_referer()` or `wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['_wpnonce'] ) ), 'action' )`; the nonce is a CSRF defense, never a substitute for the capability check
|
|
29
|
+
- [ ] `wp_ajax_nopriv_*` handlers are justified; each one validates input as untrusted and never exposes private data or privileged actions
|
|
30
|
+
- [ ] Per-object capabilities are used (`edit_post`, `delete_user` with the object id) to prevent IDOR; ownership is verified for user-scoped data
|
|
31
|
+
- [ ] Admin menu pages declare a capability, and the page callback re-checks it
|
|
32
|
+
- [ ] Custom roles and capabilities are added on activation and removed on uninstall; no capability is granted to `subscriber` or `anonymous` implicitly
|
|
33
|
+
- [ ] REST write endpoints use a real `permission_callback` (see Step 4)
|
|
34
|
+
|
|
35
|
+
**Scoring**: 7 pts. Deduct 2 per state-changing handler without a capability check (critical), 1 per missing nonce, 1 per `nopriv` handler without justification, max -7.
|
|
36
|
+
|
|
37
|
+
### Step 2: Input Sanitization and Output Escaping (7 points)
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
docker compose exec app grep -rnE 'sanitize_(text_field|textarea_field|email|key|title|file_name|url|hex_color)|absint\(|intval\(|wp_unslash|esc_url_raw|wp_kses' --include=*.php . --exclude-dir=vendor
|
|
41
|
+
docker compose exec app grep -rnE 'echo +[$]|<\?=|print +[$]|printf\(' --include=*.php . --exclude-dir=vendor
|
|
42
|
+
docker compose exec app grep -rnE 'esc_(html|attr|url|js|textarea)|wp_kses_post|wp_kses_data|wp_json_encode' --include=*.php . --exclude-dir=vendor
|
|
43
|
+
docker compose exec app grep -rnE 'innerHTML|dangerouslySetInnerHTML|insertAdjacentHTML|RawHTML' src --include=*.js --include=*.jsx --include=*.ts --include=*.tsx
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Checklist:
|
|
47
|
+
- [ ] Superglobals are read with an `isset()` / `??` guard, then `wp_unslash()`, then a sanitizer matching the data type (`sanitize_text_field`, `sanitize_textarea_field`, `sanitize_email`, `absint`, `sanitize_key`, `esc_url_raw` for stored URLs, `wp_kses` / `wp_kses_post` for allowed HTML); validation (allow-lists, `in_array( ..., true )`, `is_email()`) comes first for enumerations
|
|
48
|
+
- [ ] Output is escaped late, at the point of echo, with the function matching the context: `esc_html()` (text), `esc_attr()` (attribute), `esc_url()` (href/src), `esc_js()` / `wp_json_encode()` (inline JS data), `esc_textarea()`, `wp_kses_post()` (limited HTML); translated strings use `esc_html__()` / `esc_attr__()` / `esc_html_e()`
|
|
49
|
+
- [ ] No unescaped `echo $var`, `<?= $var ?>` or `printf` with raw variables, including values read from options, post meta, term names and `$_SERVER` (`REQUEST_URI`, `HTTP_HOST`); `add_query_arg()` and `remove_query_arg()` results are passed through `esc_url()`
|
|
50
|
+
- [ ] Blocks: `render.php` escapes every attribute and content value; `get_block_wrapper_attributes()` is output as-is (it is already escaped), user-provided attributes are not concatenated into markup
|
|
51
|
+
- [ ] JavaScript never assigns untrusted strings through `innerHTML` / `dangerouslySetInnerHTML` / `RawHTML`; React escaping is relied upon in edit components
|
|
52
|
+
- [ ] `wp_kses` allowed-tags arrays are explicit and minimal; `unfiltered_html` is not assumed
|
|
53
|
+
- [ ] Redirects use `wp_safe_redirect()` with `exit` afterwards, and `wp_validate_redirect()` for user-provided targets
|
|
54
|
+
|
|
55
|
+
**Scoring**: 7 pts. Deduct 2 per unescaped output of request-derived or stored data (critical), 1 per missing sanitizer on stored input, max -7.
|
|
56
|
+
|
|
57
|
+
### Step 3: Database and Injection (4 points)
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
docker compose exec app grep -rnE '[$]wpdb->(query|get_results|get_row|get_var|get_col|prepare|insert|update|delete|replace)' --include=*.php . --exclude-dir=vendor
|
|
61
|
+
docker compose exec app grep -rnE '[$]wpdb->(query|get_results|get_row|get_var|get_col)\(.*(\.|[$]|\{)' --include=*.php . --exclude-dir=vendor
|
|
62
|
+
docker compose exec app grep -rnE '(exec|shell_exec|system|passthru|proc_open|popen|eval|assert)\(' --include=*.php . --exclude-dir=vendor
|
|
63
|
+
docker compose exec app grep -rnE 'unserialize\(|maybe_unserialize\(|include *\(?[$]|require(_once)? *\(?[$]' --include=*.php . --exclude-dir=vendor
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Checklist:
|
|
67
|
+
- [ ] Every dynamic SQL statement goes through `$wpdb->prepare()` with placeholders `%s`, `%d`, `%f` and `%i` (identifiers); no string concatenation or interpolation of variables into SQL, including `ORDER BY` and `LIMIT` (allow-list the column, cast the integers)
|
|
68
|
+
- [ ] `LIKE` values use `$wpdb->esc_like()` before `prepare()`; `IN (...)` lists build placeholders with `array_fill()` and `implode()`
|
|
69
|
+
- [ ] Prefer `$wpdb->insert()`, `update()`, `delete()` with format arrays, or `WP_Query` / meta APIs, over raw SQL
|
|
70
|
+
- [ ] No `unserialize()` on user-controlled or remote data (object injection); use `json_decode()`; `maybe_unserialize()` is limited to trusted core storage and passes `allowed_classes` where applicable
|
|
71
|
+
- [ ] No command execution functions, `eval`, or dynamic `include` / `require` with variables; file paths built from user input are validated against an allow-list and `realpath()` containment
|
|
72
|
+
- [ ] No `extract( $_POST )` or mass-assignment of request arrays into options, user meta or post fields; the allowed keys are listed explicitly
|
|
73
|
+
|
|
74
|
+
**Scoring**: 4 pts. Deduct 2 per injectable query (critical), 1 per unsafe unserialize/include/exec, max -4.
|
|
75
|
+
|
|
76
|
+
### Step 4: REST API, AJAX and Outbound Requests (3 points)
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
docker compose exec app grep -rnE -B2 -A12 'register_rest_route' --include=*.php . --exclude-dir=vendor
|
|
80
|
+
docker compose exec app grep -rnE 'permission_callback.*__return_true' --include=*.php . --exclude-dir=vendor
|
|
81
|
+
docker compose exec app grep -rnE 'wp_remote_(get|post|request)|wp_safe_remote_(get|post|request)|curl_init|file_get_contents' --include=*.php . --exclude-dir=vendor
|
|
82
|
+
docker compose exec app grep -rnE 'Access-Control-Allow-Origin|rest_pre_serve_request|rest_send_cors_headers' --include=*.php . --exclude-dir=vendor
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
Checklist:
|
|
86
|
+
- [ ] Every `register_rest_route()` defines `permission_callback`; write routes (`POST`, `PUT`, `PATCH`, `DELETE`) never use `__return_true`; public read routes use `__return_true` only deliberately and expose no private fields
|
|
87
|
+
- [ ] Route `args` declare `type`, `required`, `validate_callback` and `sanitize_callback` (or a JSON schema); object-level checks use the id from the request (`current_user_can( 'edit_post', $id )`)
|
|
88
|
+
- [ ] Cookie-authenticated REST calls rely on the `X-WP-Nonce` (`wp_rest`) header; Application Passwords or OAuth are used for external clients; no custom token scheme without review
|
|
89
|
+
- [ ] REST responses do not leak password hashes, emails, tokens, internal paths or other users' data; fields are filtered through a response schema
|
|
90
|
+
- [ ] Outbound requests to user-provided URLs use `wp_safe_remote_get()` / `wp_safe_remote_post()` (SSRF protection) with timeouts and `reject_unsafe_urls`; webhook callbacks verify an HMAC signature with `hash_equals()`
|
|
91
|
+
- [ ] CORS headers are not opened to `*` for authenticated endpoints
|
|
92
|
+
|
|
93
|
+
**Scoring**: 3 pts. Deduct 1.5 per unauthenticated write route (critical), 1 per leaking response, 1 per SSRF-prone call, max -3.
|
|
94
|
+
|
|
95
|
+
### Step 5: Files, Secrets, Configuration and Supply Chain (4 points)
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
docker compose exec app grep -rnE 'move_uploaded_file|wp_handle_upload|wp_check_filetype|[$]_FILES|upload_mimes' --include=*.php . --exclude-dir=vendor
|
|
99
|
+
docker compose exec app grep -rnE 'defined\( *.ABSPATH' --include=*.php . --exclude-dir=vendor --exclude-dir=node_modules
|
|
100
|
+
docker compose exec app grep -rnE -i '(api[_-]?key|secret|password|token) *= *.[A-Za-z0-9]{12,}' --include=*.php --include=*.js --include=*.json . --exclude-dir=vendor --exclude-dir=node_modules
|
|
101
|
+
docker compose exec app composer audit
|
|
102
|
+
docker compose exec app npm audit --omit=dev --audit-level=moderate
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
Checklist:
|
|
106
|
+
- [ ] Uploads use `wp_handle_upload()` / `media_handle_upload()` with an allow-list of MIME types and extensions (`wp_check_filetype_and_ext()`), size limits and capability (`upload_files`); files are never stored with their original name in executable locations; no `move_uploaded_file()` with user paths
|
|
107
|
+
- [ ] Every PHP file reachable by URL starts with `defined( 'ABSPATH' ) || exit;`; directories holding generated files contain an `index.php` stub or a deny rule; sensitive exports are not written under `wp-content/uploads` with guessable names
|
|
108
|
+
- [ ] No secrets, API keys, salts or credentials in the repository; configuration comes from constants in `wp-config.php`, environment variables, or encrypted options; secrets are never printed in `WP_DEBUG` logs or REST responses
|
|
109
|
+
- [ ] Sensitive options are `autoload` false and not exposed via `show_in_rest` or `register_setting` in REST
|
|
110
|
+
- [ ] Debug output (`WP_DEBUG_DISPLAY`, `var_dump`, stack traces) never reaches visitors; error messages are generic
|
|
111
|
+
- [ ] Passwords and tokens use core APIs (`wp_hash_password`, `wp_generate_password`, `wp_generate_uuid4`, `random_bytes`), never `md5`, `sha1`, `rand` or `mt_rand`; comparisons use `hash_equals()`
|
|
112
|
+
- [ ] Dependencies are pinned in `composer.lock` / `package-lock.json`, scanned in CI (`composer audit`, `npm audit --omit=dev --audit-level=moderate`), and trusted (no abandoned packages); namespaced vendor code (Strauss or PHP-Scoper) when conflicts with other plugins are possible
|
|
113
|
+
- [ ] Uninstall removes personal data the plugin stored; privacy exporters and erasers are registered (`wp_privacy_personal_data_exporters` / `wp_privacy_personal_data_erasers`) when personal data is collected
|
|
114
|
+
|
|
115
|
+
**Scoring**: 4 pts (1 uploads, 1 file access and secrets, 1 configuration and cryptography, 1 dependencies and privacy).
|
|
116
|
+
|
|
117
|
+
### Step 6: WooCommerce Extension (conditional, not scored here)
|
|
118
|
+
|
|
119
|
+
If the project depends on WooCommerce (plugin header `Requires Plugins: woocommerce`, `wc_*` calls, `before_woocommerce_init` hook), also apply `.claude/skills/woocommerce/checklist.md` and report its findings in a separate section.
|
|
120
|
+
|
|
121
|
+
## OUTPUT FORMAT
|
|
122
|
+
|
|
123
|
+
```
|
|
124
|
+
WORDPRESS SECURITY AUDIT
|
|
125
|
+
========================
|
|
126
|
+
|
|
127
|
+
SCORE: XX/25
|
|
128
|
+
|
|
129
|
+
WordPress: X.Y PHP: X.Y Handlers: N REST routes: N Unprotected writes: N Raw SQL: N Advisories: N
|
|
130
|
+
|
|
131
|
+
SUB-SCORES:
|
|
132
|
+
Authorization and nonces : XX/7
|
|
133
|
+
Sanitization and escaping : XX/7
|
|
134
|
+
Database and injection : XX/4
|
|
135
|
+
REST, AJAX, outbound requests : XX/3
|
|
136
|
+
Files, secrets, supply chain : XX/4
|
|
137
|
+
|
|
138
|
+
STRENGTHS:
|
|
139
|
+
- [...]
|
|
140
|
+
|
|
141
|
+
ISSUES (by severity):
|
|
142
|
+
- CRITICAL: [file:line] [description] [CWE/OWASP] -> [fix]
|
|
143
|
+
- IMPORTANT: ...
|
|
144
|
+
- MINOR: ...
|
|
145
|
+
|
|
146
|
+
RECOMMENDATIONS:
|
|
147
|
+
1. [Action] (effort: Low/Medium/High, impact: Low/Medium/High)
|
|
148
|
+
2. ...
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
## IMPORTANT NOTES
|
|
152
|
+
|
|
153
|
+
- Security findings are ALWAYS top priority; a missing capability check, an injectable query or an unauthenticated write route is a release blocker
|
|
154
|
+
- Findings must cite `file:line` and include the corrected snippet (capability check, nonce, `prepare()`, escaper)
|
|
155
|
+
- Sanitize on input, escape on output: both are required, neither replaces the other
|
|
156
|
+
- Do not test exploits against live sites; reproduce in `wp-env`
|
|
157
|
+
- Map findings to OWASP Top 10:2025 (A01 access control, A03 supply chain, A05 injection, A10 exceptional conditions) when reporting
|
|
158
|
+
- Hosting-level hardening (server config, WAF, file permissions, Bedrock) is out of scope
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
# Check WordPress Testing
|
|
2
|
+
|
|
3
|
+
## Arguments
|
|
4
|
+
|
|
5
|
+
$ARGUMENTS (optional: path to the plugin or theme to analyze)
|
|
6
|
+
|
|
7
|
+
## Plan Mode
|
|
8
|
+
|
|
9
|
+
> Plan mode is activated automatically when the scope spans PHP, block JavaScript and end-to-end suites, or requires cross-cutting investigation.
|
|
10
|
+
|
|
11
|
+
## MISSION
|
|
12
|
+
|
|
13
|
+
Audit the test strategy of a WordPress plugin or block theme. Three test surfaces: PHP integration/unit tests (PHPUnit with `WP_UnitTestCase` running inside `wp-env`, `yoast/phpunit-polyfills` 4.0.0 for cross-version compatibility), JavaScript unit tests (`wp-scripts test-unit-js`, Jest) and end-to-end tests (Playwright with `@wordpress/e2e-test-utils-playwright`). TDD (Red, Green, Refactor) and 80% minimum coverage apply, with the pyramid 70% unit / 20% integration / 10% E2E. Pure PHP logic is kept free of WordPress calls so it can be unit-tested without loading WordPress.
|
|
14
|
+
|
|
15
|
+
All commands run in Docker. WordPress-dependent suites run inside the `wp-env` containers (`npx wp-env run tests-cli ...`); `wp-env` itself uses Docker.
|
|
16
|
+
|
|
17
|
+
### Step 1: Run the Suites
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
docker compose exec app npx wp-env start
|
|
21
|
+
docker compose exec app npx wp-env run tests-cli --env-cwd=wp-content/plugins/<plugin-slug> vendor/bin/phpunit
|
|
22
|
+
docker compose exec app npx wp-scripts test-unit-js --coverage
|
|
23
|
+
docker compose exec app npx playwright test
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Record: number of tests per suite, failures, skipped tests, flaky tests, duration. A failing suite caps the axis at 50%.
|
|
27
|
+
|
|
28
|
+
### Step 2: Code Coverage (5 points)
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
docker compose exec app npx wp-env run tests-cli --env-cwd=wp-content/plugins/<plugin-slug> env XDEBUG_MODE=coverage vendor/bin/phpunit --coverage-text
|
|
32
|
+
docker compose exec app npx wp-scripts test-unit-js --coverage --coverageReporters=text-summary
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Checklist:
|
|
36
|
+
- [ ] PHP coverage >= 80% on `src/` (a coverage driver such as Xdebug or PCOV is available in the test container)
|
|
37
|
+
- [ ] JavaScript coverage >= 80% on block and editor code
|
|
38
|
+
- [ ] Critical paths (capability checks, nonce verification, sanitization, REST permission callbacks, uninstall) are at 100%
|
|
39
|
+
- [ ] Mutation testing (Infection for PHP, Stryker for JS) is considered for critical logic: a high line coverage with weak assertions is a false sense of safety
|
|
40
|
+
|
|
41
|
+
**Scoring**: 5 pts (2 PHP, 2 JS, 1 critical paths). Mark JS N/A when the project has no JavaScript.
|
|
42
|
+
|
|
43
|
+
### Step 3: PHP Integration and Unit Tests (7 points)
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
docker compose exec app cat phpunit.xml.dist tests/bootstrap.php
|
|
47
|
+
docker compose exec app grep -rnE 'extends (WP_UnitTestCase|WP_UnitTestCase_Base|WP_Ajax_UnitTestCase|WP_REST_TestCase|PHPUnit.*TestCase)' tests
|
|
48
|
+
docker compose exec app grep -rnE 'static::factory|[$]this->factory|set_up|tear_down|setUp|tearDown' tests
|
|
49
|
+
docker compose exec app grep -nE 'yoast/phpunit-polyfills|phpunit/phpunit|wp-phpunit' composer.json
|
|
50
|
+
docker compose exec app cat .wp-env.json
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Checklist:
|
|
54
|
+
- [ ] `phpunit.xml.dist` and a `tests/bootstrap.php` that loads the WordPress test suite (`WP_TESTS_DIR`, `tests_add_filter( 'muplugins_loaded', ... )` to load the plugin); `wp-env` provides the test environment; `yoast/phpunit-polyfills` is in `require-dev` and `WP_TESTS_PHPUNIT_POLYFILLS_PATH` is set
|
|
55
|
+
- [ ] Integration tests extend `WP_UnitTestCase`, use factories (`self::factory()->post->create()`, `user`, `term`) instead of hand-written SQL, and rely on its per-test transaction rollback; fixtures are created in `set_up()` and cleaned in `tear_down()` (calling the parent first)
|
|
56
|
+
- [ ] REST tests dispatch `new WP_REST_Request(...)` through `rest_do_request()` after `wp_set_current_user()` with roles for allowed and denied cases (401/403), validation failures (400) and success
|
|
57
|
+
- [ ] Hooks are asserted through behavior (`did_action()`, `has_filter()`, the resulting state), not through private calls; filters and actions registered by the test are removed
|
|
58
|
+
- [ ] Authorization and nonce tests exist for every state-changing handler (logged-out, wrong role, bad nonce, valid)
|
|
59
|
+
- [ ] Pure logic classes have fast unit tests with no WordPress load (Brain Monkey or Mockery for the few WordPress functions needed), so the unit suite runs in seconds
|
|
60
|
+
- [ ] Tests are deterministic: no dependence on the real clock, on remote HTTP (mock with `pre_http_request`), on global option leakage between tests, or on test order
|
|
61
|
+
- [ ] The CI matrix covers the supported range: the minimum and the latest PHP version declared (7.4 floor, 8.3+ recommended) and WordPress minimum, latest and trunk where feasible; multisite is run when the plugin supports it (`WP_TESTS_MULTISITE` / `@group ms-required`)
|
|
62
|
+
|
|
63
|
+
**Scoring**: 7 pts (2 environment and bootstrap, 2 integration quality, 1 REST/authorization, 1 pure unit tests, 1 CI matrix).
|
|
64
|
+
|
|
65
|
+
### Step 4: JavaScript / Block Tests (4 points)
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
docker compose exec app grep -rnE '"test:unit"|"test:e2e"|test-unit-js|wp-scripts' package.json
|
|
69
|
+
docker compose exec app find src -name '*.test.*' -o -name '__tests__' -type d
|
|
70
|
+
docker compose exec app grep -rnE '@testing-library|jest-dom|@wordpress/jest' package.json
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Checklist:
|
|
74
|
+
- [ ] `npm run test:unit` maps to `wp-scripts test-unit-js` and runs in CI; test files live next to the code or in `__tests__/`
|
|
75
|
+
- [ ] Block `edit` / `save` and utility functions are tested with Testing Library semantics (roles, text), not implementation details; `save()` output is asserted so deprecations are not forgotten when markup changes
|
|
76
|
+
- [ ] Stores (`@wordpress/data`) and Interactivity API stores have tests for actions, selectors and state transitions
|
|
77
|
+
- [ ] Block fixtures cover deprecated markup so saved content keeps validating
|
|
78
|
+
- [ ] Snapshot tests are small and reviewed, not used to bless entire trees
|
|
79
|
+
|
|
80
|
+
**Scoring**: 4 pts (1 setup and CI, 1 component tests, 1 stores, 1 deprecations and fixtures). Mark N/A when no JavaScript exists and rescale.
|
|
81
|
+
|
|
82
|
+
### Step 5: End-to-End Tests (5 points)
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
docker compose exec app cat playwright.config.ts
|
|
86
|
+
docker compose exec app grep -rnE '@wordpress/e2e-test-utils-playwright|requestUtils|admin\.|editor\.|pageUtils' tests/e2e
|
|
87
|
+
docker compose exec app grep -rnE 'waitForTimeout|sleep\(|test\.(skip|only)' tests/e2e
|
|
88
|
+
docker compose exec app grep -nE 'test:e2e|playwright' package.json .github/workflows/*.yml
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
Checklist:
|
|
92
|
+
- [ ] Playwright with `@wordpress/e2e-test-utils-playwright` (`test`, `expect`, `admin`, `editor`, `pageUtils`, `requestUtils`) against the `wp-env` test site; a global setup authenticates once and stores the state
|
|
93
|
+
- [ ] Critical user journeys are covered: plugin activation, settings page save, inserting and configuring each block in the editor, front-end rendering of dynamic blocks, and (for block themes) Site Editor template edits
|
|
94
|
+
- [ ] Locators use roles, labels and test ids; no `waitForTimeout` or arbitrary sleeps; no `test.only` committed, and each `test.skip` has a ticket
|
|
95
|
+
- [ ] Tests create their own content through `requestUtils` (REST) and clean up (`deleteAllPosts()` and similar) so they are independent and repeatable
|
|
96
|
+
- [ ] E2E runs on pull requests with traces/screenshots/videos retained on failure; flakes are tracked and fixed, not retried indefinitely
|
|
97
|
+
- [ ] Accessibility checks (axe via `@axe-core/playwright`) run on key screens when the project ships UI
|
|
98
|
+
|
|
99
|
+
**Scoring**: 5 pts (1 setup, 2 journeys, 1 reliability, 1 CI and artifacts).
|
|
100
|
+
|
|
101
|
+
### Step 6: Isolation, Speed and Structure (4 points)
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
docker compose exec app ls tests tests/php tests/unit tests/integration tests/e2e
|
|
105
|
+
docker compose exec app grep -rnE '@group|@covers|@dataProvider|#\[Group|#\[CoversClass|#\[DataProvider' tests
|
|
106
|
+
docker compose exec app grep -rnE 'markTestSkipped|markTestIncomplete|@ignore' tests
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
Checklist:
|
|
110
|
+
- [ ] Unit, integration and E2E suites are separated (`testsuite` entries in `phpunit.xml.dist`, separate npm scripts) so the fast suite runs on every commit and the slow ones on every PR
|
|
111
|
+
- [ ] Tests follow Arrange-Act-Assert with names describing behavior (`test_rest_route_rejects_subscriber`); data providers for input matrices
|
|
112
|
+
- [ ] No test depends on network access, the production database or a fixed absolute URL
|
|
113
|
+
- [ ] Skipped or incomplete tests have a ticket; `@covers` / `#[CoversClass]` targets are declared when strict coverage is enabled
|
|
114
|
+
- [ ] Bug fixes ship with a regression test that failed before the fix
|
|
115
|
+
|
|
116
|
+
**Scoring**: 4 pts (1 per checklist family).
|
|
117
|
+
|
|
118
|
+
### Step 7: WooCommerce Extension (conditional, not scored here)
|
|
119
|
+
|
|
120
|
+
If the project depends on WooCommerce (plugin header `Requires Plugins: woocommerce`, `wc_*` calls, `before_woocommerce_init` hook), also apply `.claude/skills/woocommerce/checklist.md` and report its findings in a separate section.
|
|
121
|
+
|
|
122
|
+
## OUTPUT FORMAT
|
|
123
|
+
|
|
124
|
+
```
|
|
125
|
+
WORDPRESS TESTING AUDIT
|
|
126
|
+
=======================
|
|
127
|
+
|
|
128
|
+
SCORE: XX/25
|
|
129
|
+
|
|
130
|
+
WordPress: X.Y PHP: X.Y PHPUnit tests: N Jest tests: N E2E tests: N Coverage: PHP XX% / JS XX%
|
|
131
|
+
|
|
132
|
+
SUB-SCORES:
|
|
133
|
+
Coverage : XX/5
|
|
134
|
+
PHP integration and unit tests : XX/7
|
|
135
|
+
JavaScript / block tests : XX/4
|
|
136
|
+
End-to-end tests : XX/5
|
|
137
|
+
Isolation, speed, structure : XX/4
|
|
138
|
+
|
|
139
|
+
STRENGTHS:
|
|
140
|
+
- [...]
|
|
141
|
+
|
|
142
|
+
ISSUES (by severity):
|
|
143
|
+
- CRITICAL: [file:line] [description] -> [fix]
|
|
144
|
+
- IMPORTANT: ...
|
|
145
|
+
- MINOR: ...
|
|
146
|
+
|
|
147
|
+
RECOMMENDATIONS:
|
|
148
|
+
1. [Action] (effort: Low/Medium/High, impact: Low/Medium/High)
|
|
149
|
+
2. ...
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
## IMPORTANT NOTES
|
|
153
|
+
|
|
154
|
+
- A missing authorization or nonce test for a state-changing handler is a critical finding
|
|
155
|
+
- Findings must cite `file:line` and propose a concrete test to add (given/when/then)
|
|
156
|
+
- Do not recommend heavy mocking of WordPress when `WP_UnitTestCase` with factories gives a faithful, fast integration test
|
|
157
|
+
- Generic PHP testing practice belongs to the `php` stack; hosting and deployment pipelines are out of scope
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "WordPress audit by axis: architecture, code-quality, security, testing, or all (scored aggregate)"
|
|
3
|
+
argument-hint: "<architecture|code-quality|security|testing|all> [path]"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# WordPress Check
|
|
7
|
+
|
|
8
|
+
## Arguments
|
|
9
|
+
|
|
10
|
+
$ARGUMENTS
|
|
11
|
+
|
|
12
|
+
The first argument is the axis; the rest (for example a project path) is passed on. Without an axis, run `all`.
|
|
13
|
+
|
|
14
|
+
| Axis | Checklist to follow |
|
|
15
|
+
|------|---------------------|
|
|
16
|
+
| `architecture` | `.claude/references/wordpress/checks/architecture.md` |
|
|
17
|
+
| `code-quality` | `.claude/references/wordpress/checks/code-quality.md` |
|
|
18
|
+
| `security` | `.claude/references/wordpress/checks/security.md` |
|
|
19
|
+
| `testing` | `.claude/references/wordpress/checks/testing.md` |
|
|
20
|
+
| `all` | `.claude/references/wordpress/checks/all.md`: the 4 axes, then a consolidated report scored out of 100 |
|
|
21
|
+
|
|
22
|
+
## MISSION
|
|
23
|
+
|
|
24
|
+
1. Read the first argument. If it is not one of the 5 axes above, list them with an example (`/wordpress:check security wp-content/plugins/my-plugin`) and stop.
|
|
25
|
+
2. Read the checklist file of that axis and follow it step by step. In that file, `$ARGUMENTS` stands for the arguments that follow the axis.
|
|
26
|
+
3. Produce the report in the output format the checklist defines.
|
|
27
|
+
|
|
28
|
+
Examples: `/wordpress:check architecture`, `/wordpress:check testing ./my-plugin`, `/wordpress:check all`.
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
# Project Context - {{PROJECT_NAME}}
|
|
2
|
+
|
|
3
|
+
## General Information
|
|
4
|
+
|
|
5
|
+
**Project name** : {{PROJECT_NAME}}
|
|
6
|
+
|
|
7
|
+
**Tech stack** : {{TECH_STACK}}
|
|
8
|
+
|
|
9
|
+
**WordPress** : {{WP_VERSION}} (reference line: 7.1; set `Requires at least` to the oldest version you actually test)
|
|
10
|
+
|
|
11
|
+
**PHP** : {{PHP_VERSION}} (WordPress minimum 7.4, 8.3+ recommended; set `Requires PHP` to the oldest version in your CI matrix)
|
|
12
|
+
|
|
13
|
+
**Project type** : {{PROJECT_TYPE}} <!-- plugin | block theme | plugin + block theme -->
|
|
14
|
+
|
|
15
|
+
**WooCommerce dependency** : {{WOOCOMMERCE_DEPENDENCY}} <!-- none | required (Requires Plugins: woocommerce); when required, load .claude/skills/woocommerce/ -->
|
|
16
|
+
|
|
17
|
+
> This stack covers plugins and block themes: hooks, blocks, REST API, WP-CLI, i18n, security and tests. Bedrock, hosting and multi-environment deployment are out of scope; generic PHP concerns follow the `php` stack; WooCommerce specifics live in the optional `woocommerce` skill.
|
|
18
|
+
|
|
19
|
+
## Project Description
|
|
20
|
+
|
|
21
|
+
{{PROJECT_DESCRIPTION}}
|
|
22
|
+
|
|
23
|
+
## Project Goals
|
|
24
|
+
|
|
25
|
+
{{PROJECT_GOALS}}
|
|
26
|
+
|
|
27
|
+
## Technical Architecture
|
|
28
|
+
|
|
29
|
+
### PHP Side
|
|
30
|
+
- **Main file** : `{{PLUGIN_SLUG}}.php` (header + bootstrap only)
|
|
31
|
+
- **Prefix / namespace** : `{{PHP_NAMESPACE}}` / `{{FUNCTION_PREFIX}}_`
|
|
32
|
+
- **Text domain** : `{{PLUGIN_SLUG}}` (equals the slug, literal in every call)
|
|
33
|
+
- **Autoload** : Composer PSR-4 (`src/`)
|
|
34
|
+
- **Data** : {{DATA_LAYER}} <!-- options, post meta, custom post types, custom tables via dbDelta -->
|
|
35
|
+
- **Extension points** : prefixed actions and filters documented in docblocks
|
|
36
|
+
|
|
37
|
+
### Blocks and Theme (if any)
|
|
38
|
+
- **Blocks** : `src/<block>/block.json` (apiVersion 3), built to `build/`, registered through `blocks-manifest.php`
|
|
39
|
+
- **Dynamic rendering** : `render.php` with late escaping
|
|
40
|
+
- **Front-end interactivity** : Interactivity API (`viewScriptModule`)
|
|
41
|
+
- **Theme** : `theme.json` (version 3), `templates/`, `parts/`, `patterns/`, `styles/`
|
|
42
|
+
|
|
43
|
+
### Tooling
|
|
44
|
+
- **Environment** : `@wordpress/env` (`.wp-env.json`)
|
|
45
|
+
- **JS build** : `@wordpress/scripts`
|
|
46
|
+
- **PHP quality** : PHPCS with WordPress Coding Standards, PHPStan with `szepeviktor/phpstan-wordpress`
|
|
47
|
+
- **Release check** : Plugin Check
|
|
48
|
+
- **Package manager** : {{PACKAGE_MANAGER}}
|
|
49
|
+
|
|
50
|
+
### Security Model
|
|
51
|
+
- **Authorization** : `current_user_can()` on every state change, per-object capabilities
|
|
52
|
+
- **CSRF** : nonces on every form, action link and cookie-authenticated REST call
|
|
53
|
+
- **Input / output** : sanitize on input, escape late on output
|
|
54
|
+
- **SQL** : `$wpdb->prepare()` only
|
|
55
|
+
- **Secrets** : constants in `wp-config.php` or environment, never in the repository
|
|
56
|
+
|
|
57
|
+
### Build and Release
|
|
58
|
+
- **CI/CD** : {{CICD_PLATFORM}}
|
|
59
|
+
- **Distribution** : {{DISTRIBUTION_CHANNEL}} <!-- WordPress.org | private ZIP | Composer package -->
|
|
60
|
+
- **Distribution ZIP** : `.distignore` excludes `node_modules/`, `tests/`, dev configs
|
|
61
|
+
|
|
62
|
+
## Project Structure
|
|
63
|
+
|
|
64
|
+
```
|
|
65
|
+
{{PROJECT_NAME}}/
|
|
66
|
+
├── {{PLUGIN_SLUG}}.php # Header + bootstrap
|
|
67
|
+
├── uninstall.php # Cleanup on delete
|
|
68
|
+
├── readme.txt # WordPress.org readme
|
|
69
|
+
├── composer.json # PSR-4, dev tools
|
|
70
|
+
├── package.json # @wordpress/scripts
|
|
71
|
+
├── .wp-env.json # Local environment and test site
|
|
72
|
+
├── .phpcs.xml.dist # WordPress Coding Standards
|
|
73
|
+
├── phpstan.neon.dist
|
|
74
|
+
├── phpunit.xml.dist
|
|
75
|
+
├── .distignore
|
|
76
|
+
├── src/ # PHP classes (PSR-4) and block sources
|
|
77
|
+
│ └── <block>/ # block.json, edit.js, render.php, view.js, style.scss
|
|
78
|
+
├── build/ # Generated (blocks-manifest.php, *.asset.php)
|
|
79
|
+
├── theme.json # Block themes only
|
|
80
|
+
├── templates/ parts/ patterns/ # Block themes only
|
|
81
|
+
├── languages/ # .pot and translations
|
|
82
|
+
└── tests/
|
|
83
|
+
├── bootstrap.php
|
|
84
|
+
├── php/ # WP_UnitTestCase
|
|
85
|
+
└── e2e/ # Playwright
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
## Coding Standards
|
|
89
|
+
|
|
90
|
+
### PHP
|
|
91
|
+
- WordPress Coding Standards via PHPCS, zero errors
|
|
92
|
+
- PHPStan level {{PHPSTAN_LEVEL}} with WordPress stubs
|
|
93
|
+
- `defined( 'ABSPATH' ) || exit;` in every directly reachable file
|
|
94
|
+
- Late escaping, early sanitizing, `$wpdb->prepare()`
|
|
95
|
+
|
|
96
|
+
### JavaScript
|
|
97
|
+
- `@wordpress/eslint-plugin` through `wp-scripts lint-js`
|
|
98
|
+
- `@wordpress/*` packages as externals
|
|
99
|
+
- Strings through `@wordpress/i18n`
|
|
100
|
+
|
|
101
|
+
### Security
|
|
102
|
+
- Capability check and nonce on every state change
|
|
103
|
+
- `permission_callback` on every REST route, never `__return_true` for writes
|
|
104
|
+
- No `unserialize()` on user data
|
|
105
|
+
|
|
106
|
+
## Key Modules
|
|
107
|
+
|
|
108
|
+
### {{MODULE_1}}
|
|
109
|
+
{{MODULE_1_DESCRIPTION}}
|
|
110
|
+
|
|
111
|
+
### {{MODULE_2}}
|
|
112
|
+
{{MODULE_2_DESCRIPTION}}
|
|
113
|
+
|
|
114
|
+
## External Integrations
|
|
115
|
+
|
|
116
|
+
| Service | Purpose | Documentation |
|
|
117
|
+
|---------|---------|---------------|
|
|
118
|
+
| {{SERVICE_1}} | {{PURPOSE_1}} | {{DOC_URL_1}} |
|
|
119
|
+
| {{SERVICE_2}} | {{PURPOSE_2}} | {{DOC_URL_2}} |
|
|
120
|
+
|
|
121
|
+
## Development Workflow
|
|
122
|
+
|
|
123
|
+
### Git Flow
|
|
124
|
+
- **Main**: Production-ready code
|
|
125
|
+
- **Develop**: Integration branch
|
|
126
|
+
- **Feature**: `feature/{ticket}-{description}`
|
|
127
|
+
- **Hotfix**: `hotfix/{ticket}-{description}`
|
|
128
|
+
|
|
129
|
+
### Pull Request Requirements
|
|
130
|
+
- [ ] PHPUnit, Jest and E2E tests pass
|
|
131
|
+
- [ ] `phpcs`, `phpstan` and `wp-scripts lint-js` pass
|
|
132
|
+
- [ ] Plugin Check reports no errors
|
|
133
|
+
- [ ] Capability, nonce and escaping reviewed for every new handler or template
|
|
134
|
+
- [ ] Coverage >= 80%
|
|
135
|
+
- [ ] `composer audit` and `npm audit --omit=dev --audit-level=moderate` pass
|
|
136
|
+
- [ ] Code reviewed
|
|
137
|
+
|
|
138
|
+
## Commands Reference
|
|
139
|
+
|
|
140
|
+
Commands run in Docker; WordPress-dependent commands run in the `wp-env` containers.
|
|
141
|
+
|
|
142
|
+
### Development
|
|
143
|
+
```bash
|
|
144
|
+
npx wp-env start # Start the dev site (8888) and test site (8889)
|
|
145
|
+
npx wp-scripts start # Watch and build blocks/assets
|
|
146
|
+
npx wp-scripts build # Production build
|
|
147
|
+
npx wp-env run cli wp plugin list # Run WP-CLI in the environment
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
### Testing
|
|
151
|
+
```bash
|
|
152
|
+
npx wp-env run tests-cli --env-cwd=wp-content/plugins/{{PLUGIN_SLUG}} vendor/bin/phpunit
|
|
153
|
+
npx wp-scripts test-unit-js # Jest unit tests
|
|
154
|
+
npx playwright test # E2E with @wordpress/e2e-test-utils-playwright
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
### Quality
|
|
158
|
+
```bash
|
|
159
|
+
vendor/bin/phpcs # WordPress Coding Standards
|
|
160
|
+
vendor/bin/phpcbf # Auto-fix
|
|
161
|
+
vendor/bin/phpstan analyse
|
|
162
|
+
npx wp-scripts lint-js
|
|
163
|
+
npx wp-env run cli wp plugin check {{PLUGIN_SLUG}}
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
### Internationalization
|
|
167
|
+
```bash
|
|
168
|
+
npx wp-env run cli wp i18n make-pot wp-content/plugins/{{PLUGIN_SLUG}} wp-content/plugins/{{PLUGIN_SLUG}}/languages/{{PLUGIN_SLUG}}.pot
|
|
169
|
+
```
|