[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M777SD1P2SQ1GTD211ZVG855":3,"skill-same:01M777SD1P2SQ1GTD211ZVG855":83},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":37,"commitSha":38,"skillDirectory":39,"forksCount":40,"repositoryHtmlUrl":41,"repositoryHomepageUrl":6,"ownerHtmlUrl":42,"ownerBlogUrl":43,"ownerDescription":6,"updatedAt":44,"install":45,"resources":58},"01M777SD1P2SQ1GTD211ZVG855","senior-security",null,"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.","kruxshnx\u002Fclaude-skills-devin","kruxshnx","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F127938788?v=4","01M757YM3F96N4K1BSE7Z0NQK7","ARJANGI GOVINDA KRISHNA","01M757YM43H5T7MP2B3DC13GZ2",2,"MIT","https:\u002F\u002Fgithub.com\u002Fkruxshnx\u002Fclaude-skills-devin\u002Fblob\u002Fdevin\u002F1780503568-install-devin-skills\u002Fengineering-team\u002Fskills\u002Fsenior-security\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: \"senior-security\"\ndescription: 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.\ntriggers:\n  - security architecture\n  - threat modeling\n  - STRIDE analysis\n  - penetration testing\n  - vulnerability assessment\n  - secure coding\n  - OWASP\n  - application security\n  - cryptography implementation\n  - secret scanning\n  - security audit\n  - zero trust\n---\n\n# Senior Security Engineer\n\nSecurity engineering tools for threat modeling, vulnerability analysis, secure architecture design, and penetration testing.\n\n---\n\n## Table of Contents\n\n- [Threat Modeling Workflow](#threat-modeling-workflow)\n- [Security Architecture Workflow](#security-architecture-workflow)\n- [Vulnerability Assessment Workflow](#vulnerability-assessment-workflow)\n- [Secure Code Review Workflow](#secure-code-review-workflow)\n- [Incident Response Workflow](#incident-response-workflow)\n- [Security Tools Reference](#security-tools-reference)\n- [Tools and References](#tools-and-references)\n\n---\n\n## Threat Modeling Workflow\n\nIdentify and analyze security threats using STRIDE methodology.\n\n### Workflow: Conduct Threat Model\n\n1. Define system scope and boundaries:\n   - Identify assets to protect\n   - Map trust boundaries\n   - Document data flows\n2. Create data flow diagram:\n   - External entities (users, services)\n   - Processes (application components)\n   - Data stores (databases, caches)\n   - Data flows (APIs, network connections)\n3. Apply STRIDE to each DFD element (see [STRIDE per Element Matrix](#stride-per-element-matrix) below)\n4. Score risks using DREAD:\n   - Damage potential (1-10)\n   - Reproducibility (1-10)\n   - Exploitability (1-10)\n   - Affected users (1-10)\n   - Discoverability (1-10)\n5. Prioritize threats by risk score\n6. Define mitigations for each threat\n7. Document in threat model report\n8. **Validation:** All DFD elements analyzed; STRIDE applied; threats scored; mitigations mapped\n\n### STRIDE Threat Categories\n\n| Category | Security Property | Mitigation Focus |\n|----------|-------------------|------------------|\n| Spoofing | Authentication | MFA, certificates, strong auth |\n| Tampering | Integrity | Signing, checksums, validation |\n| Repudiation | Non-repudiation | Audit logs, digital signatures |\n| Information Disclosure | Confidentiality | Encryption, access controls |\n| Denial of Service | Availability | Rate limiting, redundancy |\n| Elevation of Privilege | Authorization | RBAC, least privilege |\n\n### STRIDE per Element Matrix\n\n| DFD Element | S | T | R | I | D | E |\n|-------------|---|---|---|---|---|---|\n| External Entity | X | | X | | | |\n| Process | X | X | X | X | X | X |\n| Data Store | | X | X | X | X | |\n| Data Flow | | X | | X | X | |\n\nSee: [references\u002Fthreat-modeling-guide.md](references\u002Fthreat-modeling-guide.md)\n\n---\n\n## Security Architecture Workflow\n\nDesign secure systems using defense-in-depth principles.\n\n### Workflow: Design Secure Architecture\n\n1. Define security requirements:\n   - Compliance requirements (GDPR, HIPAA, PCI-DSS)\n   - Data classification (public, internal, confidential, restricted)\n   - Threat model inputs\n2. Apply defense-in-depth layers:\n   - Perimeter: WAF, DDoS protection, rate limiting\n   - Network: Segmentation, IDS\u002FIPS, mTLS\n   - Host: Patching, EDR, hardening\n   - Application: Input validation, authentication, secure coding\n   - Data: Encryption at rest and in transit\n3. Implement Zero Trust principles:\n   - Verify explicitly (every request)\n   - Least privilege access (JIT\u002FJEA)\n   - Assume breach (segment, monitor)\n4. Configure authentication and authorization:\n   - Identity provider selection\n   - MFA requirements\n   - RBAC\u002FABAC model\n5. Design encryption strategy:\n   - Key management approach\n   - Algorithm selection\n   - Certificate lifecycle\n6. Plan security monitoring:\n   - Log aggregation\n   - SIEM integration\n   - Alerting rules\n7. Document architecture decisions\n8. **Validation:** Defense-in-depth layers defined; Zero Trust applied; encryption strategy documented; monitoring planned\n\n### Defense-in-Depth Layers\n\n```\nLayer 1: PERIMETER\n  WAF, DDoS mitigation, DNS filtering, rate limiting\n\nLayer 2: NETWORK\n  Segmentation, IDS\u002FIPS, network monitoring, VPN, mTLS\n\nLayer 3: HOST\n  Endpoint protection, OS hardening, patching, logging\n\nLayer 4: APPLICATION\n  Input validation, authentication, secure coding, SAST\n\nLayer 5: DATA\n  Encryption at rest\u002Ftransit, access controls, DLP, backup\n```\n\n### Authentication Pattern Selection\n\n| Use Case | Recommended Pattern |\n|----------|---------------------|\n| Web application | OAuth 2.0 + PKCE with OIDC |\n| API authentication | JWT with short expiration + refresh tokens |\n| Service-to-service | mTLS with certificate rotation |\n| CLI\u002FAutomation | API keys with IP allowlisting |\n| High security | FIDO2\u002FWebAuthn hardware keys |\n\nSee: [references\u002Fsecurity-architecture-patterns.md](references\u002Fsecurity-architecture-patterns.md)\n\n---\n\n## Vulnerability Assessment Workflow\n\nIdentify and remediate security vulnerabilities in applications.\n\n### Workflow: Conduct Vulnerability Assessment\n\n1. Define assessment scope:\n   - In-scope systems and applications\n   - Testing methodology (black box, gray box, white box)\n   - Rules of engagement\n2. Gather information:\n   - Technology stack inventory\n   - Architecture documentation\n   - Previous vulnerability reports\n3. Perform automated scanning:\n   - SAST (static analysis)\n   - DAST (dynamic analysis)\n   - Dependency scanning\n   - Secret detection\n4. Conduct manual testing:\n   - Business logic flaws\n   - Authentication bypass\n   - Authorization issues\n   - Injection vulnerabilities\n5. Classify findings by severity:\n   - Critical: Immediate exploitation risk\n   - High: Significant impact, easier to exploit\n   - Medium: Moderate impact or difficulty\n   - Low: Minor impact\n6. Develop remediation plan:\n   - Prioritize by risk\n   - Assign owners\n   - Set deadlines\n7. Verify fixes and document\n8. **Validation:** Scope defined; automated and manual testing complete; findings classified; remediation tracked\n\nFor OWASP Top 10 vulnerability descriptions and testing guidance, refer to [owasp.org\u002FTop10](https:\u002F\u002Fowasp.org\u002FTop10).\n\n### Vulnerability Severity Matrix\n\n| Impact \\ Exploitability | Easy | Moderate | Difficult |\n|-------------------------|------|----------|-----------|\n| Critical | Critical | Critical | High |\n| High | Critical | High | Medium |\n| Medium | High | Medium | Low |\n| Low | Medium | Low | Low |\n\n---\n\n## Secure Code Review Workflow\n\nReview code for security vulnerabilities before deployment.\n\n### Workflow: Conduct Security Code Review\n\n1. Establish review scope:\n   - Changed files and functions\n   - Security-sensitive areas (auth, crypto, input handling)\n   - Third-party integrations\n2. Run automated analysis:\n   - SAST tools (Semgrep, CodeQL, Bandit)\n   - Secret scanning\n   - Dependency vulnerability check\n3. Review authentication code:\n   - Password handling (hashing, storage)\n   - Session management\n   - Token validation\n4. Review authorization code:\n   - Access control checks\n   - RBAC implementation\n   - Privilege boundaries\n5. Review data handling:\n   - Input validation\n   - Output encoding\n   - SQL query construction\n   - File path handling\n6. Review cryptographic code:\n   - Algorithm selection\n   - Key management\n   - Random number generation\n7. Document findings with severity\n8. **Validation:** Automated scans passed; auth\u002Fauthz reviewed; data handling checked; crypto verified; findings documented\n\n### Security Code Review Checklist\n\n| Category | Check | Risk |\n|----------|-------|------|\n| Input Validation | All user input validated and sanitized | Injection |\n| Output Encoding | Context-appropriate encoding applied | XSS |\n| Authentication | Passwords hashed with Argon2\u002Fbcrypt | Credential theft |\n| Session | Secure cookie flags set (HttpOnly, Secure, SameSite) | Session hijacking |\n| Authorization | Server-side permission checks on all endpoints | Privilege escalation |\n| SQL | Parameterized queries used exclusively | SQL injection |\n| File Access | Path traversal sequences rejected | Path traversal |\n| Secrets | No hardcoded credentials or keys | Information disclosure |\n| Dependencies | Known vulnerable packages updated | Supply chain |\n| Logging | Sensitive data not logged | Information disclosure |\n\n### Secure vs Insecure Patterns\n\n| Pattern | Issue | Secure Alternative |\n|---------|-------|-------------------|\n| SQL string formatting | SQL injection | Use parameterized queries with placeholders |\n| Shell command building | Command injection | Use subprocess with argument lists, no shell |\n| Path concatenation | Path traversal | Validate and canonicalize paths |\n| MD5\u002FSHA1 for passwords | Weak hashing | Use Argon2id or bcrypt |\n| Math.random for tokens | Predictable values | Use crypto.getRandomValues |\n\n### Inline Code Examples\n\n**SQL Injection — insecure vs. secure (Python):**\n\n```python\n# ❌ Insecure: string formatting allows SQL injection\nquery = f\"SELECT * FROM users WHERE username = '{username}'\"\ncursor.execute(query)\n\n# ✅ Secure: parameterized query — user input never interpreted as SQL\nquery = \"SELECT * FROM users WHERE username = %s\"\ncursor.execute(query, (username,))\n```\n\n**Password Hashing with Argon2id (Python):**\n\n```python\nfrom argon2 import PasswordHasher\n\nph = PasswordHasher()          # uses secure defaults (time_cost, memory_cost)\n\n# On registration\nhashed = ph.hash(plain_password)\n\n# On login — raises argon2.exceptions.VerifyMismatchError on failure\nph.verify(hashed, plain_password)\n```\n\n**Secret Scanning — core pattern matching (Python):**\n\n```python\nimport re, pathlib\n\nSECRET_PATTERNS = {\n    \"aws_access_key\":  re.compile(r\"AKIA[0-9A-Z]{16}\"),\n    \"github_token\":    re.compile(r\"ghp_[A-Za-z0-9]{36}\"),\n    \"private_key\":     re.compile(r\"-----BEGIN (RSA |EC )?PRIVATE KEY-----\"),\n    \"generic_secret\":  re.compile(r'(?i)(password|secret|api_key)\\s*=\\s*[\"\\']?\\S{8,}'),\n}\n\ndef scan_file(path: pathlib.Path) -> list[dict]:\n    findings = []\n    for lineno, line in enumerate(path.read_text(errors=\"replace\").splitlines(), 1):\n        for name, pattern in SECRET_PATTERNS.items():\n            if pattern.search(line):\n                findings.append({\"file\": str(path), \"line\": lineno, \"type\": name})\n    return findings\n```\n\n---\n\n## Incident Response Workflow\n\nRespond to and contain security incidents.\n\n### Workflow: Handle Security Incident\n\n1. Identify and triage:\n   - Validate incident is genuine\n   - Assess initial scope and severity\n   - Activate incident response team\n2. Contain the threat:\n   - Isolate affected systems\n   - Block malicious IPs\u002Faccounts\n   - Disable compromised credentials\n3. Eradicate root cause:\n   - Remove malware\u002Fbackdoors\n   - Patch vulnerabilities\n   - Update configurations\n4. Recover operations:\n   - Restore from clean backups\n   - Verify system integrity\n   - Monitor for recurrence\n5. Conduct post-mortem:\n   - Timeline reconstruction\n   - Root cause analysis\n   - Lessons learned\n6. Implement improvements:\n   - Update detection rules\n   - Enhance controls\n   - Update runbooks\n7. Document and report\n8. **Validation:** Threat contained; root cause eliminated; systems recovered; post-mortem complete; improvements implemented\n\n### Incident Severity Levels\n\n| Level | Response Time | Escalation |\n|-------|---------------|------------|\n| P1 - Critical (active breach\u002Fexfiltration) | Immediate | CISO, Legal, Executive |\n| P2 - High (confirmed, contained) | 1 hour | Security Lead, IT Director |\n| P3 - Medium (potential, under investigation) | 4 hours | Security Team |\n| P4 - Low (suspicious, low impact) | 24 hours | On-call engineer |\n\n### Incident Response Checklist\n\n| Phase | Actions |\n|-------|---------|\n| Identification | Validate alert, assess scope, determine severity |\n| Containment | Isolate systems, preserve evidence, block access |\n| Eradication | Remove threat, patch vulnerabilities, reset credentials |\n| Recovery | Restore services, verify integrity, increase monitoring |\n| Lessons Learned | Document timeline, identify gaps, update procedures |\n\n---\n\n## Security Tools Reference\n\n### Recommended Security Tools\n\n| Category | Tools |\n|----------|-------|\n| SAST | Semgrep, CodeQL, Bandit (Python), ESLint security plugins |\n| DAST | OWASP ZAP, Burp Suite, Nikto |\n| Dependency Scanning | Snyk, Dependabot, npm audit, pip-audit |\n| Secret Detection | GitLeaks, TruffleHog, detect-secrets |\n| Container Security | Trivy, Clair, Anchore |\n| Infrastructure | Checkov, tfsec, ScoutSuite |\n| Network | Wireshark, Nmap, Masscan |\n| Penetration | Metasploit, sqlmap, Burp Suite Pro |\n\n### Cryptographic Algorithm Selection\n\n| Use Case | Algorithm | Key Size |\n|----------|-----------|----------|\n| Symmetric encryption | AES-256-GCM | 256 bits |\n| Password hashing | Argon2id | N\u002FA (use defaults) |\n| Message authentication | HMAC-SHA256 | 256 bits |\n| Digital signatures | Ed25519 | 256 bits |\n| Key exchange | X25519 | 256 bits |\n| TLS | TLS 1.3 | N\u002FA |\n\nSee: [references\u002Fcryptography-implementation.md](references\u002Fcryptography-implementation.md)\n\n---\n\n## Tools and References\n\n### Scripts\n\n| Script | Purpose |\n|--------|---------|\n| [threat_modeler.py](scripts\u002Fthreat_modeler.py) | STRIDE threat analysis with DREAD risk scoring; JSON and text output; interactive guided mode |\n| [secret_scanner.py](scripts\u002Fsecret_scanner.py) | Detect hardcoded secrets and credentials across 20+ patterns; CI\u002FCD integration ready |\n\nFor usage, see the inline code examples in [Secure Code Review Workflow](#inline-code-examples) and the script source files directly.\n\n### References\n\n| Document | Content |\n|----------|---------|\n| [security-architecture-patterns.md](references\u002Fsecurity-architecture-patterns.md) | Zero Trust, defense-in-depth, authentication patterns, API security |\n| [threat-modeling-guide.md](references\u002Fthreat-modeling-guide.md) | STRIDE methodology, attack trees, DREAD scoring, DFD creation |\n| [cryptography-implementation.md](references\u002Fcryptography-implementation.md) | AES-GCM, RSA, Ed25519, password hashing, key management |\n\n---\n\n## Security Standards Reference\n\n### Security Headers Checklist\n\n| Header | Recommended Value |\n|--------|-------------------|\n| Content-Security-Policy | default-src self; script-src self |\n| X-Frame-Options | DENY |\n| X-Content-Type-Options | nosniff |\n| Strict-Transport-Security | max-age=31536000; includeSubDomains |\n| Referrer-Policy | strict-origin-when-cross-origin |\n| Permissions-Policy | geolocation=(), microphone=(), camera=() |\n\nFor compliance framework requirements (OWASP ASVS, CIS Benchmarks, NIST CSF, PCI-DSS, HIPAA, SOC 2), refer to the respective official documentation.\n\n---\n\n## Related Skills\n\n| Skill | Integration Point |\n|-------|-------------------|\n| [senior-devops](..\u002Fsenior-devops\u002F) | CI\u002FCD security, infrastructure hardening |\n| [senior-secops](..\u002Fsenior-secops\u002F) | Security monitoring, incident response |\n| [senior-backend](..\u002Fsenior-backend\u002F) | Secure API development |\n| [senior-architect](..\u002Fsenior-architect\u002F) | Security architecture decisions |\n","# Senior Security Engineer\n\nSecurity engineering tools for threat modeling, vulnerability analysis, secure architecture design, and penetration testing.\n\n---\n\n## Table of Contents\n\n- [Threat Modeling Workflow](#threat-modeling-workflow)\n- [Security Architecture Workflow](#security-architecture-workflow)\n- [Vulnerability Assessment Workflow](#vulnerability-assessment-workflow)\n- [Secure Code Review Workflow](#secure-code-review-workflow)\n- [Incident Response Workflow](#incident-response-workflow)\n- [Security Tools Reference](#security-tools-reference)\n- [Tools and References](#tools-and-references)\n\n---\n\n## Threat Modeling Workflow\n\nIdentify and analyze security threats using STRIDE methodology.\n\n### Workflow: Conduct Threat Model\n\n1. Define system scope and boundaries:\n   - Identify assets to protect\n   - Map trust boundaries\n   - Document data flows\n2. Create data flow diagram:\n   - External entities (users, services)\n   - Processes (application components)\n   - Data stores (databases, caches)\n   - Data flows (APIs, network connections)\n3. Apply STRIDE to each DFD element (see [STRIDE per Element Matrix](#stride-per-element-matrix) below)\n4. Score risks using DREAD:\n   - Damage potential (1-10)\n   - Reproducibility (1-10)\n   - Exploitability (1-10)\n   - Affected users (1-10)\n   - Discoverability (1-10)\n5. Prioritize threats by risk score\n6. Define mitigations for each threat\n7. Document in threat model report\n8. **Validation:** All DFD elements analyzed; STRIDE applied; threats scored; mitigations mapped\n\n### STRIDE Threat Categories\n\n| Category | Security Property | Mitigation Focus |\n|----------|-------------------|------------------|\n| Spoofing | Authentication | MFA, certificates, strong auth |\n| Tampering | Integrity | Signing, checksums, validation |\n| Repudiation | Non-repudiation | Audit logs, digital signatures |\n| Information Disclosure | Confidentiality | Encryption, access controls |\n| Denial of Service | Availability | Rate limiting, redundancy |\n| Elevation of Privilege | Authorization | RBAC, least privilege |\n\n### STRIDE per Element Matrix\n\n| DFD Element | S | T | R | I | D | E |\n|-------------|---|---|---|---|---|---|\n| External Entity | X | | X | | | |\n| Process | X | X | X | X | X | X |\n| Data Store | | X | X | X | X | |\n| Data Flow | | X | | X | X | |\n\nSee: [references\u002Fthreat-modeling-guide.md](references\u002Fthreat-modeling-guide.md)\n\n---\n\n## Security Architecture Workflow\n\nDesign secure systems using defense-in-depth principles.\n\n### Workflow: Design Secure Architecture\n\n1. Define security requirements:\n   - Compliance requirements (GDPR, HIPAA, PCI-DSS)\n   - Data classification (public, internal, confidential, restricted)\n   - Threat model inputs\n2. Apply defense-in-depth layers:\n   - Perimeter: WAF, DDoS protection, rate limiting\n   - Network: Segmentation, IDS\u002FIPS, mTLS\n   - Host: Patching, EDR, hardening\n   - Application: Input validation, authentication, secure coding\n   - Data: Encryption at rest and in transit\n3. Implement Zero Trust principles:\n   - Verify explicitly (every request)\n   - Least privilege access (JIT\u002FJEA)\n   - Assume breach (segment, monitor)\n4. Configure authentication and authorization:\n   - Identity provider selection\n   - MFA requirements\n   - RBAC\u002FABAC model\n5. Design encryption strategy:\n   - Key management approach\n   - Algorithm selection\n   - Certificate lifecycle\n6. Plan security monitoring:\n   - Log aggregation\n   - SIEM integration\n   - Alerting rules\n7. Document architecture decisions\n8. **Validation:** Defense-in-depth layers defined; Zero Trust applied; encryption strategy documented; monitoring planned\n\n### Defense-in-Depth Layers\n\n```\nLayer 1: PERIMETER\n  WAF, DDoS mitigation, DNS filtering, rate limiting\n\nLayer 2: NETWORK\n  Segmentation, IDS\u002FIPS, network monitoring, VPN, mTLS\n\nLayer 3: HOST\n  Endpoint protection, OS hardening, patching, logging\n\nLayer 4: APPLICATION\n  Input validation, authentication, secure coding, SAST\n\nLayer 5: DATA\n  Encryption at rest\u002Ftransit, access controls, DLP, backup\n```\n\n### Authentication Pattern Selection\n\n| Use Case | Recommended Pattern |\n|----------|---------------------|\n| Web application | OAuth 2.0 + PKCE with OIDC |\n| API authentication | JWT with short expiration + refresh tokens |\n| Service-to-service | mTLS with certificate rotation |\n| CLI\u002FAutomation | API keys with IP allowlisting |\n| High security | FIDO2\u002FWebAuthn hardware keys |\n\nSee: [references\u002Fsecurity-architecture-patterns.md](references\u002Fsecurity-architecture-patterns.md)\n\n---\n\n## Vulnerability Assessment Workflow\n\nIdentify and remediate security vulnerabilities in applications.\n\n### Workflow: Conduct Vulnerability Assessment\n\n1. Define assessment scope:\n   - In-scope systems and applications\n   - Testing methodology (black box, gray box, white box)\n   - Rules of engagement\n2. Gather information:\n   - Technology stack inventory\n   - Architecture documentation\n   - Previous vulnerability reports\n3. Perform automated scanning:\n   - SAST (static analysis)\n   - DAST (dynamic analysis)\n   - Dependency scanning\n   - Secret detection\n4. Conduct manual testing:\n   - Business logic flaws\n   - Authentication bypass\n   - Authorization issues\n   - Injection vulnerabilities\n5. Classify findings by severity:\n   - Critical: Immediate exploitation risk\n   - High: Significant impact, easier to exploit\n   - Medium: Moderate impact or difficulty\n   - Low: Minor impact\n6. Develop remediation plan:\n   - Prioritize by risk\n   - Assign owners\n   - Set deadlines\n7. Verify fixes and document\n8. **Validation:** Scope defined; automated and manual testing complete; findings classified; remediation tracked\n\nFor OWASP Top 10 vulnerability descriptions and testing guidance, refer to [owasp.org\u002FTop10](https:\u002F\u002Fowasp.org\u002FTop10).\n\n### Vulnerability Severity Matrix\n\n| Impact \\ Exploitability | Easy | Moderate | Difficult |\n|-------------------------|------|----------|-----------|\n| Critical | Critical | Critical | High |\n| High | Critical | High | Medium |\n| Medium | High | Medium | Low |\n| Low | Medium | Low | Low |\n\n---\n\n## Secure Code Review Workflow\n\nReview code for security vulnerabilities before deployment.\n\n### Workflow: Conduct Security Code Review\n\n1. Establish review scope:\n   - Changed files and functions\n   - Security-sensitive areas (auth, crypto, input handling)\n   - Third-party integrations\n2. Run automated analysis:\n   - SAST tools (Semgrep, CodeQL, Bandit)\n   - Secret scanning\n   - Dependency vulnerability check\n3. Review authentication code:\n   - Password handling (hashing, storage)\n   - Session management\n   - Token validation\n4. Review authorization code:\n   - Access control checks\n   - RBAC implementation\n   - Privilege boundaries\n5. Review data handling:\n   - Input validation\n   - Output encoding\n   - SQL query construction\n   - File path handling\n6. Review cryptographic code:\n   - Algorithm selection\n   - Key management\n   - Random number generation\n7. Document findings with severity\n8. **Validation:** Automated scans passed; auth\u002Fauthz reviewed; data handling checked; crypto verified; findings documented\n\n### Security Code Review Checklist\n\n| Category | Check | Risk |\n|----------|-------|------|\n| Input Validation | All user input validated and sanitized | Injection |\n| Output Encoding | Context-appropriate encoding applied | XSS |\n| Authentication | Passwords hashed with Argon2\u002Fbcrypt | Credential theft |\n| Session | Secure cookie flags set (HttpOnly, Secure, SameSite) | Session hijacking |\n| Authorization | Server-side permission checks on all endpoints | Privilege escalation |\n| SQL | Parameterized queries used exclusively | SQL injection |\n| File Access | Path traversal sequences rejected | Path traversal |\n| Secrets | No hardcoded credentials or keys | Information disclosure |\n| Dependencies | Known vulnerable packages updated | Supply chain |\n| Logging | Sensitive data not logged | Information disclosure |\n\n### Secure vs Insecure Patterns\n\n| Pattern | Issue | Secure Alternative |\n|---------|-------|-------------------|\n| SQL string formatting | SQL injection | Use parameterized queries with placeholders |\n| Shell command building | Command injection | Use subprocess with argument lists, no shell |\n| Path concatenation | Path traversal | Validate and canonicalize paths |\n| MD5\u002FSHA1 for passwords | Weak hashing | Use Argon2id or bcrypt |\n| Math.random for tokens | Predictable values | Use crypto.getRandomValues |\n\n### Inline Code Examples\n\n**SQL Injection — insecure vs. secure (Python):**\n\n```python\n# ❌ Insecure: string formatting allows SQL injection\nquery = f\"SELECT * FROM users WHERE username = '{username}'\"\ncursor.execute(query)\n\n# ✅ Secure: parameterized query — user input never interpreted as SQL\nquery = \"SELECT * FROM users WHERE username = %s\"\ncursor.execute(query, (username,))\n```\n\n**Password Hashing with Argon2id (Python):**\n\n```python\nfrom argon2 import PasswordHasher\n\nph = PasswordHasher()          # uses secure defaults (time_cost, memory_cost)\n\n# On registration\nhashed = ph.hash(plain_password)\n\n# On login — raises argon2.exceptions.VerifyMismatchError on failure\nph.verify(hashed, plain_password)\n```\n\n**Secret Scanning — core pattern matching (Python):**\n\n```python\nimport re, pathlib\n\nSECRET_PATTERNS = {\n    \"aws_access_key\":  re.compile(r\"AKIA[0-9A-Z]{16}\"),\n    \"github_token\":    re.compile(r\"ghp_[A-Za-z0-9]{36}\"),\n    \"private_key\":     re.compile(r\"-----BEGIN (RSA |EC )?PRIVATE KEY-----\"),\n    \"generic_secret\":  re.compile(r'(?i)(password|secret|api_key)\\s*=\\s*[\"\\']?\\S{8,}'),\n}\n\ndef scan_file(path: pathlib.Path) -> list[dict]:\n    findings = []\n    for lineno, line in enumerate(path.read_text(errors=\"replace\").splitlines(), 1):\n        for name, pattern in SECRET_PATTERNS.items():\n            if pattern.search(line):\n                findings.append({\"file\": str(path), \"line\": lineno, \"type\": name})\n    return findings\n```\n\n---\n\n## Incident Response Workflow\n\nRespond to and contain security incidents.\n\n### Workflow: Handle Security Incident\n\n1. Identify and triage:\n   - Validate incident is genuine\n   - Assess initial scope and severity\n   - Activate incident response team\n2. Contain the threat:\n   - Isolate affected systems\n   - Block malicious IPs\u002Faccounts\n   - Disable compromised credentials\n3. Eradicate root cause:\n   - Remove malware\u002Fbackdoors\n   - Patch vulnerabilities\n   - Update configurations\n4. Recover operations:\n   - Restore from clean backups\n   - Verify system integrity\n   - Monitor for recurrence\n5. Conduct post-mortem:\n   - Timeline reconstruction\n   - Root cause analysis\n   - Lessons learned\n6. Implement improvements:\n   - Update detection rules\n   - Enhance controls\n   - Update runbooks\n7. Document and report\n8. **Validation:** Threat contained; root cause eliminated; systems recovered; post-mortem complete; improvements implemented\n\n### Incident Severity Levels\n\n| Level | Response Time | Escalation |\n|-------|---------------|------------|\n| P1 - Critical (active breach\u002Fexfiltration) | Immediate | CISO, Legal, Executive |\n| P2 - High (confirmed, contained) | 1 hour | Security Lead, IT Director |\n| P3 - Medium (potential, under investigation) | 4 hours | Security Team |\n| P4 - Low (suspicious, low impact) | 24 hours | On-call engineer |\n\n### Incident Response Checklist\n\n| Phase | Actions |\n|-------|---------|\n| Identification | Validate alert, assess scope, determine severity |\n| Containment | Isolate systems, preserve evidence, block access |\n| Eradication | Remove threat, patch vulnerabilities, reset credentials |\n| Recovery | Restore services, verify integrity, increase monitoring |\n| Lessons Learned | Document timeline, identify gaps, update procedures |\n\n---\n\n## Security Tools Reference\n\n### Recommended Security Tools\n\n| Category | Tools |\n|----------|-------|\n| SAST | Semgrep, CodeQL, Bandit (Python), ESLint security plugins |\n| DAST | OWASP ZAP, Burp Suite, Nikto |\n| Dependency Scanning | Snyk, Dependabot, npm audit, pip-audit |\n| Secret Detection | GitLeaks, TruffleHog, detect-secrets |\n| Container Security | Trivy, Clair, Anchore |\n| Infrastructure | Checkov, tfsec, ScoutSuite |\n| Network | Wireshark, Nmap, Masscan |\n| Penetration | Metasploit, sqlmap, Burp Suite Pro |\n\n### Cryptographic Algorithm Selection\n\n| Use Case | Algorithm | Key Size |\n|----------|-----------|----------|\n| Symmetric encryption | AES-256-GCM | 256 bits |\n| Password hashing | Argon2id | N\u002FA (use defaults) |\n| Message authentication | HMAC-SHA256 | 256 bits |\n| Digital signatures | Ed25519 | 256 bits |\n| Key exchange | X25519 | 256 bits |\n| TLS | TLS 1.3 | N\u002FA |\n\nSee: [references\u002Fcryptography-implementation.md](references\u002Fcryptography-implementation.md)\n\n---\n\n## Tools and References\n\n### Scripts\n\n| Script | Purpose |\n|--------|---------|\n| [threat_modeler.py](scripts\u002Fthreat_modeler.py) | STRIDE threat analysis with DREAD risk scoring; JSON and text output; interactive guided mode |\n| [secret_scanner.py](scripts\u002Fsecret_scanner.py) | Detect hardcoded secrets and credentials across 20+ patterns; CI\u002FCD integration ready |\n\nFor usage, see the inline code examples in [Secure Code Review Workflow](#inline-code-examples) and the script source files directly.\n\n### References\n\n| Document | Content |\n|----------|---------|\n| [security-architecture-patterns.md](references\u002Fsecurity-architecture-patterns.md) | Zero Trust, defense-in-depth, authentication patterns, API security |\n| [threat-modeling-guide.md](references\u002Fthreat-modeling-guide.md) | STRIDE methodology, attack trees, DREAD scoring, DFD creation |\n| [cryptography-implementation.md](references\u002Fcryptography-implementation.md) | AES-GCM, RSA, Ed25519, password hashing, key management |\n\n---\n\n## Security Standards Reference\n\n### Security Headers Checklist\n\n| Header | Recommended Value |\n|--------|-------------------|\n| Content-Security-Policy | default-src self; script-src self |\n| X-Frame-Options | DENY |\n| X-Content-Type-Options | nosniff |\n| Strict-Transport-Security | max-age=31536000; includeSubDomains |\n| Referrer-Policy | strict-origin-when-cross-origin |\n| Permissions-Policy | geolocation=(), microphone=(), camera=() |\n\nFor compliance framework requirements (OWASP ASVS, CIS Benchmarks, NIST CSF, PCI-DSS, HIPAA, SOC 2), refer to the respective official documentation.\n\n---\n\n## Related Skills\n\n| Skill | Integration Point |\n|-------|-------------------|\n| [senior-devops](..\u002Fsenior-devops\u002F) | CI\u002FCD security, infrastructure hardening |\n| [senior-secops](..\u002Fsenior-secops\u002F) | Security monitoring, incident response |\n| [senior-backend](..\u002Fsenior-backend\u002F) | Secure API development |\n| [senior-architect](..\u002Fsenior-architect\u002F) | Security architecture decisions |\n",{"name":5,"triggers":24,"description":7},[25,26,27,28,29,30,31,32,33,34,35,36],"security architecture","threat modeling","STRIDE analysis","penetration testing","vulnerability assessment","secure coding","OWASP","application security","cryptography implementation","secret scanning","security audit","zero trust","devin\u002F1780503568-install-devin-skills","c1c6a7ac191f1fb795ae7f57f2fbfa600d3ef56b","engineering-team\u002Fskills\u002Fsenior-security",0,"https:\u002F\u002Fgithub.com\u002Fkruxshnx\u002Fclaude-skills-devin","https:\u002F\u002Fgithub.com\u002Fkruxshnx","https:\u002F\u002Fgovinda-krishna.vercel.app\u002F","2026-06-04 00:21:41",{"source":8,"skillName":5,"commands":46,"prompt":56,"zipAvailable":57},[47,50,53],{"tool":48,"command":49},"npx","npx skills add kruxshnx\u002Fclaude-skills-devin --skill senior-security",{"tool":51,"command":52},"bunx","bunx skills add kruxshnx\u002Fclaude-skills-devin --skill senior-security",{"tool":54,"command":55},"pnpm","pnpm dlx skills add kruxshnx\u002Fclaude-skills-devin --skill senior-security","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fkruxshnx\u002Fclaude-skills-devin\u002Fblob\u002Fdevin\u002F1780503568-install-devin-skills\u002Fengineering-team\u002Fskills\u002Fsenior-security\u002FSKILL.md",true,[59,65,69,73,79],{"path":60,"resourceType":61,"resourceTypeDesc":62,"sizeBytes":63,"sourceHtmlUrl":64},"references\u002Fcryptography-implementation.md","REFERENCE","参考文档",21912,"https:\u002F\u002Fgithub.com\u002Fkruxshnx\u002Fclaude-skills-devin\u002Fblob\u002Fdevin\u002F1780503568-install-devin-skills\u002Fengineering-team\u002Fskills\u002Fsenior-security\u002Freferences\u002Fcryptography-implementation.md",{"path":66,"resourceType":61,"resourceTypeDesc":62,"sizeBytes":67,"sourceHtmlUrl":68},"references\u002Fsecurity-architecture-patterns.md",22198,"https:\u002F\u002Fgithub.com\u002Fkruxshnx\u002Fclaude-skills-devin\u002Fblob\u002Fdevin\u002F1780503568-install-devin-skills\u002Fengineering-team\u002Fskills\u002Fsenior-security\u002Freferences\u002Fsecurity-architecture-patterns.md",{"path":70,"resourceType":61,"resourceTypeDesc":62,"sizeBytes":71,"sourceHtmlUrl":72},"references\u002Fthreat-modeling-guide.md",22659,"https:\u002F\u002Fgithub.com\u002Fkruxshnx\u002Fclaude-skills-devin\u002Fblob\u002Fdevin\u002F1780503568-install-devin-skills\u002Fengineering-team\u002Fskills\u002Fsenior-security\u002Freferences\u002Fthreat-modeling-guide.md",{"path":74,"resourceType":75,"resourceTypeDesc":76,"sizeBytes":77,"sourceHtmlUrl":78},"scripts\u002Fsecret_scanner.py","SCRIPT","脚本",18120,"https:\u002F\u002Fgithub.com\u002Fkruxshnx\u002Fclaude-skills-devin\u002Fblob\u002Fdevin\u002F1780503568-install-devin-skills\u002Fengineering-team\u002Fskills\u002Fsenior-security\u002Fscripts\u002Fsecret_scanner.py",{"path":80,"resourceType":75,"resourceTypeDesc":76,"sizeBytes":81,"sourceHtmlUrl":82},"scripts\u002Fthreat_modeler.py",21325,"https:\u002F\u002Fgithub.com\u002Fkruxshnx\u002Fclaude-skills-devin\u002Fblob\u002Fdevin\u002F1780503568-install-devin-skills\u002Fengineering-team\u002Fskills\u002Fsenior-security\u002Fscripts\u002Fthreat_modeler.py",[84,91,98,105,112,119],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":19},"01M779G0P3W78CJF700K9AHJ6M","syllabus","Generates a curated supplementary reading list from any course syllabus using Consensus academic search. Grill-me intake (syllabus input format + course audience + year range) plus a grouping forcing-options checkpoint before any search runs — so the reading list matches the course's level and recency need. Parses the syllabus to extract topics and learning outcomes, searches Consensus for recent peer-reviewed papers per topic, and produces a professionally formatted .docx with clickable Consensus links, plain-language summaries calibrated to audience level, and Bloom-higher-order discussion questions tied to course learning goals. Triggers whenever a user uploads a syllabus, course outline, or curriculum document and wants supplementary readings. Also triggers on: 'syllabus reading list', 'find papers for my course', 'create a reading list from this syllabus', 'recent research for my class', 'supplementary readings', 'find journal articles for these topics', 'what recent papers cover this material', 'any new research on these course topics', 'update my syllabus with recent papers'. Even casual mentions when a syllabus is attached should trigger this skill.","https:\u002F\u002Fgithub.com\u002Fkruxshnx\u002Fclaude-skills-devin\u002Fblob\u002Fdevin\u002F1780503568-install-devin-skills\u002Fresearch\u002Fsyllabus\u002Fskills\u002Fsyllabus\u002FSKILL.md",[],[],{"skillNo":92,"name":93,"nameZh":6,"description":94,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":95,"categories":96,"keywords":97,"publishedAt":19},"01M779FBBF54JKVQAGBAYHWE0B","research","Default entry point for any research request — a hybrid router that classifies the question deterministically and either delegates to a specialist research skill (pulse for trends\u002Fsentiment, grants for NIH funding, litreview for academic literature, syllabus for course reading, patent for prior-art + IP landscape, dossier for entity research) or runs its own plan-decompose-multi-source-search-synthesize-cite fallback workflow when no specialist matches. Always surfaces the routing decision so users can override. Triggers — \"research [topic]\", \"look into [topic]\", \"what do we know about [topic]\", \"investigate [topic]\", \"find me information on [topic]\", \"do some research on [topic]\", \"I need to understand [topic]\", or any research request that doesn't obviously match a more-specific specialist skill. Output is a markdown briefing (default) or .docx document (on request) with full citations and an audit log.","https:\u002F\u002Fgithub.com\u002Fkruxshnx\u002Fclaude-skills-devin\u002Fblob\u002Fdevin\u002F1780503568-install-devin-skills\u002Fresearch\u002Fresearch\u002Fskills\u002Fresearch\u002FSKILL.md",[],[],{"skillNo":99,"name":100,"nameZh":6,"description":101,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":102,"categories":103,"keywords":104,"publishedAt":19},"01M779EQ39CGK5Q4V78KC0HNMV","pulse","Multi-source recency research skill that takes the pulse of any topic across Reddit, Hacker News, the open web, and optionally X\u002FTwitter within a configurable recent window (default 30 days). Forcing intake clarifies topic specificity, angle (trend\u002Fsentiment\u002Fproblems\u002Fopportunities\u002Fcomparison), time window, and platform scope before searching. Returns a synthesized briefing with citations, engagement metrics, and cross-platform pattern analysis. Triggers: 'pulse on [topic]', 'what's happening with [topic]', 'what are people saying about [topic]', 'current conversation about [topic]', 'take the pulse of [topic]', 'trending: [topic]', 'find me info on [topic]', or any variation requesting multi-source recency intelligence on a topic. Also use for competitor research, trend discovery, tool comparisons, and audience sentiment analysis.","https:\u002F\u002Fgithub.com\u002Fkruxshnx\u002Fclaude-skills-devin\u002Fblob\u002Fdevin\u002F1780503568-install-devin-skills\u002Fresearch\u002Fpulse\u002Fskills\u002Fpulse\u002FSKILL.md",[],[],{"skillNo":106,"name":107,"nameZh":6,"description":108,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":109,"categories":110,"keywords":111,"publishedAt":19},"01M779EDS05MYFXBF7PGTVSDMA","patent","Patent prior-art and landscape intelligence skill — not generic patent help. Commits to one of five sub-use-cases via forcing intake (novelty search \u002F freedom-to-operate \u002F competitive landscape \u002F acquisition diligence \u002F litigation prior-art) before any search runs. Searches Google Patents, Espacenet, USPTO, and optionally Lens.org for citation-graph signals. Output is an editable Word document (.docx) with verdict, ranked closest art (claim-text extracted), CPC-class-aware landscape, family-resolved hits, geographic coverage, FTO flags where applicable, strategy recommendations, and full audit log. Triggers: 'prior art search for [invention]', 'patent search on [topic]', 'freedom to operate analysis', 'FTO for [product]', 'patent landscape for [field]', 'is [invention] novel', 'patents on [topic]', 'competitive patent analysis', 'prior art for litigation', 'patent diligence on [company]'. Produces search signal, not legal advice — always recommends consulting a patent attorney before filing or licensing decisions. Trademark, copyright, and trade-secret questions are out of scope.","https:\u002F\u002Fgithub.com\u002Fkruxshnx\u002Fclaude-skills-devin\u002Fblob\u002Fdevin\u002F1780503568-install-devin-skills\u002Fresearch\u002Fpatent\u002Fskills\u002Fpatent\u002FSKILL.md",[],[],{"skillNo":113,"name":114,"nameZh":6,"description":115,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":116,"categories":117,"keywords":118,"publishedAt":19},"01M779DVA52T5F0YC5HSM9BW4Z","notebooklm","Browser automation skill for controlling Google's NotebookLM. Handles reading and querying notebooks, adding sources (URLs, text, files, YouTube links, synthesized content), generating Studio outputs (Audio Overview, infographics, slide decks, study guides, briefing docs, mind maps, timelines, FAQs), and creating new notebooks. Triggers on any phrase involving NotebookLM — 'open NotebookLM', 'check my [name] notebook', 'pull info from NotebookLM', 'ask my notebook about X', 'add [source] to NotebookLM', 'create an infographic in NotebookLM', 'use NotebookLM Studio', 'generate a slide deck from my notebook', or any variation where the goal involves NotebookLM. Requires browser automation environment — fails gracefully when unavailable.","https:\u002F\u002Fgithub.com\u002Fkruxshnx\u002Fclaude-skills-devin\u002Fblob\u002Fdevin\u002F1780503568-install-devin-skills\u002Fresearch\u002Fnotebooklm\u002Fskills\u002Fnotebooklm\u002FSKILL.md",[],[],{"skillNo":120,"name":121,"nameZh":6,"description":122,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":123,"categories":124,"keywords":125,"publishedAt":19},"01M779D3SGW8FM1N8G0HK860WT","litreview","Academic literature orientation skill that searches papers via Consensus, builds a strategic search plan using PICO (default) or SPIDER \u002F Decomposition \u002F hybrid as fallbacks, and synthesizes findings into a professionally formatted Word document (.docx) research guide. Grill-me intake (research question specificity + framework hint + tentative depth) before the recon search; a second forcing checkpoint after Phase 2 confirms framework + sub-areas + depth before searches consume budget. Configurable depth (5\u002F10\u002F20 queries) controls coverage vs. speed. Output is a 'launching pad' — not a finished review, but an orientation guide that lets a researcher dive in confidently. Triggers: 'litreview on [topic]', 'literature review on [topic]', 'I'm starting a literature review on X', 'I'm writing a paper on X', 'help me research X', 'I'm doing research on X', 'can you help me research X'. Do NOT trigger for single one-off paper searches where the user just wants a quick list — that's a plain Consensus search.","https:\u002F\u002Fgithub.com\u002Fkruxshnx\u002Fclaude-skills-devin\u002Fblob\u002Fdevin\u002F1780503568-install-devin-skills\u002Fresearch\u002Flitreview\u002Fskills\u002Flitreview\u002FSKILL.md",[],[]]