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 |
Note: Bundled scripts ship as Markdown reference (.md) — copy the code out of the .md file to run it.
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-security3description: 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.4---56# Senior Security Engineer78Security engineering tools for threat modeling, vulnerability analysis, secure architecture design, and penetration testing.910---1112## Table of Contents1314- [Threat Modeling Workflow](#threat-modeling-workflow)15- [Security Architecture Workflow](#security-architecture-workflow)16- [Vulnerability Assessment Workflow](#vulnerability-assessment-workflow)17- [Secure Code Review Workflow](#secure-code-review-workflow)18- [Incident Response Workflow](#incident-response-workflow)19- [Security Tools Reference](#security-tools-reference)20- [Tools and References](#tools-and-references)2122---2324## Threat Modeling Workflow2526Identify and analyze security threats using STRIDE methodology.2728### Workflow: Conduct Threat Model29301. Define system scope and boundaries:31 - Identify assets to protect32 - Map trust boundaries33 - Document data flows342. Create data flow diagram:35 - External entities (users, services)36 - Processes (application components)37 - Data stores (databases, caches)38 - Data flows (APIs, network connections)393. Apply STRIDE to each DFD element (see [STRIDE per Element Matrix](#stride-per-element-matrix) below)404. Score risks using DREAD:41 - Damage potential (1-10)42 - Reproducibility (1-10)43 - Exploitability (1-10)44 - Affected users (1-10)45 - Discoverability (1-10)465. Prioritize threats by risk score476. Define mitigations for each threat487. Document in threat model report498. **Validation:** All DFD elements analyzed; STRIDE applied; threats scored; mitigations mapped5051### STRIDE Threat Categories5253| Category | Security Property | Mitigation Focus |54| ---------------------- | ----------------- | ------------------------------ |55| Spoofing | Authentication | MFA, certificates, strong auth |56| Tampering | Integrity | Signing, checksums, validation |57| Repudiation | Non-repudiation | Audit logs, digital signatures |58| Information Disclosure | Confidentiality | Encryption, access controls |59| Denial of Service | Availability | Rate limiting, redundancy |60| Elevation of Privilege | Authorization | RBAC, least privilege |6162### STRIDE per Element Matrix6364| DFD Element | S | T | R | I | D | E |65| --------------- | --- | --- | --- | --- | --- | --- |66| External Entity | X | | X | | | |67| Process | X | X | X | X | X | X |68| Data Store | | X | X | X | X | |69| Data Flow | | X | | X | X | |7071See: [references/threat-modeling-guide.md](references/threat-modeling-guide.md)7273---7475## Security Architecture Workflow7677Design secure systems using defense-in-depth principles.7879### Workflow: Design Secure Architecture80811. Define security requirements:82 - Compliance requirements (GDPR, HIPAA, PCI-DSS)83 - Data classification (public, internal, confidential, restricted)84 - Threat model inputs852. Apply defense-in-depth layers:86 - Perimeter: WAF, DDoS protection, rate limiting87 - Network: Segmentation, IDS/IPS, mTLS88 - Host: Patching, EDR, hardening89 - Application: Input validation, authentication, secure coding90 - Data: Encryption at rest and in transit913. Implement Zero Trust principles:92 - Verify explicitly (every request)93 - Least privilege access (JIT/JEA)94 - Assume breach (segment, monitor)954. Configure authentication and authorization:96 - Identity provider selection97 - MFA requirements98 - RBAC/ABAC model995. Design encryption strategy:100 - Key management approach101 - Algorithm selection102 - Certificate lifecycle1036. Plan security monitoring:104 - Log aggregation105 - SIEM integration106 - Alerting rules1077. Document architecture decisions1088. **Validation:** Defense-in-depth layers defined; Zero Trust applied; encryption strategy documented; monitoring planned109110### Defense-in-Depth Layers111112```113Layer 1: PERIMETER114 WAF, DDoS mitigation, DNS filtering, rate limiting115116Layer 2: NETWORK117 Segmentation, IDS/IPS, network monitoring, VPN, mTLS118119Layer 3: HOST120 Endpoint protection, OS hardening, patching, logging121122Layer 4: APPLICATION123 Input validation, authentication, secure coding, SAST124125Layer 5: DATA126 Encryption at rest/transit, access controls, DLP, backup127```128129### Authentication Pattern Selection130131| Use Case | Recommended Pattern |132| ------------------ | ------------------------------------------ |133| Web application | OAuth 2.0 + PKCE with OIDC |134| API authentication | JWT with short expiration + refresh tokens |135| Service-to-service | mTLS with certificate rotation |136| CLI/Automation | API keys with IP allowlisting |137| High security | FIDO2/WebAuthn hardware keys |138139See: [references/security-architecture-patterns.md](references/security-architecture-patterns.md)140141---142143## Vulnerability Assessment Workflow144145Identify and remediate security vulnerabilities in applications.146147### Workflow: Conduct Vulnerability Assessment1481491. Define assessment scope:150 - In-scope systems and applications151 - Testing methodology (black box, gray box, white box)152 - Rules of engagement1532. Gather information:154 - Technology stack inventory155 - Architecture documentation156 - Previous vulnerability reports1573. Perform automated scanning:158 - SAST (static analysis)159 - DAST (dynamic analysis)160 - Dependency scanning161 - Secret detection1624. Conduct manual testing:163 - Business logic flaws164 - Authentication bypass165 - Authorization issues166 - Injection vulnerabilities1675. Classify findings by severity:168 - Critical: Immediate exploitation risk169 - High: Significant impact, easier to exploit170 - Medium: Moderate impact or difficulty171 - Low: Minor impact1726. Develop remediation plan:173 - Prioritize by risk174 - Assign owners175 - Set deadlines1767. Verify fixes and document1778. **Validation:** Scope defined; automated and manual testing complete; findings classified; remediation tracked178179For OWASP Top 10 vulnerability descriptions and testing guidance, refer to [owasp.org/Top10](https://owasp.org/Top10).180181### Vulnerability Severity Matrix182183| Impact \ Exploitability | Easy | Moderate | Difficult |184| ----------------------- | -------- | -------- | --------- |185| Critical | Critical | Critical | High |186| High | Critical | High | Medium |187| Medium | High | Medium | Low |188| Low | Medium | Low | Low |189190---191192## Secure Code Review Workflow193194Review code for security vulnerabilities before deployment.195196### Workflow: Conduct Security Code Review1971981. Establish review scope:199 - Changed files and functions200 - Security-sensitive areas (auth, crypto, input handling)201 - Third-party integrations2022. Run automated analysis:203 - SAST tools (Semgrep, CodeQL, Bandit)204 - Secret scanning205 - Dependency vulnerability check2063. Review authentication code:207 - Password handling (hashing, storage)208 - Session management209 - Token validation2104. Review authorization code:211 - Access control checks212 - RBAC implementation213 - Privilege boundaries2145. Review data handling:215 - Input validation216 - Output encoding217 - SQL query construction218 - File path handling2196. Review cryptographic code:220 - Algorithm selection221 - Key management222 - Random number generation2237. Document findings with severity2248. **Validation:** Automated scans passed; auth/authz reviewed; data handling checked; crypto verified; findings documented225226### Security Code Review Checklist227228| Category | Check | Risk |229| ---------------- | ---------------------------------------------------- | ---------------------- |230| Input Validation | All user input validated and sanitized | Injection |231| Output Encoding | Context-appropriate encoding applied | XSS |232| Authentication | Passwords hashed with Argon2/bcrypt | Credential theft |233| Session | Secure cookie flags set (HttpOnly, Secure, SameSite) | Session hijacking |234| Authorization | Server-side permission checks on all endpoints | Privilege escalation |235| SQL | Parameterized queries used exclusively | SQL injection |236| File Access | Path traversal sequences rejected | Path traversal |237| Secrets | No hardcoded credentials or keys | Information disclosure |238| Dependencies | Known vulnerable packages updated | Supply chain |239| Logging | Sensitive data not logged | Information disclosure |240241### Secure vs Insecure Patterns242243| Pattern | Issue | Secure Alternative |244| ---------------------- | ------------------ | -------------------------------------------- |245| SQL string formatting | SQL injection | Use parameterized queries with placeholders |246| Shell command building | Command injection | Use subprocess with argument lists, no shell |247| Path concatenation | Path traversal | Validate and canonicalize paths |248| MD5/SHA1 for passwords | Weak hashing | Use Argon2id or bcrypt |249| Math.random for tokens | Predictable values | Use crypto.getRandomValues |250251### Inline Code Examples252253**SQL Injection — insecure vs. secure (Python):**254255```python256# ❌ Insecure: string formatting allows SQL injection257query = f"SELECT * FROM users WHERE username = '{username}'"258cursor.execute(query)259260# ✅ Secure: parameterized query — user input never interpreted as SQL261query = "SELECT * FROM users WHERE username = %s"262cursor.execute(query, (username,))263```264265**Password Hashing with Argon2id (Python):**266267```python268from argon2 import PasswordHasher269270ph = PasswordHasher() # uses secure defaults (time_cost, memory_cost)271272# On registration273hashed = ph.hash(plain_password)274275# On login — raises argon2.exceptions.VerifyMismatchError on failure276ph.verify(hashed, plain_password)277```278279**Secret Scanning — core pattern matching (Python):**280281```python282import re, pathlib283284SECRET_PATTERNS = {285 "aws_access_key": re.compile(r"AKIA[0-9A-Z]{16}"),286 "github_token": re.compile(r"ghp_[A-Za-z0-9]{36}"),287 "private_key": re.compile(r"-----BEGIN (RSA |EC )?PRIVATE KEY-----"),288 "generic_secret": re.compile(r'(?i)(password|secret|api_key)\s*=\s*["']?\S{8,}'),289}290291def scan_file(path: pathlib.Path) -> list[dict]:292 findings = []293 for lineno, line in enumerate(path.read_text(errors="replace").splitlines(), 1):294 for name, pattern in SECRET_PATTERNS.items():295 if pattern.search(line):296 findings.append({"file": str(path), "line": lineno, "type": name})297 return findings298```299300---301302## Incident Response Workflow303304Respond to and contain security incidents.305306### Workflow: Handle Security Incident3073081. Identify and triage:309 - Validate incident is genuine310 - Assess initial scope and severity311 - Activate incident response team3122. Contain the threat:313 - Isolate affected systems314 - Block malicious IPs/accounts315 - Disable compromised credentials3163. Eradicate root cause:317 - Remove malware/backdoors318 - Patch vulnerabilities319 - Update configurations3204. Recover operations:321 - Restore from clean backups322 - Verify system integrity323 - Monitor for recurrence3245. Conduct post-mortem:325 - Timeline reconstruction326 - Root cause analysis327 - Lessons learned3286. Implement improvements:329 - Update detection rules330 - Enhance controls331 - Update runbooks3327. Document and report3338. **Validation:** Threat contained; root cause eliminated; systems recovered; post-mortem complete; improvements implemented334335### Incident Severity Levels336337| Level | Response Time | Escalation |338| -------------------------------------------- | ------------- | -------------------------- |339| P1 - Critical (active breach/exfiltration) | Immediate | CISO, Legal, Executive |340| P2 - High (confirmed, contained) | 1 hour | Security Lead, IT Director |341| P3 - Medium (potential, under investigation) | 4 hours | Security Team |342| P4 - Low (suspicious, low impact) | 24 hours | On-call engineer |343344### Incident Response Checklist345346| Phase | Actions |347| --------------- | ------------------------------------------------------- |348| Identification | Validate alert, assess scope, determine severity |349| Containment | Isolate systems, preserve evidence, block access |350| Eradication | Remove threat, patch vulnerabilities, reset credentials |351| Recovery | Restore services, verify integrity, increase monitoring |352| Lessons Learned | Document timeline, identify gaps, update procedures |353354---355356## Security Tools Reference357358### Recommended Security Tools359360| Category | Tools |361| ------------------- | --------------------------------------------------------- |362| SAST | Semgrep, CodeQL, Bandit (Python), ESLint security plugins |363| DAST | OWASP ZAP, Burp Suite, Nikto |364| Dependency Scanning | Snyk, Dependabot, npm audit, pip-audit |365| Secret Detection | GitLeaks, TruffleHog, detect-secrets |366| Container Security | Trivy, Clair, Anchore |367| Infrastructure | Checkov, tfsec, ScoutSuite |368| Network | Wireshark, Nmap, Masscan |369| Penetration | Metasploit, sqlmap, Burp Suite Pro |370371### Cryptographic Algorithm Selection372373| Use Case | Algorithm | Key Size |374| ---------------------- | ----------- | ------------------ |375| Symmetric encryption | AES-256-GCM | 256 bits |376| Password hashing | Argon2id | N/A (use defaults) |377| Message authentication | HMAC-SHA256 | 256 bits |378| Digital signatures | Ed25519 | 256 bits |379| Key exchange | X25519 | 256 bits |380| TLS | TLS 1.3 | N/A |381382See: [references/cryptography-implementation.md](references/cryptography-implementation.md)383384---385386## Tools and References387388### Scripts389390| Script | Purpose |391| ---------------------------------------------- | --------------------------------------------------------------------------------------------- |392| [threat_modeler.py](scripts/threat_modeler.py) | STRIDE threat analysis with DREAD risk scoring; JSON and text output; interactive guided mode |393| [secret_scanner.py](scripts/secret_scanner.py) | Detect hardcoded secrets and credentials across 20+ patterns; CI/CD integration ready |394395> **Note:** Bundled scripts ship as Markdown reference (`.md`) — copy the code out of the `.md` file to run it.396397For usage, see the inline code examples in [Secure Code Review Workflow](#inline-code-examples) and the script source files directly.398399### References400401| Document | Content |402| --------------------------------------------------------------------------------- | ------------------------------------------------------------------- |403| [security-architecture-patterns.md](references/security-architecture-patterns.md) | Zero Trust, defense-in-depth, authentication patterns, API security |404| [threat-modeling-guide.md](references/threat-modeling-guide.md) | STRIDE methodology, attack trees, DREAD scoring, DFD creation |405| [cryptography-implementation.md](references/cryptography-implementation.md) | AES-GCM, RSA, Ed25519, password hashing, key management |406407---408409## Security Standards Reference410411### Security Headers Checklist412413| Header | Recommended Value |414| ------------------------- | ---------------------------------------- |415| Content-Security-Policy | default-src self; script-src self |416| X-Frame-Options | DENY |417| X-Content-Type-Options | nosniff |418| Strict-Transport-Security | max-age=31536000; includeSubDomains |419| Referrer-Policy | strict-origin-when-cross-origin |420| Permissions-Policy | geolocation=(), microphone=(), camera=() |421422For compliance framework requirements (OWASP ASVS, CIS Benchmarks, NIST CSF, PCI-DSS, HIPAA, SOC 2), refer to the respective official documentation.423424---425426## Related Skills427428| Skill | Integration Point |429| ---------------------------------------- | ---------------------------------------- |430| [senior-devops](../senior-devops/) | CI/CD security, infrastructure hardening |431| [senior-secops](../senior-secops/) | Security monitoring, incident response |432| [senior-backend](../senior-backend/) | Secure API development |433| [senior-architect](../senior-architect/) | Security architecture decisions |