Senior Security Engineer
Security engineering tools for threat modeling, vulnerability analysis, secure architecture design, and penetration testing.
Table of Contents
Threat Modeling Workflow
Identify and analyze security threats using STRIDE methodology.
Workflow: Conduct Threat Model
- Define system scope and boundaries:
- Identify assets to protect
- Map trust boundaries
- Document data flows
- Create data flow diagram:
- External entities (users, services)
- Processes (application components)
- Data stores (databases, caches)
- Data flows (APIs, network connections)
- Apply STRIDE to each DFD element (see STRIDE per Element Matrix below)
- Score risks using DREAD:
- Damage potential (1-10)
- Reproducibility (1-10)
- Exploitability (1-10)
- Affected users (1-10)
- Discoverability (1-10)
- Prioritize threats by risk score
- Define mitigations for each threat
- Document in threat model report
- 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
Security Architecture Workflow
Design secure systems using defense-in-depth principles.
Workflow: Design Secure Architecture
- Define security requirements:
- Compliance requirements (GDPR, HIPAA, PCI-DSS)
- Data classification (public, internal, confidential, restricted)
- Threat model inputs
- 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
- Implement Zero Trust principles:
- Verify explicitly (every request)
- Least privilege access (JIT/JEA)
- Assume breach (segment, monitor)
- Configure authentication and authorization:
- Identity provider selection
- MFA requirements
- RBAC/ABAC model
- Design encryption strategy:
- Key management approach
- Algorithm selection
- Certificate lifecycle
- Plan security monitoring:
- Log aggregation
- SIEM integration
- Alerting rules
- Document architecture decisions
- 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
Vulnerability Assessment Workflow
Identify and remediate security vulnerabilities in applications.
Workflow: Conduct Vulnerability Assessment
- Define assessment scope:
- In-scope systems and applications
- Testing methodology (black box, gray box, white box)
- Rules of engagement
- Gather information:
- Technology stack inventory
- Architecture documentation
- Previous vulnerability reports
- Perform automated scanning:
- SAST (static analysis)
- DAST (dynamic analysis)
- Dependency scanning
- Secret detection
- Conduct manual testing:
- Business logic flaws
- Authentication bypass
- Authorization issues
- Injection vulnerabilities
- Classify findings by severity:
- Critical: Immediate exploitation risk
- High: Significant impact, easier to exploit
- Medium: Moderate impact or difficulty
- Low: Minor impact
- Develop remediation plan:
- Prioritize by risk
- Assign owners
- Set deadlines
- Verify fixes and document
- 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.
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
- Establish review scope:
- Changed files and functions
- Security-sensitive areas (auth, crypto, input handling)
- Third-party integrations
- Run automated analysis:
- SAST tools (Semgrep, CodeQL, Bandit)
- Secret scanning
- Dependency vulnerability check
- Review authentication code:
- Password handling (hashing, storage)
- Session management
- Token validation
- Review authorization code:
- Access control checks
- RBAC implementation
- Privilege boundaries
- Review data handling:
- Input validation
- Output encoding
- SQL query construction
- File path handling
- Review cryptographic code:
- Algorithm selection
- Key management
- Random number generation
- Document findings with severity
- 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 |
| SQL string formatting |
SQL injection |
Use parameterized queries with placeholders |
| Shell command building |
Command injection |
Use subprocess with argument lists, no shell |
| Path concatenation |
Path traversal |
Validate and canonicalize paths |
| MD5/SHA1 for passwords |
Weak hashing |
Use Argon2id or bcrypt |
| Math.random for tokens |
Predictable values |
Use crypto.getRandomValues |
Inline Code Examples
SQL Injection — insecure vs. secure (Python):
# ❌ Insecure: string formatting allows SQL injection
query = f"SELECT * FROM users WHERE username = '{username}'"
cursor.execute(query)
# ✅ Secure: parameterized query — user input never interpreted as SQL
query = "SELECT * FROM users WHERE username = %s"
cursor.execute(query, (username,))
Password Hashing with Argon2id (Python):
from argon2 import PasswordHasher
ph = PasswordHasher() # uses secure defaults (time_cost, memory_cost)
# On registration
hashed = ph.hash(plain_password)
# On login — raises argon2.exceptions.VerifyMismatchError on failure
ph.verify(hashed, plain_password)
Secret Scanning — core pattern matching (Python):
import re, pathlib
SECRET_PATTERNS = {
"aws_access_key": re.compile(r"AKIA[0-9A-Z]{16}"),
"github_token": re.compile(r"ghp_[A-Za-z0-9]{36}"),
"private_key": re.compile(r"-----BEGIN (RSA |EC )?PRIVATE KEY-----"),
"generic_secret": re.compile(r'(?i)(password|secret|api_key)\s*=\s*["']?\S{8,}'),
}
def scan_file(path: pathlib.Path) -> list[dict]:
findings = []
for lineno, line in enumerate(path.read_text(errors="replace").splitlines(), 1):
for name, pattern in SECRET_PATTERNS.items():
if pattern.search(line):
findings.append({"file": str(path), "line": lineno, "type": name})
return findings
Incident Response Workflow
Respond to and contain security incidents.
Workflow: Handle Security Incident
- Identify and triage:
- Validate incident is genuine
- Assess initial scope and severity
- Activate incident response team
- Contain the threat:
- Isolate affected systems
- Block malicious IPs/accounts
- Disable compromised credentials
- Eradicate root cause:
- Remove malware/backdoors
- Patch vulnerabilities
- Update configurations
- Recover operations:
- Restore from clean backups
- Verify system integrity
- Monitor for recurrence
- Conduct post-mortem:
- Timeline reconstruction
- Root cause analysis
- Lessons learned
- Implement improvements:
- Update detection rules
- Enhance controls
- Update runbooks
- Document and report
- Validation: Threat contained; root cause eliminated; systems recovered; post-mortem complete; improvements implemented
Incident Severity Levels
| Level |
Response Time |
Escalation |
| P1 - Critical (active breach/exfiltration) |
Immediate |
CISO, Legal, Executive |
| P2 - High (confirmed, contained) |
1 hour |
Security Lead, IT Director |
| P3 - Medium (potential, under investigation) |
4 hours |
Security Team |
| P4 - Low (suspicious, low impact) |
24 hours |
On-call engineer |
Incident Response Checklist
| Phase |
Actions |
| Identification |
Validate alert, assess scope, determine severity |
| Containment |
Isolate systems, preserve evidence, block access |
| Eradication |
Remove threat, patch vulnerabilities, reset credentials |
| Recovery |
Restore services, verify integrity, increase monitoring |
| Lessons Learned |
Document timeline, identify gaps, update procedures |
Security Tools Reference
Recommended Security Tools
| Category |
Tools |
| SAST |
Semgrep, CodeQL, Bandit (Python), ESLint security plugins |
| DAST |
OWASP ZAP, Burp Suite, Nikto |
| Dependency Scanning |
Snyk, Dependabot, npm audit, pip-audit |
| Secret Detection |
GitLeaks, TruffleHog, detect-secrets |
| Container Security |
Trivy, Clair, Anchore |
| Infrastructure |
Checkov, tfsec, ScoutSuite |
| Network |
Wireshark, Nmap, Masscan |
| Penetration |
Metasploit, sqlmap, Burp Suite Pro |
Cryptographic Algorithm Selection
| Use Case |
Algorithm |
Key Size |
| Symmetric encryption |
AES-256-GCM |
256 bits |
| Password hashing |
Argon2id |
N/A (use defaults) |
| Message authentication |
HMAC-SHA256 |
256 bits |
| Digital signatures |
Ed25519 |
256 bits |
| Key exchange |
X25519 |
256 bits |
| TLS |
TLS 1.3 |
N/A |
See: references/cryptography-implementation.md
Tools and References
Scripts
| Script |
Purpose |
| threat_modeler.py |
STRIDE threat analysis with DREAD risk scoring; JSON and text output; interactive guided mode |
| secret_scanner.py |
Detect hardcoded secrets and credentials across 20+ patterns; CI/CD integration ready |
For usage, see the inline code examples in Secure Code Review Workflow and the script source files directly.
References
| Document |
Content |
| security-architecture-patterns.md |
Zero Trust, defense-in-depth, authentication patterns, API security |
| threat-modeling-guide.md |
STRIDE methodology, attack trees, DREAD scoring, DFD creation |
| cryptography-implementation.md |
AES-GCM, RSA, Ed25519, password hashing, key management |
Security Standards Reference
Security Headers Checklist
| Header |
Recommended Value |
| Content-Security-Policy |
default-src self; script-src self |
| X-Frame-Options |
DENY |
| X-Content-Type-Options |
nosniff |
| Strict-Transport-Security |
max-age=31536000; includeSubDomains |
| Referrer-Policy |
strict-origin-when-cross-origin |
| Permissions-Policy |
geolocation=(), microphone=(), camera=() |
For compliance framework requirements (OWASP ASVS, CIS Benchmarks, NIST CSF, PCI-DSS, HIPAA, SOC 2), refer to the respective official documentation.
Related Skills
1---2name: "senior-security"3description: 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.4triggers:5 - security architecture6 - threat modeling7 - STRIDE analysis8 - penetration testing9 - vulnerability assessment10 - secure coding11 - OWASP12 - application security13 - cryptography implementation14 - secret scanning15 - security audit16 - zero trust17metadata:18 source: https://skillmd.com/skills/levalencia/senior-security19---2021# Senior Security Engineer2223Security engineering tools for threat modeling, vulnerability analysis, secure architecture design, and penetration testing.2425---2627## Table of Contents2829- [Threat Modeling Workflow](#threat-modeling-workflow)30- [Security Architecture Workflow](#security-architecture-workflow)31- [Vulnerability Assessment Workflow](#vulnerability-assessment-workflow)32- [Secure Code Review Workflow](#secure-code-review-workflow)33- [Incident Response Workflow](#incident-response-workflow)34- [Security Tools Reference](#security-tools-reference)35- [Tools and References](#tools-and-references)3637---3839## Threat Modeling Workflow4041Identify and analyze security threats using STRIDE methodology.4243### Workflow: Conduct Threat Model44451. Define system scope and boundaries:46 - Identify assets to protect47 - Map trust boundaries48 - Document data flows492. Create data flow diagram:50 - External entities (users, services)51 - Processes (application components)52 - Data stores (databases, caches)53 - Data flows (APIs, network connections)543. Apply STRIDE to each DFD element (see [STRIDE per Element Matrix](#stride-per-element-matrix) below)554. Score risks using DREAD:56 - Damage potential (1-10)57 - Reproducibility (1-10)58 - Exploitability (1-10)59 - Affected users (1-10)60 - Discoverability (1-10)615. Prioritize threats by risk score626. Define mitigations for each threat637. Document in threat model report648. **Validation:** All DFD elements analyzed; STRIDE applied; threats scored; mitigations mapped6566### STRIDE Threat Categories6768| Category | Security Property | Mitigation Focus |69|----------|-------------------|------------------|70| Spoofing | Authentication | MFA, certificates, strong auth |71| Tampering | Integrity | Signing, checksums, validation |72| Repudiation | Non-repudiation | Audit logs, digital signatures |73| Information Disclosure | Confidentiality | Encryption, access controls |74| Denial of Service | Availability | Rate limiting, redundancy |75| Elevation of Privilege | Authorization | RBAC, least privilege |7677### STRIDE per Element Matrix7879| DFD Element | S | T | R | I | D | E |80|-------------|---|---|---|---|---|---|81| External Entity | X | | X | | | |82| Process | X | X | X | X | X | X |83| Data Store | | X | X | X | X | |84| Data Flow | | X | | X | X | |8586See: [references/threat-modeling-guide.md](references/threat-modeling-guide.md)8788---8990## Security Architecture Workflow9192Design secure systems using defense-in-depth principles.9394### Workflow: Design Secure Architecture95961. Define security requirements:97 - Compliance requirements (GDPR, HIPAA, PCI-DSS)98 - Data classification (public, internal, confidential, restricted)99 - Threat model inputs1002. Apply defense-in-depth layers:101 - Perimeter: WAF, DDoS protection, rate limiting102 - Network: Segmentation, IDS/IPS, mTLS103 - Host: Patching, EDR, hardening104 - Application: Input validation, authentication, secure coding105 - Data: Encryption at rest and in transit1063. Implement Zero Trust principles:107 - Verify explicitly (every request)108 - Least privilege access (JIT/JEA)109 - Assume breach (segment, monitor)1104. Configure authentication and authorization:111 - Identity provider selection112 - MFA requirements113 - RBAC/ABAC model1145. Design encryption strategy:115 - Key management approach116 - Algorithm selection117 - Certificate lifecycle1186. Plan security monitoring:119 - Log aggregation120 - SIEM integration121 - Alerting rules1227. Document architecture decisions1238. **Validation:** Defense-in-depth layers defined; Zero Trust applied; encryption strategy documented; monitoring planned124125### Defense-in-Depth Layers126127```128Layer 1: PERIMETER129 WAF, DDoS mitigation, DNS filtering, rate limiting130131Layer 2: NETWORK132 Segmentation, IDS/IPS, network monitoring, VPN, mTLS133134Layer 3: HOST135 Endpoint protection, OS hardening, patching, logging136137Layer 4: APPLICATION138 Input validation, authentication, secure coding, SAST139140Layer 5: DATA141 Encryption at rest/transit, access controls, DLP, backup142```143144### Authentication Pattern Selection145146| Use Case | Recommended Pattern |147|----------|---------------------|148| Web application | OAuth 2.0 + PKCE with OIDC |149| API authentication | JWT with short expiration + refresh tokens |150| Service-to-service | mTLS with certificate rotation |151| CLI/Automation | API keys with IP allowlisting |152| High security | FIDO2/WebAuthn hardware keys |153154See: [references/security-architecture-patterns.md](references/security-architecture-patterns.md)155156---157158## Vulnerability Assessment Workflow159160Identify and remediate security vulnerabilities in applications.161162### Workflow: Conduct Vulnerability Assessment1631641. Define assessment scope:165 - In-scope systems and applications166 - Testing methodology (black box, gray box, white box)167 - Rules of engagement1682. Gather information:169 - Technology stack inventory170 - Architecture documentation171 - Previous vulnerability reports1723. Perform automated scanning:173 - SAST (static analysis)174 - DAST (dynamic analysis)175 - Dependency scanning176 - Secret detection1774. Conduct manual testing:178 - Business logic flaws179 - Authentication bypass180 - Authorization issues181 - Injection vulnerabilities1825. Classify findings by severity:183 - Critical: Immediate exploitation risk184 - High: Significant impact, easier to exploit185 - Medium: Moderate impact or difficulty186 - Low: Minor impact1876. Develop remediation plan:188 - Prioritize by risk189 - Assign owners190 - Set deadlines1917. Verify fixes and document1928. **Validation:** Scope defined; automated and manual testing complete; findings classified; remediation tracked193194For OWASP Top 10 vulnerability descriptions and testing guidance, refer to [owasp.org/Top10](https://owasp.org/Top10).195196### Vulnerability Severity Matrix197198| Impact \ Exploitability | Easy | Moderate | Difficult |199|-------------------------|------|----------|-----------|200| Critical | Critical | Critical | High |201| High | Critical | High | Medium |202| Medium | High | Medium | Low |203| Low | Medium | Low | Low |204205---206207## Secure Code Review Workflow208209Review code for security vulnerabilities before deployment.210211### Workflow: Conduct Security Code Review2122131. Establish review scope:214 - Changed files and functions215 - Security-sensitive areas (auth, crypto, input handling)216 - Third-party integrations2172. Run automated analysis:218 - SAST tools (Semgrep, CodeQL, Bandit)219 - Secret scanning220 - Dependency vulnerability check2213. Review authentication code:222 - Password handling (hashing, storage)223 - Session management224 - Token validation2254. Review authorization code:226 - Access control checks227 - RBAC implementation228 - Privilege boundaries2295. Review data handling:230 - Input validation231 - Output encoding232 - SQL query construction233 - File path handling2346. Review cryptographic code:235 - Algorithm selection236 - Key management237 - Random number generation2387. Document findings with severity2398. **Validation:** Automated scans passed; auth/authz reviewed; data handling checked; crypto verified; findings documented240241### Security Code Review Checklist242243| Category | Check | Risk |244|----------|-------|------|245| Input Validation | All user input validated and sanitized | Injection |246| Output Encoding | Context-appropriate encoding applied | XSS |247| Authentication | Passwords hashed with Argon2/bcrypt | Credential theft |248| Session | Secure cookie flags set (HttpOnly, Secure, SameSite) | Session hijacking |249| Authorization | Server-side permission checks on all endpoints | Privilege escalation |250| SQL | Parameterized queries used exclusively | SQL injection |251| File Access | Path traversal sequences rejected | Path traversal |252| Secrets | No hardcoded credentials or keys | Information disclosure |253| Dependencies | Known vulnerable packages updated | Supply chain |254| Logging | Sensitive data not logged | Information disclosure |255256### Secure vs Insecure Patterns257258| Pattern | Issue | Secure Alternative |259|---------|-------|-------------------|260| SQL string formatting | SQL injection | Use parameterized queries with placeholders |261| Shell command building | Command injection | Use subprocess with argument lists, no shell |262| Path concatenation | Path traversal | Validate and canonicalize paths |263| MD5/SHA1 for passwords | Weak hashing | Use Argon2id or bcrypt |264| Math.random for tokens | Predictable values | Use crypto.getRandomValues |265266### Inline Code Examples267268**SQL Injection — insecure vs. secure (Python):**269270```python271# ❌ Insecure: string formatting allows SQL injection272query = f"SELECT * FROM users WHERE username = '{username}'"273cursor.execute(query)274275# ✅ Secure: parameterized query — user input never interpreted as SQL276query = "SELECT * FROM users WHERE username = %s"277cursor.execute(query, (username,))278```279280**Password Hashing with Argon2id (Python):**281282```python283from argon2 import PasswordHasher284285ph = PasswordHasher() # uses secure defaults (time_cost, memory_cost)286287# On registration288hashed = ph.hash(plain_password)289290# On login — raises argon2.exceptions.VerifyMismatchError on failure291ph.verify(hashed, plain_password)292```293294**Secret Scanning — core pattern matching (Python):**295296```python297import re, pathlib298299SECRET_PATTERNS = {300 "aws_access_key": re.compile(r"AKIA[0-9A-Z]{16}"),301 "github_token": re.compile(r"ghp_[A-Za-z0-9]{36}"),302 "private_key": re.compile(r"-----BEGIN (RSA |EC )?PRIVATE KEY-----"),303 "generic_secret": re.compile(r'(?i)(password|secret|api_key)\s*=\s*["']?\S{8,}'),304}305306def scan_file(path: pathlib.Path) -> list[dict]:307 findings = []308 for lineno, line in enumerate(path.read_text(errors="replace").splitlines(), 1):309 for name, pattern in SECRET_PATTERNS.items():310 if pattern.search(line):311 findings.append({"file": str(path), "line": lineno, "type": name})312 return findings313```314315---316317## Incident Response Workflow318319Respond to and contain security incidents.320321### Workflow: Handle Security Incident3223231. Identify and triage:324 - Validate incident is genuine325 - Assess initial scope and severity326 - Activate incident response team3272. Contain the threat:328 - Isolate affected systems329 - Block malicious IPs/accounts330 - Disable compromised credentials3313. Eradicate root cause:332 - Remove malware/backdoors333 - Patch vulnerabilities334 - Update configurations3354. Recover operations:336 - Restore from clean backups337 - Verify system integrity338 - Monitor for recurrence3395. Conduct post-mortem:340 - Timeline reconstruction341 - Root cause analysis342 - Lessons learned3436. Implement improvements:344 - Update detection rules345 - Enhance controls346 - Update runbooks3477. Document and report3488. **Validation:** Threat contained; root cause eliminated; systems recovered; post-mortem complete; improvements implemented349350### Incident Severity Levels351352| Level | Response Time | Escalation |353|-------|---------------|------------|354| P1 - Critical (active breach/exfiltration) | Immediate | CISO, Legal, Executive |355| P2 - High (confirmed, contained) | 1 hour | Security Lead, IT Director |356| P3 - Medium (potential, under investigation) | 4 hours | Security Team |357| P4 - Low (suspicious, low impact) | 24 hours | On-call engineer |358359### Incident Response Checklist360361| Phase | Actions |362|-------|---------|363| Identification | Validate alert, assess scope, determine severity |364| Containment | Isolate systems, preserve evidence, block access |365| Eradication | Remove threat, patch vulnerabilities, reset credentials |366| Recovery | Restore services, verify integrity, increase monitoring |367| Lessons Learned | Document timeline, identify gaps, update procedures |368369---370371## Security Tools Reference372373### Recommended Security Tools374375| Category | Tools |376|----------|-------|377| SAST | Semgrep, CodeQL, Bandit (Python), ESLint security plugins |378| DAST | OWASP ZAP, Burp Suite, Nikto |379| Dependency Scanning | Snyk, Dependabot, npm audit, pip-audit |380| Secret Detection | GitLeaks, TruffleHog, detect-secrets |381| Container Security | Trivy, Clair, Anchore |382| Infrastructure | Checkov, tfsec, ScoutSuite |383| Network | Wireshark, Nmap, Masscan |384| Penetration | Metasploit, sqlmap, Burp Suite Pro |385386### Cryptographic Algorithm Selection387388| Use Case | Algorithm | Key Size |389|----------|-----------|----------|390| Symmetric encryption | AES-256-GCM | 256 bits |391| Password hashing | Argon2id | N/A (use defaults) |392| Message authentication | HMAC-SHA256 | 256 bits |393| Digital signatures | Ed25519 | 256 bits |394| Key exchange | X25519 | 256 bits |395| TLS | TLS 1.3 | N/A |396397See: [references/cryptography-implementation.md](references/cryptography-implementation.md)398399---400401## Tools and References402403### Scripts404405| Script | Purpose |406|--------|---------|407| [threat_modeler.py](scripts/threat_modeler.py) | STRIDE threat analysis with DREAD risk scoring; JSON and text output; interactive guided mode |408| [secret_scanner.py](scripts/secret_scanner.py) | Detect hardcoded secrets and credentials across 20+ patterns; CI/CD integration ready |409410For usage, see the inline code examples in [Secure Code Review Workflow](#inline-code-examples) and the script source files directly.411412### References413414| Document | Content |415|----------|---------|416| [security-architecture-patterns.md](references/security-architecture-patterns.md) | Zero Trust, defense-in-depth, authentication patterns, API security |417| [threat-modeling-guide.md](references/threat-modeling-guide.md) | STRIDE methodology, attack trees, DREAD scoring, DFD creation |418| [cryptography-implementation.md](references/cryptography-implementation.md) | AES-GCM, RSA, Ed25519, password hashing, key management |419420---421422## Security Standards Reference423424### Security Headers Checklist425426| Header | Recommended Value |427|--------|-------------------|428| Content-Security-Policy | default-src self; script-src self |429| X-Frame-Options | DENY |430| X-Content-Type-Options | nosniff |431| Strict-Transport-Security | max-age=31536000; includeSubDomains |432| Referrer-Policy | strict-origin-when-cross-origin |433| Permissions-Policy | geolocation=(), microphone=(), camera=() |434435For compliance framework requirements (OWASP ASVS, CIS Benchmarks, NIST CSF, PCI-DSS, HIPAA, SOC 2), refer to the respective official documentation.436437---438439## Related Skills440441| Skill | Integration Point |442|-------|-------------------|443| [senior-devops](../senior-devops/) | CI/CD security, infrastructure hardening |444| [senior-secops](../senior-secops/) | Security monitoring, incident response |445| [senior-backend](../senior-backend/) | Secure API development |446| [senior-architect](../senior-architect/) | Security architecture decisions |