skills/security-scanner/SKILL.md
Automatically scan code for security vulnerabilities when user asks if code is secure or shows potentially unsafe code. Performs focused security checks on specific code, functions, or patterns. Invoke when user asks "is this secure?", "security issue?", mentions XSS, SQL injection, or shows security-sensitive code.
npx skillsauth add kanopi/cms-cultivator security-scannerInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Automatically scan code for security vulnerabilities.
Security is a continuous practice, not a one-time fix.
/audit-security command): Full OWASP Top 10 scan with dependency checksThis skill provides rapid feedback during development. For production readiness, use comprehensive audits + professional pentesting.
Activate this skill when the user:
Before scanning for security issues, assess:
Critical risks (prioritize first):
High risks:
Medium/Low risks:
User-facing:
Backend:
Authentication/Authorization:
Drupal:
hasPermission()WordPress:
wpdb->prepare() for querieswp_nonce_field() for CSRFesc_html(), esc_attr() for outputcurrent_user_can()User shows code or asks about security
↓
Identify attack surface (input/auth/files)
↓
Assess risk level (Critical/High/Medium)
↓
Check against OWASP Top 10
↓
Apply platform-specific patterns
↓
Report vulnerabilities with fixes
↓
Prioritize by exploitability and impact
eval(), unserialize(), or exec() with user inputFor detailed before/after code examples for SQL injection, XSS, CSRF, file uploads, and access control, see security-patterns.md.
Key categories: SQL injection, XSS (output escaping), CSRF (nonce/token validation), authentication bypass, insecure file uploads.
## Security Scan Results
### 🔴 Critical Issues (Fix Immediately)
**1. SQL Injection Vulnerability**
- **Location**: `src/Controller/UserController.php:45`
- **Risk**: Critical - Allows database manipulation
- **Code**:
```php
$query = "SELECT * FROM users WHERE id = " . $_GET['id'];
$query = $connection->select('users', 'u')
->condition('id', $id, '=')
->execute();
2. Missing CSRF Protection
src/Form/DeleteForm.php:673. Weak Password Policy
## OWASP Top 10 Quick Check
1. **Injection** - SQL, command, LDAP injection
2. **Broken Authentication** - Weak passwords, session management
3. **Sensitive Data Exposure** - Unencrypted data, weak crypto
4. **XML External Entities (XXE)** - XML parsing vulnerabilities
5. **Broken Access Control** - Missing permission checks
6. **Security Misconfiguration** - Default configs, verbose errors
7. **XSS** - Unescaped user input
8. **Insecure Deserialization** - Unsafe object deserialization
9. **Known Vulnerabilities** - Outdated dependencies
10. **Insufficient Logging** - No audit trail
## Platform-Specific Security
### Drupal Security
**Use**:
- `\Drupal\Component\Utility\Html::escape()` for output
- `\Drupal::database()->select()` for queries
- `\Drupal::csrfToken()->validate()` for forms
- `$this->currentUser()->hasPermission()` for access checks
### WordPress Security
**Use**:
- `esc_html()`, `esc_attr()`, `esc_url()` for output
- `$wpdb->prepare()` for queries
- `wp_verify_nonce()` for forms
- `current_user_can()` for permissions
## Integration with /audit-security Command
- **This Skill**: Focused code-level security checks
- "Is this query secure?"
- "Check this form for vulnerabilities"
- Single function/file analysis
- **`/audit-security` Command**: Comprehensive security audit
- Full OWASP Top 10 scan
- Dependency vulnerability check
- File permission analysis
- Secrets detection
## Common Vulnerabilities
For input validation, output escaping, and access control code patterns, see [security-patterns.md](security-patterns.md).
## Resources
- [OWASP Top 10](https://owasp.org/www-project-top-ten/)
- [Drupal Security Best Practices](https://www.drupal.org/docs/security-in-drupal)
- [WordPress Security](https://developer.wordpress.org/apis/security/)
tools
Strategist-focused site audit for discovery and pre-discovery. Given a site URL and optional qualitative research data, navigates the site via CoWork, audits against all 21 UX Laws from lawsofux.com, reviews content hierarchy, synthesises qualitative data, runs Lighthouse, and produces two deliverables — a Project Knowledge Summary (Markdown for Claude Desktop Projects) and a polished, iterable HTML Artifact for client sharing. Use when a strategist, UX lead, or PM asks for a discovery audit, UX laws audit, content hierarchy review, pre-discovery site review, "audit this site for strategy", "strategist audit", "UX audit", or pastes a site URL with discovery context. Not for developer audits — use accessibility-audit, performance-audit, or live-site-audit for those.
development
Provide story point estimation guidance with hour calculations for software development tasks. Uses Fibonacci sequence (1, 2, 3, 5, 8, 13, 21, 34+) and converts story points to hours. Includes platform-specific adjustments and velocity calculations.
tools
Perform a full QA review of a Teamwork task by reading the task and all its comments for context, extracting the multi-dev URL, generating dynamic validation steps tailored to the task type, and using CoWork browser automation to execute those steps on the multi-dev environment. Produces a structured validation report with pass/fail per step, screenshots, internal notes, and a client-facing summary — all shown in chat. Use this skill whenever the user asks to QA, test, validate, or review a Teamwork task or multi-dev environment — even if they just say "can you QA this?" or paste a Teamwork link. Also triggers for phrases like "run QA on", "check the multi-dev", "validate this task", "test the dev link", or "review the ticket". Works across Drupal/CMS updates, WordPress/plugin updates, bug fixes, new feature development, and general web development tasks.
tools
Generate a client-facing project heartbeat / status update message for a Kanopi project, ready to be posted as a Teamwork message. Use this skill whenever the user asks to write, draft, generate, or send a project update, heartbeat, status update, or progress report to a client. Also triggers when the user says things like "time for a project update", "draft the heartbeat", "write up the update for [project]", or "it's been two weeks, let's send an update". Always use this skill — even if the user doesn't say "heartbeat" — whenever the intent is to summarise recent project activity for a client audience.