La interfaz está localizada; las descripciones y documentos de las Skills se traducen automáticamente con IA a su idioma. El código, los comandos, rutas y términos técnicos se mantienen en el original, y prevalece el documento del autor.
Explorar Skills
Datos e investigación · SKILL.md

security-ops

security-ops

Security audit orchestrator - parallel dependency, SAST and auth/config agents consolidated into an OWASP-mapped severity report, plus PHP 8, Twig and Craft CMS hardening references. Triggers on: security review, security audit, OWASP, XSS, SQL injection, CSRF, authentication, authorization, secrets management, input validation, vulnerability scan, dependen…

Independent GitHub snapshot · Automated classification · Original documentation governs

Documentación de la Skill

GitHub

name: security-ops description: "Security audit orchestrator - parallel dependency, SAST and auth/config agents consolidated into an OWASP-mapped severity report, plus PHP 8, Twig and Craft CMS hardening references. Triggers on: security review, security audit, OWASP, XSS, SQL injection, CSRF, authentication, authorization, secrets management, input validation, vulnerability scan, dependency audit, composer audit, PHP security, Twig escaping, template injection, Craft CMS security, devMode, allowAnonymous, security key, DDEV. Use when auditing or hardening an app before release - e.g. 'security review this PR', 'is this Twig |raw safe?', 'audit our Craft config for production', 'does this controller need allowAnonymous?', 'triage composer audit output', 'diff DDEV against production PHP settings'." license: MIT allowed-tools: "Read Edit Write Bash Glob Grep Agent TaskCreate TaskUpdate" metadata: author: claude-mods related-skills: auth-ops, testing-ops, debug-ops, monitoring-ops, craftcms-ops, ddev-ops, supply-chain-defense, laravel-ops

Security Operations

Orchestrator for security auditing. Detects project stack inline, dispatches three parallel audit agents (dependency, SAST, auth/config review), consolidates into a severity-ranked OWASP-mapped report. Ships one-topic references for PHP 8.x, Twig and Craft CMS 3/4/5.

Findings use OWASP Top 10:2025 IDs (https://top10.owasp.org/2025/), as the references do - write them A05:2025 so every report names its revision. 2025 renumbered the list (Injection A03 -> A05, Misconfiguration A05 -> A02, SSRF folded into A01, new A03 Supply Chain and A10 Exceptional Conditions); translate 2021-tagged reports through the crosswalk in references/audit-quickref.md, never by bare number.

Stack Routing

Load references by what T1 detects. Each is one topic, 300 lines or fewer, opens with a Contents list, and ends with a review checklist of ready-to-run rg patterns.

DetectedReferenceCovers
Any web appreferences/owasp-top10-a01-a05.mdA01-A05:2025: access control + SSRF, misconfig, supply chain, crypto, injection
references/owasp-top10-a06-a10.mdA06-A10:2025: design, authn, integrity, logging + alerting, exceptional conditions
references/audit-quickref.mdTriage sheet: 2025 table, 2021->2025 crosswalk, validation, secrets, grep patterns
references/secure-headers.mdCSP, HSTS, framing, referrer and permissions headers
Auth / crypto codereferences/auth-patterns.mdPassword hashing, sessions, JWT, OAuth2
references/auth-account-protection.mdMFA, rate limiting, lockout, password reset
references/crypto-patterns.mdAES-GCM, KDFs, signatures, key storage
PHP 8.x (composer.json)references/php-input-validation.mdRequest helpers, filter_var, type juggling, paths, mass assignment
references/php-sql-queries.mdQuery builder vs raw SQL, identifiers, PDO, element-query params
references/php-deserialisation.mdunserialize, JSON, phar, signed data
references/php-password-hashing.mdpassword_hash, Argon2id/bcrypt, legacy hashes, tokens
references/php-composer-supply-chain.mdcomposer audit, advisory blocking, allow-plugins, prod installs
Twigreferences/twig-escaping.mdAutoescape, context strategies, |raw, Craft output helpers
references/twig-template-injection.mdSSTI sinks, dynamic includes, Craft's sandbox, Twig floors
Craft CMS (craftcms/cms)references/craft-config-hardening.md.env, security key, devMode, production settings
references/craft-access-control.mdPermissions, allowAnonymous, require helpers, element auth
references/craft-csrf-forms.mdcsrfInput, hashed inputs, static caching, Blitz, Formie
references/craft-uploads-assets.mdAllowed types, private volumes, transform CVEs
references/craft-graphql-security.mdSchemas, tokens, limits, introspection, CORS
references/craft-advisories.mdSupport windows, exploited CVEs, triage, EOL mitigation
DDEV (.ddev/config.yaml)references/ddev-config-drift.mdLocal vs production PHP/Craft settings, data, ddev share; DDEV mechanics and a .ddev/ auditor: ddev-ops

Craft 3 and Craft 4 are past security end of life (2024-04-30 and 2026-04-30); any audit of one leads with that finding (craft-advisories.md).

Architecture

User requests security audit or mentions security concern
    |
    +---> T1: Detect (inline, fast)
    |       +---> Identify languages/frameworks in project
    |       +---> Check installed audit tools
    |       +---> Determine scope (changed files vs full codebase)
    |       +---> Present: detection summary + recommended audit
    |
    +---> T2: Audit (3 parallel agents, background)
    |       +---> Agent 1: Dependency Audit
    |       |       +---> Run pip-audit, npm audit, govulncheck, cargo audit, trivy
    |       |       +---> Report: CVE IDs, severity, affected + fix versions
    |       |
    |       +---> Agent 2: Code Pattern Scan (SAST)
    |       |       +---> Hardcoded secrets, injection, XSS, eval, shell, weak crypto
    |       |       +---> Report: file:line, pattern, severity, fix suggestion
    |       |
    |       +---> Agent 3: Auth & Config Review
    |       |       +---> Session, CSRF, CORS, CSP, JWT, OAuth, rate limiting, env vars
    |       |       +---> Report: finding, severity, OWASP category, remediation
    |       |
    |       +---> Consolidate: deduplicate, rank by severity, map to OWASP Top 10:2025
    |
    +---> T3: Remediate (dispatch general-purpose + skill preload, foreground + confirm)
            +---> Agent proposes specific fixes
            +---> Preflight: what changes, security impact, risk of breaking
            +---> User confirms
            +---> Apply fixes

Safety Tiers

OperationTierExecution
Detect languages/frameworksT1Inline
Check installed audit toolsT1Inline
Determine scope (changed vs all)T1Inline
Dependency vulnerability scanT2Agent 1 (bg)
Code pattern scan (SAST)T2Agent 2 (bg)
Auth & config reviewT2Agent 3 (bg)
Consolidate findingsT2Inline (after agents return)
Fix vulnerability in codeT3Skill-preloaded agent + confirm
Update vulnerable dependencyT3Skill-preloaded agent + confirm
Add security headersT3Skill-preloaded agent + confirm

T1: Detect - Run Inline

CheckCommand / Method
Python projectCheck for requirements.txt, pyproject.toml, Pipfile
Node.js projectCheck for package.json, package-lock.json
Go projectCheck for go.mod
Rust projectCheck for Cargo.toml
DockerCheck for Dockerfile, docker-compose.yml
PHP projectCheck for composer.json, composer.lock; PHP version from config.platform.php or require.php
Craft CMScraftcms/cms in composer.json; version via composer show craftcms/cms
Twig templatesfd -e twig, or .html files under templates/ in a Craft project
DDEVCheck for .ddev/config.yaml (run PHP tools via ddev composer / ddev exec)
composer availablewhich composer 2>/dev/null (composer audit needs 2.4+)
pip-audit availablewhich pip-audit 2>/dev/null
npm audit availablewhich npm 2>/dev/null
govulncheck availablewhich govulncheck 2>/dev/null
cargo-audit availablewhich cargo-audit 2>/dev/null
trivy availablewhich trivy 2>/dev/null
Scope: changed filesgit diff --name-only HEAD
Scope: full codebasefd -e py -e js -e ts -e go -e rs -e php -e twig

T2: Audit - Dispatch 3 Parallel Agents

All audit agents use model="sonnet", run_in_background=True. All are read-only - instruct them explicitly to never edit files.

Copy each prompt from references/audit-agent-prompts.md, filling the {...} slots from T1. What each agent does, so you can route and sanity-check its output:

AgentReads firstFindsReports
1 Dependency auditscripts/dependency-audit.sh; PHP: php-composer-supply-chain.md, Craft: craft-advisories.mdVulnerable packages via pip-audit, npm audit, govulncheck, cargo audit, trivy, composer audit --lockedSeverity-ranked table: package, version, CVE, fixed version, A03:2025
2 Code pattern scan (SAST)scripts/security-scan.sh, both owasp-top10-*.md; PHP/Twig refs when detectedInjection, SSRF, hardcoded secrets, weak crypto, unsafe deserialisation, fail-open exception handling; PHP/Twig checklist rg patternsfile:line, pattern, OWASP 2025 ID, severity, fix - grouped by category
3 Auth and config reviewauth-patterns.md, auth-account-protection.md, secure-headers.md; Craft/DDEV refs when detectedAuthn, authz, CSRF, CORS, headers, cookies, sessions, error handling; Craft and DDEV checklistsPASS/FAIL/N-A checklist, findings grouped by category

Consolidation

After all 3 agents return, consolidate inline:

  1. Deduplicate - Remove findings that appear in multiple agents (e.g., hardcoded secret found by both Agent 1 and Agent 2)
  2. Rank by severity:
    • Critical: Remote code execution, SQL injection, exposed secrets in production (incl. unserialize() of request data, Twig SSTI, a committed Craft security key, a Craft version inside a CISA-KEV-listed range)
    • High: XSS, broken auth, missing access control, known CVE with exploit (incl. Craft 3/4 past end of life, devMode on in production, $allowAnonymous = true on state-changing actions, an authorization check that fails open on exception)
    • Medium: Weak crypto, missing security headers, insecure defaults
    • Low: Informational, best practice suggestions, TODO items
  3. Map to OWASP Top 10:2025 - Tag each finding Axx:2025 <Category> (e.g. A05:2025 Injection). When merging with or diffing against an older report, translate its 2021 IDs through the crosswalk in references/audit-quickref.md - the same bare number means different categories in the two revisions
  4. Generate report (see Report Format below)

T3: Remediate - Skill-Preloaded Dispatch with Confirmation

When user wants to fix findings, dispatch a general-purpose agent preloaded with the relevant language -ops skill.

Language routing (same as perf-ops):

Finding TypeDispatchPreload
Python vulnerabilitygeneral-purposerelevant skills/python-*/SKILL.md by topic
Node.js/JS vulnerabilitygeneral-purposeskills/javascript-ops/SKILL.md
TypeScript vulnerabilitygeneral-purposeskills/typescript-ops/SKILL.md
Go vulnerabilitygeneral-purposeskills/go-ops/SKILL.md
Rust vulnerabilitygeneral-purposeskills/rust-ops/SKILL.md
SQL injection / DB securitygeneral-purposeskills/postgres-ops/SKILL.md
Craft CMS / Twig / PHPgeneral-purposeskills/craftcms-ops/SKILL.md + the matching php-, twig- or craft- reference here
Laravelgeneral-purposeskills/laravel-ops/SKILL.md
Composer / dependency supply chain (A03:2025)general-purposeskills/supply-chain-defense/SKILL.md
General / config / headersgeneral-purpose-

Dispatch with the T3 preflight prompt in references/audit-agent-prompts.md: the agent proposes changes, security impact, breakage risk, verification and revert first, and applies nothing until the user confirms.

Report Format

Write the report from the template in references/audit-agent-prompts.md (Report Format): scope, languages, OWASP revision: Top 10:2025, a per-category severity summary, findings by severity with file:line and OWASP 2025 ID, then passed checks.

Fallback: When Agents Are Unavailable

If agent dispatch fails, fall back to inline scanning:

  1. Run scripts/dependency-audit.sh directly via Bash
  2. Run scripts/security-scan.sh directly via Bash
  3. Manually check auth patterns using ripgrep
  4. Present combined results (less structured than agent-based audit)

Reference index: see Stack Routing at the top.

Scripts

ScriptPurpose
scripts/dependency-audit.shMulti-language dependency vulnerability scanner (pip-audit, npm, govulncheck, cargo, trivy, composer)
scripts/security-scan.shripgrep-based code pattern scanner (Python, JS, PHP, Twig, Craft config)

See Also

SkillWhen to Combine
auth-opsDeep authentication/authorization implementation patterns
craftcms-opsCraft content modelling, Twig, element queries, plugins - the "how", where this skill is the "how safely"
supply-chain-defenseBehavioural dependency scanning, release cooldowns, IOC matching - beyond composer audit
laravel-opsLaravel-specific remediation
testing-opsSecurity-focused test case generation
monitoring-opsSecurity event logging and alerting
debug-opsInvestigating security incidents
Skills guardadas