.cursor/skills/security-review/SKILL.md
Security review agent for PHP/Symfony codebase. Performs manual-style security review with OWASP ASVS 5.0 category mapping, severity ratings, and PHP/Symfony-specific checklist. Triggers on: "security review", "security audit", "vulnerability check", "OWASP review", "pentest review", "security scan".
npx skillsauth add nmdimas/ai-community-platform security-reviewInstall 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.
Deep security review agent for the AI Community Platform's PHP/Symfony codebase. Performs manual-style code review focused on security vulnerabilities, mapped to OWASP ASVS 5.0 categories.
| Aspect | Security-Review | Auditor | Reviewer | |--------|----------------|---------|----------| | Focus | Security vulnerabilities | Broad compliance (S/T/C/X/O/D/E) | Code quality | | Depth | Deep, OWASP-mapped | Surface-level per category | Structural | | Permissions | Read-only | Read-only (sub) / RW (primary) | Read-write | | Output | Security report | Compliance report | Refactored code | | Blocking | Advisory (WARN) | FAIL blocks pipeline | Non-blocking |
The auditor's X (Security) section covers:
.env with real valuesSecurity-review goes deeper into each of these and adds:
session.migrate() called on loginSecure, HttpOnly, SameSite=Lax|Strict#[IsGranted] or voter)X-Platform-Internal-Token for internal calls|raw on user contentexec(), system(), shell_exec(), proc_open() with user input../random_bytes() or Symfony's UuidV4eval(), assert() with user inputX-Content-Type-Options: nosniff, X-Frame-OptionsAPP_DEBUG=0).env files not accessible via webcomposer audit)expose_php=Off, display_errors=Off| Severity | Criteria | Pipeline Impact | |----------|----------|-----------------| | CRITICAL | Exploitable without authentication, data breach risk, RCE | Flag for immediate coder attention | | HIGH | Exploitable with low-privilege access, privilege escalation, data leak | Flag for coder attention | | MEDIUM | Requires specific conditions to exploit, defense-in-depth gap | Report as recommendation | | LOW | Minor issue, best practice violation, theoretical risk | Report as improvement | | INFO | Observation, no direct security impact | Note for awareness |
From the delegation context:
|raw), docs, testsFor each changed file:
Focus on new code and modifications, not pre-existing issues (unless they are CRITICAL).
After per-file review:
composer audit output if availableframework.yamlsecurity.yamlUse the report format below. Include:
| Verdict | Condition | |---------|-----------| | PASS | Zero CRITICAL or HIGH findings | | WARN | Zero CRITICAL, but 1+ HIGH findings | | FAIL | Any CRITICAL finding |
# Security Review Report: <change-id>
## Date: YYYY-MM-DD
## Verdict: PASS | WARN | FAIL
## Summary
- CRITICAL: N | HIGH: N | MEDIUM: N | LOW: N | INFO: N
- Files reviewed: N
- OWASP ASVS categories covered: V2, V4, V5, ...
## Critical Findings
### [SEC-01] SQL Injection in UserRepository (CRITICAL)
- **File**: `src/Repository/UserRepository.php:42`
- **ASVS**: V5.3.4 — Verify that data selection or database queries use parameterized queries
- **Description**: Raw user input concatenated into DQL query
- **Evidence**: `$query = "SELECT u FROM User u WHERE u.name = '" . $name . "'"`
- **Recommendation**: Use QueryBuilder parameter binding: `->setParameter('name', $name)`
## High Findings
### [SEC-02] Missing CSRF on Delete Action (HIGH)
- **File**: `src/Controller/AgentController.php:87`
- **ASVS**: V13.2.3 — Verify that anti-CSRF mechanisms protect state-changing operations
- **Description**: DELETE action lacks CSRF token validation
- **Recommendation**: Add `#[IsCsrfTokenValid]` attribute or validate token manually
## Medium Findings
(...)
## Low / Info Findings
(...)
## Recommendations (Prioritized)
1. **[SEC-01]** Fix SQL injection — immediate
2. **[SEC-02]** Add CSRF protection — before next release
3. ...
exec(), system(), shell_exec(), passthru(), proc_open(), popen()
eval(), assert(), preg_replace() with /e modifier
unserialize() with user input
file_get_contents() with user-controlled URL
include/require with user-controlled path
|raw filter in Twig templates (XSS risk)#[IsGranted] on controller actions$request->get() without validation (use typed DTO or Form)NativeQuery or raw SQL in Doctrine (prefer DQL/QueryBuilder)csrf_protection: true in form type)kernel.debug or APP_DEBUG in production configconfig/packages/security.yaml — firewalls, access control, password hashersconfig/packages/framework.yaml — session config, CSRF.env / .env.local — no secrets in committed filesdocker/*/Dockerfile — no secrets in build argscompose.yaml — no secrets in environment variables| What | URL/Path | |------|----------| | OWASP ASVS 5.0 | https://owasp.org/www-project-application-security-verification-standard/ | | OWASP Code Review Guide | https://owasp.org/www-project-code-review-guide/ | | Symfony Security Docs | https://symfony.com/doc/current/security.html | | Symfony CSRF Protection | https://symfony.com/doc/current/security/csrf.html | | OWASP PHP Config Cheat Sheet | https://cheatsheetseries.owasp.org/cheatsheets/PHP_Configuration_Cheat_Sheet.html | | Doctrine Security | https://www.doctrine-project.org/projects/doctrine-orm/en/current/reference/security.html |
| Resource | Path |
|----------|------|
| Security config | apps/core/config/packages/security.yaml |
| Framework config | apps/core/config/packages/framework.yaml |
| Controllers | apps/*/src/Controller/ |
| Forms | apps/*/src/Form/ |
| Voters | apps/*/src/Security/Voter/ |
| Repositories | apps/*/src/Repository/ |
| Twig templates | apps/*/templates/ |
| Docker configs | docker/*/Dockerfile |
| Compose config | compose.yaml, compose.core.yaml |
development
Convert a website or page with related links into a local collection of Markdown files with an index. Follows project docs conventions (ua/en bilingual structure). Uses WebFetch — no external dependencies. Triggers on: "web to docs", "website to markdown", "save docs locally", "convert site", "download docs", "fetch docs", "scrape to markdown".
documentation
Translation agent for ua/en bilingual content. Handles UI labels, help text, error messages, docs, and agent/system prompts. Finds translatable elements, detects supported languages, translates by context, maintains term consistency. Triggers on: "translate", "translation", "i18n", "missing translations", "mirror docs", "sync languages".
development
Security review agent for PHP/Symfony codebase. Performs manual-style security review with OWASP ASVS 5.0 category mapping, severity ratings, and PHP/Symfony-specific checklist. Triggers on: "security review", "security audit", "vulnerability check", "OWASP review", "pentest review", "security scan".
development
Auto-bump pipeline monitor version when builder/monitor/pipeline-monitor.sh is modified. Triggers automatically as a post-edit convention — not user-invocable directly. When any change is made to pipeline-monitor.sh, increment the patch version in the "# Version:" header comment. Triggers on: "pipeline-monitor", "monitor version", "bump monitor".