Coordinate multi-layer security scanning and hardening across application, infrastructure, and compliance controls.
Add this skill
npx mdskills install sickn33/security-scanning-security-hardeningComprehensive multi-phase security orchestration with detailed tool prompts and clear success criteria
1---2name: security-scanning-security-hardening3description: "Coordinate multi-layer security scanning and hardening across application, infrastructure, and compliance controls."4---56Implement comprehensive security hardening with defense-in-depth strategy through coordinated multi-agent orchestration:78[Extended thinking: This workflow implements a defense-in-depth security strategy across all application layers. It coordinates specialized security agents to perform comprehensive assessments, implement layered security controls, and establish continuous security monitoring. The approach follows modern DevSecOps principles with shift-left security, automated scanning, and compliance validation. Each phase builds upon previous findings to create a resilient security posture that addresses both current vulnerabilities and future threats.]910## Use this skill when1112- Running a coordinated security hardening program13- Establishing defense-in-depth controls across app, infra, and CI/CD14- Prioritizing remediation from scans and threat modeling1516## Do not use this skill when1718- You only need a quick scan without remediation work19- You lack authorization for security testing or changes20- The environment cannot tolerate invasive security controls2122## Instructions23241. Execute Phase 1 to establish a security baseline.252. Apply Phase 2 remediations for high-risk issues.263. Implement Phase 3 controls and validate defenses.274. Complete Phase 4 validation and compliance checks.2829## Safety3031- Avoid intrusive testing in production without approval.32- Ensure rollback plans exist before hardening changes.3334## Phase 1: Comprehensive Security Assessment3536### 1. Initial Vulnerability Scanning37- Use Task tool with subagent_type="security-auditor"38- Prompt: "Perform comprehensive security assessment on: $ARGUMENTS. Execute SAST analysis with Semgrep/SonarQube, DAST scanning with OWASP ZAP, dependency audit with Snyk/Trivy, secrets detection with GitLeaks/TruffleHog. Generate SBOM for supply chain analysis. Identify OWASP Top 10 vulnerabilities, CWE weaknesses, and CVE exposures."39- Output: Detailed vulnerability report with CVSS scores, exploitability analysis, attack surface mapping, secrets exposure report, SBOM inventory40- Context: Initial baseline for all remediation efforts4142### 2. Threat Modeling and Risk Analysis43- Use Task tool with subagent_type="security-auditor"44- Prompt: "Conduct threat modeling using STRIDE methodology for: $ARGUMENTS. Analyze attack vectors, create attack trees, assess business impact of identified vulnerabilities. Map threats to MITRE ATT&CK framework. Prioritize risks based on likelihood and impact."45- Output: Threat model diagrams, risk matrix with prioritized vulnerabilities, attack scenario documentation, business impact analysis46- Context: Uses vulnerability scan results to inform threat priorities4748### 3. Architecture Security Review49- Use Task tool with subagent_type="backend-api-security::backend-architect"50- Prompt: "Review architecture for security weaknesses in: $ARGUMENTS. Evaluate service boundaries, data flow security, authentication/authorization architecture, encryption implementation, network segmentation. Design zero-trust architecture patterns. Reference threat model and vulnerability findings."51- Output: Security architecture assessment, zero-trust design recommendations, service mesh security requirements, data classification matrix52- Context: Incorporates threat model to address architectural vulnerabilities5354## Phase 2: Vulnerability Remediation5556### 4. Critical Vulnerability Fixes57- Use Task tool with subagent_type="security-auditor"58- Prompt: "Coordinate immediate remediation of critical vulnerabilities (CVSS 7+) in: $ARGUMENTS. Fix SQL injections with parameterized queries, XSS with output encoding, authentication bypasses with secure session management, insecure deserialization with input validation. Apply security patches for CVEs."59- Output: Patched code with vulnerability fixes, security patch documentation, regression test requirements60- Context: Addresses high-priority items from vulnerability assessment6162### 5. Backend Security Hardening63- Use Task tool with subagent_type="backend-api-security::backend-security-coder"64- Prompt: "Implement comprehensive backend security controls for: $ARGUMENTS. Add input validation with OWASP ESAPI, implement rate limiting and DDoS protection, secure API endpoints with OAuth2/JWT validation, add encryption for data at rest/transit using AES-256/TLS 1.3. Implement secure logging without PII exposure."65- Output: Hardened API endpoints, validation middleware, encryption implementation, secure configuration templates66- Context: Builds upon vulnerability fixes with preventive controls6768### 6. Frontend Security Implementation69- Use Task tool with subagent_type="frontend-mobile-security::frontend-security-coder"70- Prompt: "Implement frontend security measures for: $ARGUMENTS. Configure CSP headers with nonce-based policies, implement XSS prevention with DOMPurify, secure authentication flows with PKCE OAuth2, add SRI for external resources, implement secure cookie handling with SameSite/HttpOnly/Secure flags."71- Output: Secure frontend components, CSP policy configuration, authentication flow implementation, security headers configuration72- Context: Complements backend security with client-side protections7374### 7. Mobile Security Hardening75- Use Task tool with subagent_type="frontend-mobile-security::mobile-security-coder"76- Prompt: "Implement mobile app security for: $ARGUMENTS. Add certificate pinning, implement biometric authentication, secure local storage with encryption, obfuscate code with ProGuard/R8, implement anti-tampering and root/jailbreak detection, secure IPC communications."77- Output: Hardened mobile application, security configuration files, obfuscation rules, certificate pinning implementation78- Context: Extends security to mobile platforms if applicable7980## Phase 3: Security Controls Implementation8182### 8. Authentication and Authorization Enhancement83- Use Task tool with subagent_type="security-auditor"84- Prompt: "Implement modern authentication system for: $ARGUMENTS. Deploy OAuth2/OIDC with PKCE, implement MFA with TOTP/WebAuthn/FIDO2, add risk-based authentication, implement RBAC/ABAC with principle of least privilege, add session management with secure token rotation."85- Output: Authentication service configuration, MFA implementation, authorization policies, session management system86- Context: Strengthens access controls based on architecture review8788### 9. Infrastructure Security Controls89- Use Task tool with subagent_type="deployment-strategies::deployment-engineer"90- Prompt: "Deploy infrastructure security controls for: $ARGUMENTS. Configure WAF rules for OWASP protection, implement network segmentation with micro-segmentation, deploy IDS/IPS systems, configure cloud security groups and NACLs, implement DDoS protection with rate limiting and geo-blocking."91- Output: WAF configuration, network security policies, IDS/IPS rules, cloud security configurations92- Context: Implements network-level defenses9394### 10. Secrets Management Implementation95- Use Task tool with subagent_type="deployment-strategies::deployment-engineer"96- Prompt: "Implement enterprise secrets management for: $ARGUMENTS. Deploy HashiCorp Vault or AWS Secrets Manager, implement secret rotation policies, remove hardcoded secrets, configure least-privilege IAM roles, implement encryption key management with HSM support."97- Output: Secrets management configuration, rotation policies, IAM role definitions, key management procedures98- Context: Eliminates secrets exposure vulnerabilities99100## Phase 4: Validation and Compliance101102### 11. Penetration Testing and Validation103- Use Task tool with subagent_type="security-auditor"104- Prompt: "Execute comprehensive penetration testing for: $ARGUMENTS. Perform authenticated and unauthenticated testing, API security testing, business logic testing, privilege escalation attempts. Use Burp Suite, Metasploit, and custom exploits. Validate all security controls effectiveness."105- Output: Penetration test report, proof-of-concept exploits, remediation validation, security control effectiveness metrics106- Context: Validates all implemented security measures107108### 12. Compliance and Standards Verification109- Use Task tool with subagent_type="security-auditor"110- Prompt: "Verify compliance with security frameworks for: $ARGUMENTS. Validate against OWASP ASVS Level 2, CIS Benchmarks, SOC2 Type II requirements, GDPR/CCPA privacy controls, HIPAA/PCI-DSS if applicable. Generate compliance attestation reports."111- Output: Compliance assessment report, gap analysis, remediation requirements, audit evidence collection112- Context: Ensures regulatory and industry standard compliance113114### 13. Security Monitoring and SIEM Integration115- Use Task tool with subagent_type="incident-response::devops-troubleshooter"116- Prompt: "Implement security monitoring and SIEM for: $ARGUMENTS. Deploy Splunk/ELK/Sentinel integration, configure security event correlation, implement behavioral analytics for anomaly detection, set up automated incident response playbooks, create security dashboards and alerting."117- Output: SIEM configuration, correlation rules, incident response playbooks, security dashboards, alert definitions118- Context: Establishes continuous security monitoring119120## Configuration Options121- scanning_depth: "quick" | "standard" | "comprehensive" (default: comprehensive)122- compliance_frameworks: ["OWASP", "CIS", "SOC2", "GDPR", "HIPAA", "PCI-DSS"]123- remediation_priority: "cvss_score" | "exploitability" | "business_impact"124- monitoring_integration: "splunk" | "elastic" | "sentinel" | "custom"125- authentication_methods: ["oauth2", "saml", "mfa", "biometric", "passwordless"]126127## Success Criteria128- All critical vulnerabilities (CVSS 7+) remediated129- OWASP Top 10 vulnerabilities addressed130- Zero high-risk findings in penetration testing131- Compliance frameworks validation passed132- Security monitoring detecting and alerting on threats133- Incident response time < 15 minutes for critical alerts134- SBOM generated and vulnerabilities tracked135- All secrets managed through secure vault136- Authentication implements MFA and secure session management137- Security tests integrated into CI/CD pipeline138139## Coordination Notes140- Each phase provides detailed findings that inform subsequent phases141- Security-auditor agent coordinates with domain-specific agents for fixes142- All code changes undergo security review before implementation143- Continuous feedback loop between assessment and remediation144- Security findings tracked in centralized vulnerability management system145- Regular security reviews scheduled post-implementation146147Security hardening target: $ARGUMENTS148
Full transparency — inspect the skill content before installing.