senior-security
Security engineering toolkit for threat modeling, vulnerability analysis, secure architecture, and penetration testing. Includes STRIDE analysis, OWASP guidance, cryptography patterns, and security scanning tools. Use when the user asks about security reviews, threat analysis, vulnerability assessments, secure coding practices, security audits, attack surface analysis, CVE remediation, or security best practices.
What this skill does
# Senior Security Engineer Security engineering tools for threat modeling, vulnerability analysis, secure architecture design, and penetration testing. --- ## Table of Contents - [Threat Modeling Workflow](#threat-modeling-workflow) - [Security Architecture Workflow](#security-architecture-workflow) - [Vulnerability Assessment Workflow](#vulnerability-assessment-workflow) - [Secure Code Review Workflow](#secure-code-review-workflow) - [Incident Response Workflow](#incident-response-workflow) - [Security Tools Reference](#security-tools-reference) - [Tools and References](#tools-and-references) --- ## Threat Modeling Workflow Identify and analyze security threats using STRIDE methodology. ### Workflow: Conduct Threat Model 1. Define system scope and boundaries: - Identify assets to protect - Map trust boundaries - Document data flows 2. Create data flow diagram: - External entities (users, services) - Processes (application components) - Data stores (databases, caches) - Data flows (APIs, network connections) 3. Apply STRIDE to each DFD element (see [STRIDE per Element Matrix](#stride-per-element-matrix) below) 4. Score risks using DREAD: - Damage potential (1-10) - Reproducibility (1-10) - Exploitability (1-10) - Affected users (1-10) - Discoverability (1-10) 5. Prioritize threats by risk score 6. Define mitigations for each threat 7. Document in threat model report 8. **Validation:** All DFD elements analyzed; STRIDE applied; threats scored; mitigations mapped ### STRIDE Threat Categories | Category | Security Property | Mitigation Focus | |----------|-------------------|------------------| | Spoofing | Authentication | MFA, certificates, strong auth | | Tampering | Integrity | Signing, checksums, validation | | Repudiation | Non-repudiation | Audit logs, digital signatures | | Information Disclosure | Confidentiality | Encryption, access controls | | Denial of Service | Availability | Rate limiting, redundancy | | Elevation of Privilege | Authorization | RBAC, least privilege | ### STRIDE per Element Matrix | DFD Element | S | T | R | I | D | E | |-------------|---|---|---|---|---|---| | External Entity | X | | X | | | | | Process | X | X | X | X | X | X | | Data Store | | X | X | X | X | | | Data Flow | | X | | X | X | | See: [references/threat-modeling-guide.md](references/threat-modeling-guide.md) --- ## Security Architecture Workflow Design secure systems using defense-in-depth principles. ### Workflow: Design Secure Architecture 1. Define security requirements: - Compliance requirements (GDPR, HIPAA, PCI-DSS) - Data classification (public, internal, confidential, restricted) - Threat model inputs 2. Apply defense-in-depth layers: - Perimeter: WAF, DDoS protection, rate limiting - Network: Segmentation, IDS/IPS, mTLS - Host: Patching, EDR, hardening - Application: Input validation, authentication, secure coding - Data: Encryption at rest and in transit 3. Implement Zero Trust principles: - Verify explicitly (every request) - Least privilege access (JIT/JEA) - Assume breach (segment, monitor) 4. Configure authentication and authorization: - Identity provider selection - MFA requirements - RBAC/ABAC model 5. Design encryption strategy: - Key management approach - Algorithm selection - Certificate lifecycle 6. Plan security monitoring: - Log aggregation - SIEM integration - Alerting rules 7. Document architecture decisions 8. **Validation:** Defense-in-depth layers defined; Zero Trust applied; encryption strategy documented; monitoring planned ### Defense-in-Depth Layers ``` Layer 1: PERIMETER WAF, DDoS mitigation, DNS filtering, rate limiting Layer 2: NETWORK Segmentation, IDS/IPS, network monitoring, VPN, mTLS Layer 3: HOST Endpoint protection, OS hardening, patching, logging Layer 4: APPLICATION Input validation, authentication, secure coding, SAST Layer 5: DATA Encryption at rest/transit, access controls, DLP, backup ``` ### Authentication Pattern Selection | Use Case | Recommended Pattern | |----------|---------------------| | Web application | OAuth 2.0 + PKCE with OIDC | | API authentication | JWT with short expiration + refresh tokens | | Service-to-service | mTLS with certificate rotation | | CLI/Automation | API keys with IP allowlisting | | High security | FIDO2/WebAuthn hardware keys | See: [references/security-architecture-patterns.md](references/security-architecture-patterns.md) --- ## Vulnerability Assessment Workflow Identify and remediate security vulnerabilities in applications. ### Workflow: Conduct Vulnerability Assessment 1. Define assessment scope: - In-scope systems and applications - Testing methodology (black box, gray box, white box) - Rules of engagement 2. Gather information: - Technology stack inventory - Architecture documentation - Previous vulnerability reports 3. Perform automated scanning: - SAST (static analysis) - DAST (dynamic analysis) - Dependency scanning - Secret detection 4. Conduct manual testing: - Business logic flaws - Authentication bypass - Authorization issues - Injection vulnerabilities 5. Classify findings by severity: - Critical: Immediate exploitation risk - High: Significant impact, easier to exploit - Medium: Moderate impact or difficulty - Low: Minor impact 6. Develop remediation plan: - Prioritize by risk - Assign owners - Set deadlines 7. Verify fixes and document 8. **Validation:** Scope defined; automated and manual testing complete; findings classified; remediation tracked For OWASP Top 10 vulnerability descriptions and testing guidance, refer to [owasp.org/Top10](https://owasp.org/Top10). ### Vulnerability Severity Matrix | Impact \ Exploitability | Easy | Moderate | Difficult | |-------------------------|------|----------|-----------| | Critical | Critical | Critical | High | | High | Critical | High | Medium | | Medium | High | Medium | Low | | Low | Medium | Low | Low | --- ## Secure Code Review Workflow Review code for security vulnerabilities before deployment. ### Workflow: Conduct Security Code Review 1. Establish review scope: - Changed files and functions - Security-sensitive areas (auth, crypto, input handling) - Third-party integrations 2. Run automated analysis: - SAST tools (Semgrep, CodeQL, Bandit) - Secret scanning - Dependency vulnerability check 3. Review authentication code: - Password handling (hashing, storage) - Session management - Token validation 4. Review authorization code: - Access control checks - RBAC implementation - Privilege boundaries 5. Review data handling: - Input validation - Output encoding - SQL query construction - File path handling 6. Review cryptographic code: - Algorithm selection - Key management - Random number generation 7. Document findings with severity 8. **Validation:** Automated scans passed; auth/authz reviewed; data handling checked; crypto verified; findings documented ### Security Code Review Checklist | Category | Check | Risk | |----------|-------|------| | Input Validation | All user input validated and sanitized | Injection | | Output Encoding | Context-appropriate encoding applied | XSS | | Authentication | Passwords hashed with Argon2/bcrypt | Credential theft | | Session | Secure cookie flags set (HttpOnly, Secure, SameSite) | Session hijacking | | Authorization | Server-side permission checks on all endpoints | Privilege escalation | | SQL | Parameterized queries used exclusively | SQL injection | | File Access | Path traversal sequences rejected | Path traversal | | Secrets | No hardcoded credentials or keys | Information disclosure | | Dependencies | Known vulnerable packages updated | Supply chain | | Logging | Sensitive data not logged | Information disclosure | ### Secure vs Insecure Patterns | Pattern | Issue | Secure Alternative | |---------|-----
Related in Security
mac-ops
IncludedComprehensive macOS workstation operations — diagnose kernel panics, identify failing drives, audit launchd startup items, decode wake reasons, triage TCC permission denials, manage APFS snapshots, recover from no-boot. Use for: Mac is slow, slow bootup, won't boot, kernel panic, kernel_task hot, mds_stores CPU, photoanalysisd, cloudd, login loop, gray screen, sleep wake failure, drive failing, IO errors, APFS snapshots eating space, Time Machine local snapshots, Spotlight indexing, launchd, LaunchAgent, LaunchDaemon, login items, TCC permissions, Full Disk Access, Screen Recording denied, Gatekeeper, quarantine, com.apple.quarantine, app is damaged, helper tool, /Library/PrivilegedHelperTools, pmset, wake reasons, dark wake, sysdiagnose, panic.ips, DiagnosticReports, configuration profile, MDM profile, remote diagnostics over SSH.
a11y-audit
IncludedRun accessibility audits on web projects combining automated scanning (axe-core, Lighthouse) with WCAG 2.1 AA compliance mapping, manual check guidance, and structured reporting. Output is configurable: markdown report only, markdown plus machine-readable JSON, or markdown plus issue tracker integration. Use this skill whenever the user mentions "accessibility audit", "a11y audit", "WCAG audit", "accessibility check", "compliance scan", or asks to check a web project for accessibility issues. Also trigger when the user wants to verify WCAG conformance or map findings to a specific standard (CAN-ASC-6.2, EN 301 549, ADA/AODA).
erpclaw
IncludedAI-native ERP system with self-extending OS. Full accounting, invoicing, inventory, purchasing, tax, billing, HR, payroll, advanced accounting (ASC 606/842, intercompany, consolidation), and financial reporting. 413 actions across 14 domains, 43 expansion modules. Constitutional guardrails, adversarial audit, schema migration. Double-entry GL, immutable audit trail, US GAAP.
assess
IncludedAssesses and rates quality 0-10 across multiple dimensions (correctness, maintainability, security, performance, testability, simplicity) with pros/cons analysis. Compares against project conventions and prior decisions from memory. Produces structured evaluation reports with actionable improvement suggestions. Use when evaluating code, designs, architectures, or comparing alternative approaches.
spring-boot-security-jwt
IncludedProvides JWT authentication and authorization patterns for Spring Boot 3.5.x covering token generation with JJWT, Bearer/cookie authentication, database/OAuth2 integration, and RBAC/permission-based access control using Spring Security 6.x. Use when implementing authentication or authorization in Spring Boot applications.
code-hardcode-audit
IncludedDetect hardcoded values, magic numbers, and leaked secrets. TRIGGERS - hardcode audit, magic numbers, PLR2004, secret scanning.