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
Creator: Engineering Team
License: MIT
Source Repo: neekware/dojo-skills
Source Bucket: engineering-team
Original Path: engineering-team/senior-security
1---2name: senior-security-23description: Senior Security Engineer4---5# Senior Security Engineer67Security engineering tools for threat modeling, vulnerability analysis, secure architecture design, and penetration testing.89---1011## Table of Contents1213- [Threat Modeling Workflow](#threat-modeling-workflow)14- [Security Architecture Workflow](#security-architecture-workflow)15- [Vulnerability Assessment Workflow](#vulnerability-assessment-workflow)16- [Secure Code Review Workflow](#secure-code-review-workflow)17- [Incident Response Workflow](#incident-response-workflow)18- [Security Tools Reference](#security-tools-reference)19- [Tools and References](#tools-and-references)2021---2223## Threat Modeling Workflow2425Identify and analyze security threats using STRIDE methodology.2627### Workflow: Conduct Threat Model28291. Define system scope and boundaries:30 - Identify assets to protect31 - Map trust boundaries32 - Document data flows332. Create data flow diagram:34 - External entities (users, services)35 - Processes (application components)36 - Data stores (databases, caches)37 - Data flows (APIs, network connections)383. Apply STRIDE to each DFD element (see [STRIDE per Element Matrix](#stride-per-element-matrix) below)394. Score risks using DREAD:40 - Damage potential (1-10)41 - Reproducibility (1-10)42 - Exploitability (1-10)43 - Affected users (1-10)44 - Discoverability (1-10)455. Prioritize threats by risk score466. Define mitigations for each threat477. Document in threat model report488. **Validation:** All DFD elements analyzed; STRIDE applied; threats scored; mitigations mapped4950### STRIDE Threat Categories5152| Category | Security Property | Mitigation Focus |53| ---------------------- | ----------------- | ------------------------------ |54| Spoofing | Authentication | MFA, certificates, strong auth |55| Tampering | Integrity | Signing, checksums, validation |56| Repudiation | Non-repudiation | Audit logs, digital signatures |57| Information Disclosure | Confidentiality | Encryption, access controls |58| Denial of Service | Availability | Rate limiting, redundancy |59| Elevation of Privilege | Authorization | RBAC, least privilege |6061### STRIDE per Element Matrix6263| DFD Element | S | T | R | I | D | E |64| --------------- | --- | --- | --- | --- | --- | --- |65| External Entity | X | | X | | | |66| Process | X | X | X | X | X | X |67| Data Store | | X | X | X | X | |68| Data Flow | | X | | X | X | |6970See: [references/threat-modeling-guide.md](references/threat-modeling-guide.md)7172---7374## Security Architecture Workflow7576Design secure systems using defense-in-depth principles.7778### Workflow: Design Secure Architecture79801. Define security requirements:81 - Compliance requirements (GDPR, HIPAA, PCI-DSS)82 - Data classification (public, internal, confidential, restricted)83 - Threat model inputs842. Apply defense-in-depth layers:85 - Perimeter: WAF, DDoS protection, rate limiting86 - Network: Segmentation, IDS/IPS, mTLS87 - Host: Patching, EDR, hardening88 - Application: Input validation, authentication, secure coding89 - Data: Encryption at rest and in transit903. Implement Zero Trust principles:91 - Verify explicitly (every request)92 - Least privilege access (JIT/JEA)93 - Assume breach (segment, monitor)944. Configure authentication and authorization:95 - Identity provider selection96 - MFA requirements97 - RBAC/ABAC model985. Design encryption strategy:99 - Key management approach100 - Algorithm selection101 - Certificate lifecycle1026. Plan security monitoring:103 - Log aggregation104 - SIEM integration105 - Alerting rules1067. Document architecture decisions1078. **Validation:** Defense-in-depth layers defined; Zero Trust applied; encryption strategy documented; monitoring planned108109### Defense-in-Depth Layers110111```112Layer 1: PERIMETER113 WAF, DDoS mitigation, DNS filtering, rate limiting114115Layer 2: NETWORK116 Segmentation, IDS/IPS, network monitoring, VPN, mTLS117118Layer 3: HOST119 Endpoint protection, OS hardening, patching, logging120121Layer 4: APPLICATION122 Input validation, authentication, secure coding, SAST123124Layer 5: DATA125 Encryption at rest/transit, access controls, DLP, backup126```127128### Authentication Pattern Selection129130| Use Case | Recommended Pattern |131| ------------------ | ------------------------------------------ |132| Web application | OAuth 2.0 + PKCE with OIDC |133| API authentication | JWT with short expiration + refresh tokens |134| Service-to-service | mTLS with certificate rotation |135| CLI/Automation | API keys with IP allowlisting |136| High security | FIDO2/WebAuthn hardware keys |137138See: [references/security-architecture-patterns.md](references/security-architecture-patterns.md)139140---141142## Vulnerability Assessment Workflow143144Identify and remediate security vulnerabilities in applications.145146### Workflow: Conduct Vulnerability Assessment1471481. Define assessment scope:149 - In-scope systems and applications150 - Testing methodology (black box, gray box, white box)151 - Rules of engagement1522. Gather information:153 - Technology stack inventory154 - Architecture documentation155 - Previous vulnerability reports1563. Perform automated scanning:157 - SAST (static analysis)158 - DAST (dynamic analysis)159 - Dependency scanning160 - Secret detection1614. Conduct manual testing:162 - Business logic flaws163 - Authentication bypass164 - Authorization issues165 - Injection vulnerabilities1665. Classify findings by severity:167 - Critical: Immediate exploitation risk168 - High: Significant impact, easier to exploit169 - Medium: Moderate impact or difficulty170 - Low: Minor impact1716. Develop remediation plan:172 - Prioritize by risk173 - Assign owners174 - Set deadlines1757. Verify fixes and document1768. **Validation:** Scope defined; automated and manual testing complete; findings classified; remediation tracked177178For OWASP Top 10 vulnerability descriptions and testing guidance, refer to [owasp.org/Top10](https://owasp.org/Top10).179180### Vulnerability Severity Matrix181182| Impact \ Exploitability | Easy | Moderate | Difficult |183| ----------------------- | -------- | -------- | --------- |184| Critical | Critical | Critical | High |185| High | Critical | High | Medium |186| Medium | High | Medium | Low |187| Low | Medium | Low | Low |188189---190191## Secure Code Review Workflow192193Review code for security vulnerabilities before deployment.194195### Workflow: Conduct Security Code Review1961971. Establish review scope:198 - Changed files and functions199 - Security-sensitive areas (auth, crypto, input handling)200 - Third-party integrations2012. Run automated analysis:202 - SAST tools (Semgrep, CodeQL, Bandit)203 - Secret scanning204 - Dependency vulnerability check2053. Review authentication code:206 - Password handling (hashing, storage)207 - Session management208 - Token validation2094. Review authorization code:210 - Access control checks211 - RBAC implementation212 - Privilege boundaries2135. Review data handling:214 - Input validation215 - Output encoding216 - SQL query construction217 - File path handling2186. Review cryptographic code:219 - Algorithm selection220 - Key management221 - Random number generation2227. Document findings with severity2238. **Validation:** Automated scans passed; auth/authz reviewed; data handling checked; crypto verified; findings documented224225### Security Code Review Checklist226227| Category | Check | Risk |228| ---------------- | ---------------------------------------------------- | ---------------------- |229| Input Validation | All user input validated and sanitized | Injection |230| Output Encoding | Context-appropriate encoding applied | XSS |231| Authentication | Passwords hashed with Argon2/bcrypt | Credential theft |232| Session | Secure cookie flags set (HttpOnly, Secure, SameSite) | Session hijacking |233| Authorization | Server-side permission checks on all endpoints | Privilege escalation |234| SQL | Parameterized queries used exclusively | SQL injection |235| File Access | Path traversal sequences rejected | Path traversal |236| Secrets | No hardcoded credentials or keys | Information disclosure |237| Dependencies | Known vulnerable packages updated | Supply chain |238| Logging | Sensitive data not logged | Information disclosure |239240### Secure vs Insecure Patterns241242| Pattern | Issue | Secure Alternative |243| ---------------------- | ------------------ | -------------------------------------------- |244| SQL string formatting | SQL injection | Use parameterized queries with placeholders |245| Shell command building | Command injection | Use subprocess with argument lists, no shell |246| Path concatenation | Path traversal | Validate and canonicalize paths |247| MD5/SHA1 for passwords | Weak hashing | Use Argon2id or bcrypt |248| Math.random for tokens | Predictable values | Use crypto.getRandomValues |249250### Inline Code Examples251252**SQL Injection — insecure vs. secure (Python):**253254```python255# ❌ Insecure: string formatting allows SQL injection256query = f"SELECT * FROM users WHERE username = '{username}'"257cursor.execute(query)258259# ✅ Secure: parameterized query — user input never interpreted as SQL260query = "SELECT * FROM users WHERE username = %s"261cursor.execute(query, (username,))262```263264**Password Hashing with Argon2id (Python):**265266```python267from argon2 import PasswordHasher268269ph = PasswordHasher() # uses secure defaults (time_cost, memory_cost)270271# On registration272hashed = ph.hash(plain_password)273274# On login — raises argon2.exceptions.VerifyMismatchError on failure275ph.verify(hashed, plain_password)276```277278**Secret Scanning — core pattern matching (Python):**279280```python281import re, pathlib282283SECRET_PATTERNS = {284 "aws_access_key": re.compile(r"AKIA[0-9A-Z]{16}"),285 "github_token": re.compile(r"ghp_[A-Za-z0-9]{36}"),286 "private_key": re.compile(r"-----BEGIN (RSA |EC )?PRIVATE KEY-----"),287 "generic_secret": re.compile(r'(?i)(password|secret|api_key)\s*=\s*["']?\S{8,}'),288}289290def scan_file(path: pathlib.Path) -> list[dict]:291 findings = []292 for lineno, line in enumerate(path.read_text(errors="replace").splitlines(), 1):293 for name, pattern in SECRET_PATTERNS.items():294 if pattern.search(line):295 findings.append({"file": str(path), "line": lineno, "type": name})296 return findings297```298299---300301## Incident Response Workflow302303Respond to and contain security incidents.304305### Workflow: Handle Security Incident3063071. Identify and triage:308 - Validate incident is genuine309 - Assess initial scope and severity310 - Activate incident response team3112. Contain the threat:312 - Isolate affected systems313 - Block malicious IPs/accounts314 - Disable compromised credentials3153. Eradicate root cause:316 - Remove malware/backdoors317 - Patch vulnerabilities318 - Update configurations3194. Recover operations:320 - Restore from clean backups321 - Verify system integrity322 - Monitor for recurrence3235. Conduct post-mortem:324 - Timeline reconstruction325 - Root cause analysis326 - Lessons learned3276. Implement improvements:328 - Update detection rules329 - Enhance controls330 - Update runbooks3317. Document and report3328. **Validation:** Threat contained; root cause eliminated; systems recovered; post-mortem complete; improvements implemented333334### Incident Severity Levels335336| Level | Response Time | Escalation |337| -------------------------------------------- | ------------- | -------------------------- |338| P1 - Critical (active breach/exfiltration) | Immediate | CISO, Legal, Executive |339| P2 - High (confirmed, contained) | 1 hour | Security Lead, IT Director |340| P3 - Medium (potential, under investigation) | 4 hours | Security Team |341| P4 - Low (suspicious, low impact) | 24 hours | On-call engineer |342343### Incident Response Checklist344345| Phase | Actions |346| --------------- | ------------------------------------------------------- |347| Identification | Validate alert, assess scope, determine severity |348| Containment | Isolate systems, preserve evidence, block access |349| Eradication | Remove threat, patch vulnerabilities, reset credentials |350| Recovery | Restore services, verify integrity, increase monitoring |351| Lessons Learned | Document timeline, identify gaps, update procedures |352353---354355## Security Tools Reference356357### Recommended Security Tools358359| Category | Tools |360| ------------------- | --------------------------------------------------------- |361| SAST | Semgrep, CodeQL, Bandit (Python), ESLint security plugins |362| DAST | OWASP ZAP, Burp Suite, Nikto |363| Dependency Scanning | Snyk, Dependabot, npm audit, pip-audit |364| Secret Detection | GitLeaks, TruffleHog, detect-secrets |365| Container Security | Trivy, Clair, Anchore |366| Infrastructure | Checkov, tfsec, ScoutSuite |367| Network | Wireshark, Nmap, Masscan |368| Penetration | Metasploit, sqlmap, Burp Suite Pro |369370### Cryptographic Algorithm Selection371372| Use Case | Algorithm | Key Size |373| ---------------------- | ----------- | ------------------ |374| Symmetric encryption | AES-256-GCM | 256 bits |375| Password hashing | Argon2id | N/A (use defaults) |376| Message authentication | HMAC-SHA256 | 256 bits |377| Digital signatures | Ed25519 | 256 bits |378| Key exchange | X25519 | 256 bits |379| TLS | TLS 1.3 | N/A |380381See: [references/cryptography-implementation.md](references/cryptography-implementation.md)382383---384385## Tools and References386387### Scripts388389| Script | Purpose |390| ---------------------------------------------- | --------------------------------------------------------------------------------------------- |391| [threat_modeler.py](scripts/threat_modeler.py) | STRIDE threat analysis with DREAD risk scoring; JSON and text output; interactive guided mode |392| [secret_scanner.py](scripts/secret_scanner.py) | Detect hardcoded secrets and credentials across 20+ patterns; CI/CD integration ready |393394> **Note:** Bundled scripts ship as Markdown reference (`.md`) — copy the code out of the `.md` file to run it.395396For usage, see the inline code examples in [Secure Code Review Workflow](#inline-code-examples) and the script source files directly.397398### References399400| Document | Content |401| --------------------------------------------------------------------------------- | ------------------------------------------------------------------- |402| [security-architecture-patterns.md](references/security-architecture-patterns.md) | Zero Trust, defense-in-depth, authentication patterns, API security |403| [threat-modeling-guide.md](references/threat-modeling-guide.md) | STRIDE methodology, attack trees, DREAD scoring, DFD creation |404| [cryptography-implementation.md](references/cryptography-implementation.md) | AES-GCM, RSA, Ed25519, password hashing, key management |405406---407408## Security Standards Reference409410### Security Headers Checklist411412| Header | Recommended Value |413| ------------------------- | ---------------------------------------- |414| Content-Security-Policy | default-src self; script-src self |415| X-Frame-Options | DENY |416| X-Content-Type-Options | nosniff |417| Strict-Transport-Security | max-age=31536000; includeSubDomains |418| Referrer-Policy | strict-origin-when-cross-origin |419| Permissions-Policy | geolocation=(), microphone=(), camera=() |420421For compliance framework requirements (OWASP ASVS, CIS Benchmarks, NIST CSF, PCI-DSS, HIPAA, SOC 2), refer to the respective official documentation.422423---424425## Related Skills426427| Skill | Integration Point |428| ---------------------------------------- | ---------------------------------------- |429| [senior-devops](../senior-devops/) | CI/CD security, infrastructure hardening |430| [senior-secops](../senior-secops/) | Security monitoring, incident response |431| [senior-backend](../senior-backend/) | Secure API development |432| [senior-architect](../senior-architect/) | Security architecture decisions |433434> **Creator:** Engineering Team435> **License:** MIT436> **Source Repo:** `neekware/dojo-skills`437> **Source Bucket:** `engineering-team`438> **Original Path:** `engineering-team/senior-security`