ddtcorex/maestro-skills/magento2-security-scan
- community
Checking that the SKILL.md file is still in the repository.
This skill should be used when the user asks to "run a security audit", "find vulnerabilities", "check for XSS", "check CSRF protection", "validate form security", "run a dependency audit", "check for outdated packages", "run a PCI compliance check", or "do a security review before deploy". Scans Magento 2 code for security vulnerabilities and compliance issues. DEPENDENT on magento2-dev-core for security patterns.
Install
npx vskill@latest install ddtcorex/maestro-skills/magento2-security-scanSKILL.md
Magento 2 Security Scanner
This skill performs security scanning for vulnerabilities, misconfigurations, and compliance issues.
Govard-Native Audit Coverage
govard audit run executes PHPCS and PHPStan through Govard's pinned lint toolchain image — it covers coding-standard and static-analysis findings only. As of Govard v1.64.0 no security audit check exists: govard audit run --checks security fails with "audit check ... is not implemented". The lint run does include a pub/media PHP guard since v1.64.0 — every PHP file under pub/media is flagged (M2-LINT-MEDIA) — so a lint pass also covers that specific file-drop attack surface, but it is still not a vulnerability scan. Run this skill's manual checklist yourself and treat govard audit run --checks lint as the shared lint gate. Never present a lint-only pass as a security verdict.
Related Skills
REQUIRED BACKGROUND: Load magento2-dev-core first — this skill scans for violations of the security patterns it defines (escaping, discouraged functions, ObjectManager misuse), and its patterns are what you fix findings with.
Part of the QA trio with magento2-linter (style/static analysis) and magento2-performance-audit (runtime/infrastructure). Re-check API/resolver-specific findings against magento2-backend-dev.
Vulnerability Categories
1. Injection Vulnerabilities
| Type | Pattern | Severity | Code | |
|---|---|---|---|---|
| SQL Injection | Direct SQL with user input | Critical | M2-SEC-001 | |
| XSS (Reflected) | Unescaped user input in output | High | M2-SEC-003 | |
| XSS (Stored) | Unescaped database content | Critical | M2-SEC-002 | |
| Command Injection | System command execution with user input | Critical | M2-SEC-004 |
Full scale and code catalogue: magento2-dev-core/references/severity-and-codes.md.
2. Authentication & Authorization
| Check | Command | |
|---|---|---|
| Admin path changed | Check env.php for custom admin path | |
| 2FA enabled | Check admin/twofactor module | |
| Password hashing | Verify EncryptorInterface usage | |
| Session security | Check cookie configuration |
3. Data Exposure
4. CSP Configuration
Scanner Commands
PHP Security Checker
Dependency Audit
File Permission Check
Scoping
The "Quick Security Scan" greps default to a full module path (app/code/Vendor/Module). Given an explicit file list instead, loop over it the same way:
magento2-code-review derives this file list from a git diff or an MR fetch and calls this skill with it directly — the git/glab mechanics themselves live there, not here.
Environment-level checks — scope boundary
Authentication & Authorization, Data Exposure, and CSP Configuration (sections 2-4 above) are not file-list-scoped at all — they check the running environment (env.php, a live URL, bin/magento config:get), not specific files. They cannot run against a PR/MR diff or remote fetch (no checked-out environment to query there) and, even at project/module scope, run once per audit rather than once per file. magento2-code-review states explicitly in its Coverage note whether these ran (project/module/ theme scope, live environment available) or were skipped (PR/MR scope, or no environment access this session) — this is never left for whoever's running the review to decide silently.
XSS Prevention Checklist
- [ ] All output escaped with
$escaper - [ ]
escapeHtmlfor HTML content - [ ]
escapeHtmlAttrfor attributes - [ ]
escapeJsfor JavaScript strings - [ ]
escapeUrlfor URLs - [ ] Form keys in all POST forms
- [ ] No direct
$_GET,$_POST,$_REQUESTusage
CSRF Protection
Verified Patterns
Verify Admin Protection
Rate Limiting
Security Headers
Check in nginx/Apache config or .htaccess:
PCI-DSS 4.0 Checklist (E-commerce)
From April 2025, payment pages require:
- [ ]
unsafe-evalCSP disabled - [ ]
unsafe-inlineCSP disabled - [ ] No inline scripts in payment forms
- [ ] TLS 1.2+ enforced
Quick Security Scan
Quick check: grep -R "\$_GET|\$_POST|ObjectManager::getInstance" --include="*.phtml" over the changed templates. Address high-risk hits first.
Run this for a rapid security assessment. Run one grep per pattern and exclude ORM-layer hits (Collection/Repository/ResourceModel class files) when judging results:
Compliance Report
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/magento2-security-scan/SKILL.md
Popularity
- Repository stars
- 4
- Repository forks
- 2
- 7-day trend score
- 8
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/ddtcorex/maestro-skills/magento2-security-scan)