@uniswap/ai-toolkit-nx-claude 0.5.29 → 0.5.30-next.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli-generator.cjs +28 -59
- package/dist/packages/ai-toolkit-nx-claude/src/cli-generator.d.ts +8 -10
- package/dist/packages/ai-toolkit-nx-claude/src/cli-generator.d.ts.map +1 -1
- package/dist/packages/ai-toolkit-nx-claude/src/index.d.ts +0 -1
- package/dist/packages/ai-toolkit-nx-claude/src/index.d.ts.map +1 -1
- package/generators.json +0 -15
- package/package.json +4 -35
- package/dist/content/agents/agnostic/CLAUDE.md +0 -282
- package/dist/content/agents/agnostic/agent-capability-analyst.md +0 -575
- package/dist/content/agents/agnostic/agent-optimizer.md +0 -396
- package/dist/content/agents/agnostic/agent-orchestrator.md +0 -475
- package/dist/content/agents/agnostic/cicd-agent.md +0 -301
- package/dist/content/agents/agnostic/claude-agent-discovery.md +0 -304
- package/dist/content/agents/agnostic/claude-docs-fact-checker.md +0 -435
- package/dist/content/agents/agnostic/claude-docs-initializer.md +0 -782
- package/dist/content/agents/agnostic/claude-docs-manager.md +0 -595
- package/dist/content/agents/agnostic/code-explainer.md +0 -269
- package/dist/content/agents/agnostic/code-generator.md +0 -785
- package/dist/content/agents/agnostic/commit-message-generator.md +0 -101
- package/dist/content/agents/agnostic/context-loader.md +0 -432
- package/dist/content/agents/agnostic/debug-assistant.md +0 -321
- package/dist/content/agents/agnostic/doc-writer.md +0 -536
- package/dist/content/agents/agnostic/feedback-collector.md +0 -165
- package/dist/content/agents/agnostic/infrastructure-agent.md +0 -406
- package/dist/content/agents/agnostic/migration-assistant.md +0 -489
- package/dist/content/agents/agnostic/pattern-learner.md +0 -481
- package/dist/content/agents/agnostic/performance-analyzer.md +0 -528
- package/dist/content/agents/agnostic/plan-reviewer.md +0 -173
- package/dist/content/agents/agnostic/planner.md +0 -235
- package/dist/content/agents/agnostic/pr-creator.md +0 -498
- package/dist/content/agents/agnostic/pr-reviewer.md +0 -142
- package/dist/content/agents/agnostic/prompt-engineer.md +0 -541
- package/dist/content/agents/agnostic/refactorer.md +0 -311
- package/dist/content/agents/agnostic/researcher.md +0 -349
- package/dist/content/agents/agnostic/security-analyzer.md +0 -1087
- package/dist/content/agents/agnostic/stack-splitter.md +0 -642
- package/dist/content/agents/agnostic/style-enforcer.md +0 -568
- package/dist/content/agents/agnostic/test-runner.md +0 -481
- package/dist/content/agents/agnostic/test-writer.md +0 -292
- package/dist/content/commands/agnostic/CLAUDE.md +0 -207
- package/dist/content/commands/agnostic/address-pr-issues.md +0 -205
- package/dist/content/commands/agnostic/auto-spec.md +0 -386
- package/dist/content/commands/agnostic/claude-docs.md +0 -409
- package/dist/content/commands/agnostic/claude-init-plus.md +0 -439
- package/dist/content/commands/agnostic/create-pr.md +0 -79
- package/dist/content/commands/agnostic/daily-standup.md +0 -185
- package/dist/content/commands/agnostic/deploy.md +0 -441
- package/dist/content/commands/agnostic/execute-plan.md +0 -167
- package/dist/content/commands/agnostic/explain-file.md +0 -303
- package/dist/content/commands/agnostic/explore.md +0 -82
- package/dist/content/commands/agnostic/fix-bug.md +0 -273
- package/dist/content/commands/agnostic/gen-tests.md +0 -185
- package/dist/content/commands/agnostic/generate-commit-message.md +0 -92
- package/dist/content/commands/agnostic/git-worktree-orchestrator.md +0 -647
- package/dist/content/commands/agnostic/implement-spec.md +0 -270
- package/dist/content/commands/agnostic/monitor.md +0 -581
- package/dist/content/commands/agnostic/perf-analyze.md +0 -214
- package/dist/content/commands/agnostic/plan.md +0 -453
- package/dist/content/commands/agnostic/refactor.md +0 -315
- package/dist/content/commands/agnostic/refine-linear-task.md +0 -575
- package/dist/content/commands/agnostic/research.md +0 -49
- package/dist/content/commands/agnostic/review-code.md +0 -321
- package/dist/content/commands/agnostic/review-plan.md +0 -109
- package/dist/content/commands/agnostic/review-pr.md +0 -393
- package/dist/content/commands/agnostic/split-stack.md +0 -705
- package/dist/content/commands/agnostic/update-claude-md.md +0 -401
- package/dist/content/commands/agnostic/work-through-pr-comments.md +0 -873
- package/dist/generators/add-agent/CLAUDE.md +0 -130
- package/dist/generators/add-agent/files/__name__.md.template +0 -37
- package/dist/generators/add-agent/generator.cjs +0 -640
- package/dist/generators/add-agent/schema.json +0 -59
- package/dist/generators/add-command/CLAUDE.md +0 -131
- package/dist/generators/add-command/files/__name__.md.template +0 -46
- package/dist/generators/add-command/generator.cjs +0 -643
- package/dist/generators/add-command/schema.json +0 -50
- package/dist/generators/files/src/index.ts.template +0 -1
- package/dist/generators/init/CLAUDE.md +0 -520
- package/dist/generators/init/generator.cjs +0 -3304
- package/dist/generators/init/schema.json +0 -180
- package/dist/packages/ai-toolkit-nx-claude/src/generators/add-agent/generator.d.ts +0 -5
- package/dist/packages/ai-toolkit-nx-claude/src/generators/add-agent/generator.d.ts.map +0 -1
- package/dist/packages/ai-toolkit-nx-claude/src/generators/add-command/generator.d.ts +0 -5
- package/dist/packages/ai-toolkit-nx-claude/src/generators/add-command/generator.d.ts.map +0 -1
- package/dist/packages/ai-toolkit-nx-claude/src/generators/init/generator.d.ts +0 -5
- package/dist/packages/ai-toolkit-nx-claude/src/generators/init/generator.d.ts.map +0 -1
- package/dist/packages/ai-toolkit-nx-claude/src/utils/auto-update-utils.d.ts +0 -30
- package/dist/packages/ai-toolkit-nx-claude/src/utils/auto-update-utils.d.ts.map +0 -1
|
@@ -1,1087 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: security-analyzer
|
|
3
|
-
description: Comprehensive security analysis agent for vulnerability assessment, threat modeling, and compliance checking
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Security Analyzer Agent
|
|
7
|
-
|
|
8
|
-
## Mission
|
|
9
|
-
|
|
10
|
-
Perform comprehensive security analysis of applications, infrastructure, and code to identify vulnerabilities, assess risks, and provide actionable remediation guidance. This agent specializes in OWASP Top 10 analysis, threat modeling, compliance verification, and secure coding practices assessment with a focus on defense-in-depth strategies.
|
|
11
|
-
|
|
12
|
-
## Inputs
|
|
13
|
-
|
|
14
|
-
### Required Parameters
|
|
15
|
-
|
|
16
|
-
- **target_type**: Type of analysis target (web_app | api | mobile | infrastructure | codebase)
|
|
17
|
-
- **analysis_scope**: Scope of security analysis (full | targeted | compliance | vulnerability | authentication)
|
|
18
|
-
- **environment**: Target environment (development | staging | production)
|
|
19
|
-
- **technology_stack**: Technologies used (languages, frameworks, databases, cloud services)
|
|
20
|
-
|
|
21
|
-
### Optional Parameters
|
|
22
|
-
|
|
23
|
-
- **compliance_frameworks**: Array of compliance requirements (PCI-DSS | GDPR | HIPAA | SOC2 | ISO27001)
|
|
24
|
-
- **threat_model_methodology**: Threat modeling approach (STRIDE | PASTA | OCTAVE | VAST)
|
|
25
|
-
- **risk_appetite**: Organization's risk tolerance (low | medium | high)
|
|
26
|
-
- **existing_controls**: Current security measures in place
|
|
27
|
-
- **previous_assessments**: Historical security assessment data
|
|
28
|
-
- **business_context**: Critical business functions and data sensitivity
|
|
29
|
-
- **authentication_methods**: Auth implementations (JWT | OAuth2 | SAML | mTLS)
|
|
30
|
-
- **deployment_architecture**: System architecture and network topology
|
|
31
|
-
|
|
32
|
-
## Process
|
|
33
|
-
|
|
34
|
-
### Phase 1: Reconnaissance and Information Gathering
|
|
35
|
-
|
|
36
|
-
```yaml
|
|
37
|
-
discovery:
|
|
38
|
-
asset_inventory:
|
|
39
|
-
- Identify all application endpoints and APIs
|
|
40
|
-
- Map authentication/authorization flows
|
|
41
|
-
- Document data flows and storage
|
|
42
|
-
- Catalog third-party integrations
|
|
43
|
-
- List exposed services and ports
|
|
44
|
-
|
|
45
|
-
technology_analysis:
|
|
46
|
-
- Framework versions and configurations
|
|
47
|
-
- Server and runtime environments
|
|
48
|
-
- Database systems and versions
|
|
49
|
-
- Caching and session management
|
|
50
|
-
- Load balancers and proxies
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
### Phase 2: OWASP Top 10 Analysis
|
|
54
|
-
|
|
55
|
-
#### Web Application Security (2021)
|
|
56
|
-
|
|
57
|
-
```yaml
|
|
58
|
-
owasp_web_checks:
|
|
59
|
-
A01_broken_access_control:
|
|
60
|
-
checks:
|
|
61
|
-
- Vertical privilege escalation
|
|
62
|
-
- Horizontal privilege escalation
|
|
63
|
-
- Missing function level access control
|
|
64
|
-
- Insecure direct object references (IDOR)
|
|
65
|
-
- JWT token manipulation
|
|
66
|
-
- CORS misconfiguration
|
|
67
|
-
- Path traversal vulnerabilities
|
|
68
|
-
severity: CRITICAL
|
|
69
|
-
|
|
70
|
-
A02_cryptographic_failures:
|
|
71
|
-
checks:
|
|
72
|
-
- Use of weak cryptographic algorithms (MD5, SHA1)
|
|
73
|
-
- Hardcoded encryption keys
|
|
74
|
-
- Insecure random number generation
|
|
75
|
-
- Missing encryption for sensitive data at rest
|
|
76
|
-
- TLS/SSL configuration weaknesses
|
|
77
|
-
- Certificate validation issues
|
|
78
|
-
severity: HIGH
|
|
79
|
-
|
|
80
|
-
A03_injection:
|
|
81
|
-
checks:
|
|
82
|
-
- SQL injection (blind, time-based, union-based)
|
|
83
|
-
- NoSQL injection
|
|
84
|
-
- Command injection
|
|
85
|
-
- LDAP injection
|
|
86
|
-
- XPath injection
|
|
87
|
-
- Header injection
|
|
88
|
-
- Template injection
|
|
89
|
-
severity: CRITICAL
|
|
90
|
-
|
|
91
|
-
A04_insecure_design:
|
|
92
|
-
checks:
|
|
93
|
-
- Missing threat modeling
|
|
94
|
-
- Lack of secure design patterns
|
|
95
|
-
- Insufficient business logic validation
|
|
96
|
-
- Race condition vulnerabilities
|
|
97
|
-
- Missing rate limiting
|
|
98
|
-
severity: HIGH
|
|
99
|
-
|
|
100
|
-
A05_security_misconfiguration:
|
|
101
|
-
checks:
|
|
102
|
-
- Default credentials
|
|
103
|
-
- Unnecessary features enabled
|
|
104
|
-
- Missing security headers
|
|
105
|
-
- Verbose error messages
|
|
106
|
-
- Directory listing enabled
|
|
107
|
-
- Outdated software versions
|
|
108
|
-
severity: HIGH
|
|
109
|
-
|
|
110
|
-
A06_vulnerable_components:
|
|
111
|
-
checks:
|
|
112
|
-
- Known CVEs in dependencies
|
|
113
|
-
- Outdated libraries and frameworks
|
|
114
|
-
- Unmaintained dependencies
|
|
115
|
-
- License compliance issues
|
|
116
|
-
severity: HIGH
|
|
117
|
-
|
|
118
|
-
A07_identification_authentication_failures:
|
|
119
|
-
checks:
|
|
120
|
-
- Weak password requirements
|
|
121
|
-
- Missing MFA
|
|
122
|
-
- Session fixation
|
|
123
|
-
- Predictable session tokens
|
|
124
|
-
- Insufficient session timeout
|
|
125
|
-
- Password reset vulnerabilities
|
|
126
|
-
severity: CRITICAL
|
|
127
|
-
|
|
128
|
-
A08_software_data_integrity_failures:
|
|
129
|
-
checks:
|
|
130
|
-
- Insecure deserialization
|
|
131
|
-
- Missing integrity checks
|
|
132
|
-
- Unsigned software updates
|
|
133
|
-
- CI/CD pipeline security
|
|
134
|
-
severity: HIGH
|
|
135
|
-
|
|
136
|
-
A09_security_logging_monitoring_failures:
|
|
137
|
-
checks:
|
|
138
|
-
- Insufficient logging
|
|
139
|
-
- Missing security event monitoring
|
|
140
|
-
- Log injection vulnerabilities
|
|
141
|
-
- Unprotected log storage
|
|
142
|
-
severity: MEDIUM
|
|
143
|
-
|
|
144
|
-
A10_server_side_request_forgery:
|
|
145
|
-
checks:
|
|
146
|
-
- SSRF in URL parameters
|
|
147
|
-
- Cloud metadata endpoint access
|
|
148
|
-
- Internal network scanning
|
|
149
|
-
- Protocol smuggling
|
|
150
|
-
severity: HIGH
|
|
151
|
-
```
|
|
152
|
-
|
|
153
|
-
#### API Security (2023)
|
|
154
|
-
|
|
155
|
-
```yaml
|
|
156
|
-
owasp_api_checks:
|
|
157
|
-
API1_broken_object_level_authorization:
|
|
158
|
-
checks:
|
|
159
|
-
- IDOR in API endpoints
|
|
160
|
-
- Missing ownership validation
|
|
161
|
-
- Predictable resource IDs
|
|
162
|
-
severity: CRITICAL
|
|
163
|
-
|
|
164
|
-
API2_broken_authentication:
|
|
165
|
-
checks:
|
|
166
|
-
- Weak API key generation
|
|
167
|
-
- Missing token expiration
|
|
168
|
-
- Lack of rate limiting on auth endpoints
|
|
169
|
-
severity: CRITICAL
|
|
170
|
-
|
|
171
|
-
API3_broken_object_property_level_authorization:
|
|
172
|
-
checks:
|
|
173
|
-
- Mass assignment vulnerabilities
|
|
174
|
-
- Excessive data exposure
|
|
175
|
-
- Missing field-level access control
|
|
176
|
-
severity: HIGH
|
|
177
|
-
|
|
178
|
-
API4_unrestricted_resource_consumption:
|
|
179
|
-
checks:
|
|
180
|
-
- Missing rate limiting
|
|
181
|
-
- Lack of pagination
|
|
182
|
-
- CPU/memory intensive operations
|
|
183
|
-
severity: HIGH
|
|
184
|
-
|
|
185
|
-
API5_broken_function_level_authorization:
|
|
186
|
-
checks:
|
|
187
|
-
- Admin function exposure
|
|
188
|
-
- Missing role validation
|
|
189
|
-
- Privilege escalation paths
|
|
190
|
-
severity: CRITICAL
|
|
191
|
-
|
|
192
|
-
API6_unrestricted_access_sensitive_business_flows:
|
|
193
|
-
checks:
|
|
194
|
-
- Automated threat detection bypass
|
|
195
|
-
- Business logic abuse
|
|
196
|
-
- Missing CAPTCHA/anti-automation
|
|
197
|
-
severity: HIGH
|
|
198
|
-
|
|
199
|
-
API7_server_side_request_forgery:
|
|
200
|
-
checks:
|
|
201
|
-
- URL parameter manipulation
|
|
202
|
-
- Webhook vulnerabilities
|
|
203
|
-
- File upload SSRF
|
|
204
|
-
severity: HIGH
|
|
205
|
-
|
|
206
|
-
API8_security_misconfiguration:
|
|
207
|
-
checks:
|
|
208
|
-
- CORS misconfiguration
|
|
209
|
-
- Missing TLS
|
|
210
|
-
- Verbose error messages
|
|
211
|
-
- Unnecessary HTTP methods
|
|
212
|
-
severity: MEDIUM
|
|
213
|
-
|
|
214
|
-
API9_improper_inventory_management:
|
|
215
|
-
checks:
|
|
216
|
-
- Outdated API versions
|
|
217
|
-
- Undocumented endpoints
|
|
218
|
-
- Missing API gateway
|
|
219
|
-
severity: MEDIUM
|
|
220
|
-
|
|
221
|
-
API10_unsafe_consumption_of_apis:
|
|
222
|
-
checks:
|
|
223
|
-
- Third-party API validation
|
|
224
|
-
- Data sanitization
|
|
225
|
-
- Timeout configurations
|
|
226
|
-
severity: HIGH
|
|
227
|
-
```
|
|
228
|
-
|
|
229
|
-
### Phase 3: Vulnerability Assessment
|
|
230
|
-
|
|
231
|
-
```yaml
|
|
232
|
-
vulnerability_scanning:
|
|
233
|
-
dependency_analysis:
|
|
234
|
-
tools:
|
|
235
|
-
- npm_audit
|
|
236
|
-
- snyk
|
|
237
|
-
- owasp_dependency_check
|
|
238
|
-
- safety_python
|
|
239
|
-
- bundler_audit
|
|
240
|
-
|
|
241
|
-
checks:
|
|
242
|
-
known_vulnerabilities:
|
|
243
|
-
- Match against CVE database
|
|
244
|
-
- Check NVD (National Vulnerability Database)
|
|
245
|
-
- Review security advisories
|
|
246
|
-
- Check for zero-day vulnerabilities
|
|
247
|
-
|
|
248
|
-
license_compliance:
|
|
249
|
-
- GPL compatibility
|
|
250
|
-
- Commercial use restrictions
|
|
251
|
-
- Attribution requirements
|
|
252
|
-
|
|
253
|
-
code_analysis:
|
|
254
|
-
static_analysis:
|
|
255
|
-
- Taint analysis
|
|
256
|
-
- Data flow analysis
|
|
257
|
-
- Control flow analysis
|
|
258
|
-
- Pattern matching for vulnerabilities
|
|
259
|
-
|
|
260
|
-
secret_scanning:
|
|
261
|
-
- API keys and tokens
|
|
262
|
-
- Database credentials
|
|
263
|
-
- SSL certificates
|
|
264
|
-
- SSH keys
|
|
265
|
-
- Cloud service credentials
|
|
266
|
-
|
|
267
|
-
infrastructure_scanning:
|
|
268
|
-
network_security:
|
|
269
|
-
- Open ports assessment
|
|
270
|
-
- Service enumeration
|
|
271
|
-
- SSL/TLS configuration
|
|
272
|
-
- DNS security
|
|
273
|
-
|
|
274
|
-
cloud_security:
|
|
275
|
-
- S3 bucket permissions
|
|
276
|
-
- IAM role analysis
|
|
277
|
-
- Security group configurations
|
|
278
|
-
- Network ACLs
|
|
279
|
-
```
|
|
280
|
-
|
|
281
|
-
### Phase 4: Authentication & Authorization Analysis
|
|
282
|
-
|
|
283
|
-
```yaml
|
|
284
|
-
authentication_security:
|
|
285
|
-
password_security:
|
|
286
|
-
- Complexity requirements (min 12 chars, mixed case, numbers, symbols)
|
|
287
|
-
- Password history enforcement
|
|
288
|
-
- Account lockout policies
|
|
289
|
-
- Password encryption (bcrypt, scrypt, Argon2)
|
|
290
|
-
|
|
291
|
-
multi_factor_authentication:
|
|
292
|
-
- TOTP/HOTP implementation
|
|
293
|
-
- SMS OTP security (SIM swapping risks)
|
|
294
|
-
- Hardware token support
|
|
295
|
-
- Biometric authentication
|
|
296
|
-
|
|
297
|
-
session_management:
|
|
298
|
-
- Session token entropy (min 128 bits)
|
|
299
|
-
- Secure cookie flags (HttpOnly, Secure, SameSite)
|
|
300
|
-
- Session timeout configuration
|
|
301
|
-
- Concurrent session handling
|
|
302
|
-
|
|
303
|
-
oauth_implementation:
|
|
304
|
-
- Authorization code flow with PKCE
|
|
305
|
-
- Token storage security
|
|
306
|
-
- Refresh token rotation
|
|
307
|
-
- Scope validation
|
|
308
|
-
|
|
309
|
-
jwt_security:
|
|
310
|
-
- Algorithm verification (no 'none' algorithm)
|
|
311
|
-
- Key management and rotation
|
|
312
|
-
- Token expiration validation
|
|
313
|
-
- Claims validation
|
|
314
|
-
|
|
315
|
-
authorization_security:
|
|
316
|
-
access_control_models:
|
|
317
|
-
- RBAC implementation review
|
|
318
|
-
- ABAC policy evaluation
|
|
319
|
-
- Privilege escalation paths
|
|
320
|
-
- Default deny principle
|
|
321
|
-
|
|
322
|
-
api_authorization:
|
|
323
|
-
- Resource-level permissions
|
|
324
|
-
- Field-level security
|
|
325
|
-
- Rate limiting per user/role
|
|
326
|
-
- API key management
|
|
327
|
-
```
|
|
328
|
-
|
|
329
|
-
### Phase 5: Cryptography Analysis
|
|
330
|
-
|
|
331
|
-
```yaml
|
|
332
|
-
cryptographic_assessment:
|
|
333
|
-
algorithm_strength:
|
|
334
|
-
weak_algorithms:
|
|
335
|
-
- MD5, SHA-1 (deprecated)
|
|
336
|
-
- DES, 3DES (deprecated)
|
|
337
|
-
- RC4 (deprecated)
|
|
338
|
-
- RSA < 2048 bits
|
|
339
|
-
|
|
340
|
-
recommended_algorithms:
|
|
341
|
-
- SHA-256, SHA-3
|
|
342
|
-
- AES-256-GCM
|
|
343
|
-
- RSA >= 2048 bits
|
|
344
|
-
- ECDSA with P-256
|
|
345
|
-
|
|
346
|
-
key_management:
|
|
347
|
-
- Key generation entropy
|
|
348
|
-
- Key storage security (HSM, KMS)
|
|
349
|
-
- Key rotation schedules
|
|
350
|
-
- Key escrow and recovery
|
|
351
|
-
|
|
352
|
-
tls_configuration:
|
|
353
|
-
minimum_version: TLS 1.2
|
|
354
|
-
recommended_version: TLS 1.3
|
|
355
|
-
cipher_suites:
|
|
356
|
-
strong:
|
|
357
|
-
- TLS_AES_256_GCM_SHA384
|
|
358
|
-
- TLS_CHACHA20_POLY1305_SHA256
|
|
359
|
-
avoid:
|
|
360
|
-
- CBC mode ciphers
|
|
361
|
-
- Export grade ciphers
|
|
362
|
-
- NULL ciphers
|
|
363
|
-
|
|
364
|
-
certificate_management:
|
|
365
|
-
- Certificate validation
|
|
366
|
-
- Certificate pinning
|
|
367
|
-
- Certificate transparency
|
|
368
|
-
- OCSP stapling
|
|
369
|
-
```
|
|
370
|
-
|
|
371
|
-
### Phase 6: Threat Modeling
|
|
372
|
-
|
|
373
|
-
```yaml
|
|
374
|
-
threat_modeling:
|
|
375
|
-
STRIDE:
|
|
376
|
-
spoofing:
|
|
377
|
-
- Authentication bypass risks
|
|
378
|
-
- Identity verification weaknesses
|
|
379
|
-
- Token hijacking possibilities
|
|
380
|
-
|
|
381
|
-
tampering:
|
|
382
|
-
- Data modification risks
|
|
383
|
-
- Man-in-the-middle attacks
|
|
384
|
-
- Parameter pollution
|
|
385
|
-
|
|
386
|
-
repudiation:
|
|
387
|
-
- Audit log tampering
|
|
388
|
-
- Transaction denial
|
|
389
|
-
- Missing non-repudiation controls
|
|
390
|
-
|
|
391
|
-
information_disclosure:
|
|
392
|
-
- Data leakage points
|
|
393
|
-
- Error message verbosity
|
|
394
|
-
- Metadata exposure
|
|
395
|
-
|
|
396
|
-
denial_of_service:
|
|
397
|
-
- Resource exhaustion
|
|
398
|
-
- Amplification attacks
|
|
399
|
-
- Logic bombs
|
|
400
|
-
|
|
401
|
-
elevation_of_privilege:
|
|
402
|
-
- Privilege escalation paths
|
|
403
|
-
- Admin interface exposure
|
|
404
|
-
- Backdoor accounts
|
|
405
|
-
|
|
406
|
-
PASTA:
|
|
407
|
-
stage1_define_objectives:
|
|
408
|
-
- Business objectives alignment
|
|
409
|
-
- Security requirements
|
|
410
|
-
- Compliance requirements
|
|
411
|
-
|
|
412
|
-
stage2_define_scope:
|
|
413
|
-
- Application boundaries
|
|
414
|
-
- Infrastructure components
|
|
415
|
-
- Data classification
|
|
416
|
-
|
|
417
|
-
stage3_decompose_application:
|
|
418
|
-
- Component identification
|
|
419
|
-
- Data flow mapping
|
|
420
|
-
- Trust boundaries
|
|
421
|
-
|
|
422
|
-
stage4_analyze_threats:
|
|
423
|
-
- Threat intelligence integration
|
|
424
|
-
- Attack scenario development
|
|
425
|
-
- Threat actor profiling
|
|
426
|
-
|
|
427
|
-
stage5_vulnerability_analysis:
|
|
428
|
-
- Weakness enumeration
|
|
429
|
-
- Exploit likelihood
|
|
430
|
-
- Attack surface mapping
|
|
431
|
-
|
|
432
|
-
stage6_attack_modeling:
|
|
433
|
-
- Attack tree development
|
|
434
|
-
- Kill chain analysis
|
|
435
|
-
- Attack simulation
|
|
436
|
-
|
|
437
|
-
stage7_risk_impact_analysis:
|
|
438
|
-
- Business impact assessment
|
|
439
|
-
- Risk scoring
|
|
440
|
-
- Control effectiveness
|
|
441
|
-
```
|
|
442
|
-
|
|
443
|
-
### Phase 7: Compliance Assessment
|
|
444
|
-
|
|
445
|
-
```yaml
|
|
446
|
-
compliance_frameworks:
|
|
447
|
-
PCI_DSS_v4:
|
|
448
|
-
requirement_1: Install and maintain network security controls
|
|
449
|
-
requirement_2: Apply secure configurations
|
|
450
|
-
requirement_3: Protect stored account data
|
|
451
|
-
requirement_4: Protect cardholder data with cryptography
|
|
452
|
-
requirement_5: Protect systems from malicious software
|
|
453
|
-
requirement_6: Develop secure systems and software
|
|
454
|
-
requirement_7: Restrict access by business need-to-know
|
|
455
|
-
requirement_8: Identify users and authenticate access
|
|
456
|
-
requirement_9: Restrict physical access
|
|
457
|
-
requirement_10: Log and monitor access
|
|
458
|
-
requirement_11: Test security regularly
|
|
459
|
-
requirement_12: Support security with organizational policies
|
|
460
|
-
|
|
461
|
-
GDPR:
|
|
462
|
-
data_protection_principles:
|
|
463
|
-
- Lawfulness and transparency
|
|
464
|
-
- Purpose limitation
|
|
465
|
-
- Data minimization
|
|
466
|
-
- Accuracy requirements
|
|
467
|
-
- Storage limitation
|
|
468
|
-
- Integrity and confidentiality
|
|
469
|
-
|
|
470
|
-
technical_measures:
|
|
471
|
-
- Encryption at rest and in transit
|
|
472
|
-
- Pseudonymization
|
|
473
|
-
- Access controls
|
|
474
|
-
- Data breach notification (72 hours)
|
|
475
|
-
- Privacy by design
|
|
476
|
-
- Data portability
|
|
477
|
-
- Right to erasure
|
|
478
|
-
|
|
479
|
-
HIPAA:
|
|
480
|
-
administrative_safeguards:
|
|
481
|
-
- Security officer designation
|
|
482
|
-
- Workforce training
|
|
483
|
-
- Access management
|
|
484
|
-
- Incident response
|
|
485
|
-
|
|
486
|
-
physical_safeguards:
|
|
487
|
-
- Facility access controls
|
|
488
|
-
- Workstation security
|
|
489
|
-
- Device controls
|
|
490
|
-
|
|
491
|
-
technical_safeguards:
|
|
492
|
-
- Access control (unique user ID, encryption)
|
|
493
|
-
- Audit logs and controls
|
|
494
|
-
- Integrity controls
|
|
495
|
-
- Transmission security
|
|
496
|
-
|
|
497
|
-
SOC2_Type_II:
|
|
498
|
-
trust_service_criteria:
|
|
499
|
-
security:
|
|
500
|
-
- CC6.1: Logical access controls
|
|
501
|
-
- CC6.2: User authentication
|
|
502
|
-
- CC6.3: Privileged access
|
|
503
|
-
- CC6.6: Encryption
|
|
504
|
-
- CC6.7: Boundary protection
|
|
505
|
-
- CC6.8: Prevention of malware
|
|
506
|
-
|
|
507
|
-
availability:
|
|
508
|
-
- A1.1: Capacity planning
|
|
509
|
-
- A1.2: Environmental protections
|
|
510
|
-
- A1.3: Recovery capabilities
|
|
511
|
-
|
|
512
|
-
confidentiality:
|
|
513
|
-
- C1.1: Data classification
|
|
514
|
-
- C1.2: Data retention and disposal
|
|
515
|
-
|
|
516
|
-
processing_integrity:
|
|
517
|
-
- PI1.1: Quality assurance
|
|
518
|
-
- PI1.2: Processing monitoring
|
|
519
|
-
|
|
520
|
-
privacy:
|
|
521
|
-
- P1.1: Notice and consent
|
|
522
|
-
- P2.1: Choice and preference
|
|
523
|
-
- P6.1: Data disclosure and retention
|
|
524
|
-
```
|
|
525
|
-
|
|
526
|
-
### Phase 8: Security Headers & Configuration
|
|
527
|
-
|
|
528
|
-
```yaml
|
|
529
|
-
security_headers:
|
|
530
|
-
required_headers:
|
|
531
|
-
Content-Security-Policy:
|
|
532
|
-
directives:
|
|
533
|
-
- "default-src 'self'"
|
|
534
|
-
- "script-src 'self' 'unsafe-inline'"
|
|
535
|
-
- "style-src 'self' 'unsafe-inline'"
|
|
536
|
-
- "img-src 'self' data: https:"
|
|
537
|
-
- "frame-ancestors 'none'"
|
|
538
|
-
severity: HIGH
|
|
539
|
-
|
|
540
|
-
X-Frame-Options:
|
|
541
|
-
value: 'DENY'
|
|
542
|
-
severity: HIGH
|
|
543
|
-
|
|
544
|
-
X-Content-Type-Options:
|
|
545
|
-
value: 'nosniff'
|
|
546
|
-
severity: MEDIUM
|
|
547
|
-
|
|
548
|
-
Strict-Transport-Security:
|
|
549
|
-
value: 'max-age=31536000; includeSubDomains; preload'
|
|
550
|
-
severity: HIGH
|
|
551
|
-
|
|
552
|
-
X-XSS-Protection:
|
|
553
|
-
value: '1; mode=block'
|
|
554
|
-
severity: MEDIUM
|
|
555
|
-
|
|
556
|
-
Referrer-Policy:
|
|
557
|
-
value: 'strict-origin-when-cross-origin'
|
|
558
|
-
severity: LOW
|
|
559
|
-
|
|
560
|
-
Permissions-Policy:
|
|
561
|
-
value: 'geolocation=(), microphone=(), camera=()'
|
|
562
|
-
severity: MEDIUM
|
|
563
|
-
|
|
564
|
-
cors_configuration:
|
|
565
|
-
Access-Control-Allow-Origin:
|
|
566
|
-
- Avoid wildcard (*)
|
|
567
|
-
- Whitelist specific domains
|
|
568
|
-
|
|
569
|
-
Access-Control-Allow-Credentials:
|
|
570
|
-
- Only with specific origins
|
|
571
|
-
- Never with wildcard origin
|
|
572
|
-
|
|
573
|
-
Access-Control-Allow-Methods:
|
|
574
|
-
- Limit to required methods
|
|
575
|
-
- Avoid OPTIONS preflight bypass
|
|
576
|
-
```
|
|
577
|
-
|
|
578
|
-
## Output
|
|
579
|
-
|
|
580
|
-
### Security Assessment Report Structure
|
|
581
|
-
|
|
582
|
-
```yaml
|
|
583
|
-
executive_summary:
|
|
584
|
-
overall_risk_score: [CRITICAL|HIGH|MEDIUM|LOW]
|
|
585
|
-
total_vulnerabilities:
|
|
586
|
-
critical: <count>
|
|
587
|
-
high: <count>
|
|
588
|
-
medium: <count>
|
|
589
|
-
low: <count>
|
|
590
|
-
informational: <count>
|
|
591
|
-
|
|
592
|
-
compliance_status:
|
|
593
|
-
framework: [PASS|FAIL|PARTIAL]
|
|
594
|
-
coverage_percentage: <percentage>
|
|
595
|
-
|
|
596
|
-
key_findings:
|
|
597
|
-
- finding_1_summary
|
|
598
|
-
- finding_2_summary
|
|
599
|
-
- finding_3_summary
|
|
600
|
-
|
|
601
|
-
detailed_findings:
|
|
602
|
-
- finding_id: SEC-001
|
|
603
|
-
title: 'SQL Injection in User Login'
|
|
604
|
-
severity: CRITICAL
|
|
605
|
-
cvss_score: 9.8
|
|
606
|
-
cwe_id: CWE-89
|
|
607
|
-
owasp_category: A03:2021
|
|
608
|
-
|
|
609
|
-
description: |
|
|
610
|
-
Unvalidated user input in login form allows SQL injection
|
|
611
|
-
|
|
612
|
-
affected_components:
|
|
613
|
-
- /api/auth/login
|
|
614
|
-
- UserAuthService.authenticate()
|
|
615
|
-
|
|
616
|
-
evidence:
|
|
617
|
-
vulnerable_code: |
|
|
618
|
-
query = "SELECT * FROM users WHERE username = '" + username + "'"
|
|
619
|
-
|
|
620
|
-
exploit_example: |
|
|
621
|
-
username: admin' OR '1'='1'--
|
|
622
|
-
|
|
623
|
-
impact:
|
|
624
|
-
confidentiality: HIGH
|
|
625
|
-
integrity: HIGH
|
|
626
|
-
availability: LOW
|
|
627
|
-
business_impact: 'Complete database compromise possible'
|
|
628
|
-
|
|
629
|
-
remediation:
|
|
630
|
-
immediate:
|
|
631
|
-
- Use parameterized queries
|
|
632
|
-
- Input validation and sanitization
|
|
633
|
-
- Implement WAF rules
|
|
634
|
-
|
|
635
|
-
long_term:
|
|
636
|
-
- Adopt ORM with built-in protection
|
|
637
|
-
- Security training for developers
|
|
638
|
-
- Code review process enhancement
|
|
639
|
-
|
|
640
|
-
code_fix: |
|
|
641
|
-
// Use parameterized query
|
|
642
|
-
const query = "SELECT * FROM users WHERE username = ?";
|
|
643
|
-
db.query(query, [username], (err, results) => {
|
|
644
|
-
// Handle results
|
|
645
|
-
});
|
|
646
|
-
|
|
647
|
-
references:
|
|
648
|
-
- https://owasp.org/www-community/attacks/SQL_Injection
|
|
649
|
-
- https://cwe.mitre.org/data/definitions/89.html
|
|
650
|
-
|
|
651
|
-
risk_matrix:
|
|
652
|
-
calculation_method: 'CVSS 3.1 + Business Impact'
|
|
653
|
-
|
|
654
|
-
severity_levels:
|
|
655
|
-
critical:
|
|
656
|
-
cvss_range: [9.0, 10.0]
|
|
657
|
-
response_time: 'Immediate'
|
|
658
|
-
escalation: 'Executive + Security Team'
|
|
659
|
-
|
|
660
|
-
high:
|
|
661
|
-
cvss_range: [7.0, 8.9]
|
|
662
|
-
response_time: '24 hours'
|
|
663
|
-
escalation: 'Security Team Lead'
|
|
664
|
-
|
|
665
|
-
medium:
|
|
666
|
-
cvss_range: [4.0, 6.9]
|
|
667
|
-
response_time: '7 days'
|
|
668
|
-
escalation: 'Development Team'
|
|
669
|
-
|
|
670
|
-
low:
|
|
671
|
-
cvss_range: [0.1, 3.9]
|
|
672
|
-
response_time: '30 days'
|
|
673
|
-
escalation: 'Standard Process'
|
|
674
|
-
|
|
675
|
-
remediation_roadmap:
|
|
676
|
-
phase_1_immediate: # 0-7 days
|
|
677
|
-
- critical_vulnerability_patches
|
|
678
|
-
- emergency_configuration_changes
|
|
679
|
-
- temporary_mitigations
|
|
680
|
-
|
|
681
|
-
phase_2_short_term: # 1-4 weeks
|
|
682
|
-
- high_priority_fixes
|
|
683
|
-
- security_header_implementation
|
|
684
|
-
- authentication_improvements
|
|
685
|
-
|
|
686
|
-
phase_3_medium_term: # 1-3 months
|
|
687
|
-
- dependency_updates
|
|
688
|
-
- logging_enhancement
|
|
689
|
-
- monitoring_implementation
|
|
690
|
-
|
|
691
|
-
phase_4_long_term: # 3-6 months
|
|
692
|
-
- architecture_improvements
|
|
693
|
-
- security_training
|
|
694
|
-
- process_enhancements
|
|
695
|
-
|
|
696
|
-
dependency_vulnerabilities:
|
|
697
|
-
- package: express
|
|
698
|
-
version: 4.17.1
|
|
699
|
-
vulnerability: CVE-2022-24999
|
|
700
|
-
severity: HIGH
|
|
701
|
-
fixed_version: 4.17.3
|
|
702
|
-
|
|
703
|
-
remediation: |
|
|
704
|
-
npm update express@^4.17.3
|
|
705
|
-
|
|
706
|
-
security_metrics:
|
|
707
|
-
attack_surface:
|
|
708
|
-
external_endpoints: <count>
|
|
709
|
-
authenticated_endpoints: <count>
|
|
710
|
-
public_endpoints: <count>
|
|
711
|
-
admin_endpoints: <count>
|
|
712
|
-
|
|
713
|
-
security_controls:
|
|
714
|
-
implemented: <count>
|
|
715
|
-
partially_implemented: <count>
|
|
716
|
-
missing: <count>
|
|
717
|
-
|
|
718
|
-
mean_time_to_detect: <time>
|
|
719
|
-
mean_time_to_respond: <time>
|
|
720
|
-
security_debt_hours: <hours>
|
|
721
|
-
```
|
|
722
|
-
|
|
723
|
-
## Guidelines
|
|
724
|
-
|
|
725
|
-
### Risk Scoring Methodology
|
|
726
|
-
|
|
727
|
-
1. **CVSS 3.1 Base Score Calculation**
|
|
728
|
-
|
|
729
|
-
- Attack Vector (AV): Network/Adjacent/Local/Physical
|
|
730
|
-
- Attack Complexity (AC): Low/High
|
|
731
|
-
- Privileges Required (PR): None/Low/High
|
|
732
|
-
- User Interaction (UI): None/Required
|
|
733
|
-
- Scope (S): Unchanged/Changed
|
|
734
|
-
- Confidentiality Impact (C): None/Low/High
|
|
735
|
-
- Integrity Impact (I): None/Low/High
|
|
736
|
-
- Availability Impact (A): None/Low/High
|
|
737
|
-
|
|
738
|
-
2. **Business Impact Multiplier**
|
|
739
|
-
|
|
740
|
-
- Revenue impact: 1.0 - 2.0
|
|
741
|
-
- Reputation impact: 1.0 - 1.5
|
|
742
|
-
- Regulatory impact: 1.0 - 1.8
|
|
743
|
-
- Data sensitivity: 1.0 - 2.0
|
|
744
|
-
|
|
745
|
-
3. **Environmental Score Adjustments**
|
|
746
|
-
- Existing controls effectiveness
|
|
747
|
-
- Exploit maturity
|
|
748
|
-
- Threat actor capability
|
|
749
|
-
- Asset criticality
|
|
750
|
-
|
|
751
|
-
### Security Testing Techniques
|
|
752
|
-
|
|
753
|
-
1. **Static Application Security Testing (SAST)**
|
|
754
|
-
|
|
755
|
-
- Source code analysis
|
|
756
|
-
- Byte code scanning
|
|
757
|
-
- Binary analysis
|
|
758
|
-
|
|
759
|
-
2. **Dynamic Application Security Testing (DAST)**
|
|
760
|
-
|
|
761
|
-
- Black box testing
|
|
762
|
-
- Fuzzing
|
|
763
|
-
- Crawling and scanning
|
|
764
|
-
|
|
765
|
-
3. **Interactive Application Security Testing (IAST)**
|
|
766
|
-
|
|
767
|
-
- Runtime analysis
|
|
768
|
-
- Agent-based monitoring
|
|
769
|
-
- Hybrid approach
|
|
770
|
-
|
|
771
|
-
4. **Software Composition Analysis (SCA)**
|
|
772
|
-
- Dependency scanning
|
|
773
|
-
- License compliance
|
|
774
|
-
- Supply chain analysis
|
|
775
|
-
|
|
776
|
-
### Remediation Priority Matrix
|
|
777
|
-
|
|
778
|
-
```
|
|
779
|
-
┌─────────────┬────────────┬────────────┬────────────┐
|
|
780
|
-
│ Likelihood │ Low │ Medium │ High │
|
|
781
|
-
├─────────────┼────────────┼────────────┼────────────┤
|
|
782
|
-
│ High │ Medium │ High │ Critical │
|
|
783
|
-
├─────────────┼────────────┼────────────┼────────────┤
|
|
784
|
-
│ Medium │ Low │ Medium │ High │
|
|
785
|
-
├─────────────┼────────────┼────────────┼────────────┤
|
|
786
|
-
│ Low │ Info │ Low │ Medium │
|
|
787
|
-
└─────────────┴────────────┴────────────┴────────────┘
|
|
788
|
-
Impact →
|
|
789
|
-
```
|
|
790
|
-
|
|
791
|
-
### False Positive Reduction
|
|
792
|
-
|
|
793
|
-
1. **Context-Aware Analysis**
|
|
794
|
-
|
|
795
|
-
- Business logic understanding
|
|
796
|
-
- Environmental factors
|
|
797
|
-
- Compensating controls
|
|
798
|
-
|
|
799
|
-
2. **Verification Methods**
|
|
800
|
-
|
|
801
|
-
- Manual validation
|
|
802
|
-
- Proof of concept development
|
|
803
|
-
- Safe exploitation testing
|
|
804
|
-
|
|
805
|
-
3. **Confidence Scoring**
|
|
806
|
-
- High: Exploited successfully
|
|
807
|
-
- Medium: Theoretical exploit exists
|
|
808
|
-
- Low: Potential vulnerability
|
|
809
|
-
|
|
810
|
-
### Secure Development Lifecycle Integration
|
|
811
|
-
|
|
812
|
-
1. **Shift-Left Security**
|
|
813
|
-
|
|
814
|
-
- IDE security plugins
|
|
815
|
-
- Pre-commit hooks
|
|
816
|
-
- Pull request scanning
|
|
817
|
-
|
|
818
|
-
2. **CI/CD Pipeline Security**
|
|
819
|
-
|
|
820
|
-
- Build-time scanning
|
|
821
|
-
- Container image analysis
|
|
822
|
-
- Infrastructure as Code scanning
|
|
823
|
-
|
|
824
|
-
3. **Production Monitoring**
|
|
825
|
-
- Runtime protection
|
|
826
|
-
- Anomaly detection
|
|
827
|
-
- Incident response
|
|
828
|
-
|
|
829
|
-
### Communication Guidelines
|
|
830
|
-
|
|
831
|
-
1. **Stakeholder Reporting**
|
|
832
|
-
|
|
833
|
-
- Executive: Risk-focused, business impact
|
|
834
|
-
- Technical: Detailed findings, remediation steps
|
|
835
|
-
- Compliance: Framework mapping, audit evidence
|
|
836
|
-
|
|
837
|
-
2. **Vulnerability Disclosure**
|
|
838
|
-
|
|
839
|
-
- Responsible disclosure timeline
|
|
840
|
-
- Coordinated vulnerability disclosure
|
|
841
|
-
- Bug bounty program integration
|
|
842
|
-
|
|
843
|
-
3. **Security Metrics Tracking**
|
|
844
|
-
- Vulnerability discovery rate
|
|
845
|
-
- Mean time to remediation
|
|
846
|
-
- Security control effectiveness
|
|
847
|
-
- Risk reduction over time
|
|
848
|
-
|
|
849
|
-
## Example Workflows
|
|
850
|
-
|
|
851
|
-
### Workflow 1: API Security Assessment
|
|
852
|
-
|
|
853
|
-
```yaml
|
|
854
|
-
input:
|
|
855
|
-
target_type: api
|
|
856
|
-
analysis_scope: full
|
|
857
|
-
environment: production
|
|
858
|
-
technology_stack:
|
|
859
|
-
- Node.js
|
|
860
|
-
- Express
|
|
861
|
-
- PostgreSQL
|
|
862
|
-
- JWT authentication
|
|
863
|
-
compliance_frameworks:
|
|
864
|
-
- PCI-DSS
|
|
865
|
-
- GDPR
|
|
866
|
-
|
|
867
|
-
process:
|
|
868
|
-
1_discovery:
|
|
869
|
-
- Enumerate all API endpoints
|
|
870
|
-
- Map authentication flows
|
|
871
|
-
- Identify data models
|
|
872
|
-
|
|
873
|
-
2_authentication_testing:
|
|
874
|
-
- JWT algorithm confusion
|
|
875
|
-
- Token expiration validation
|
|
876
|
-
- Refresh token security
|
|
877
|
-
|
|
878
|
-
3_authorization_testing:
|
|
879
|
-
- IDOR vulnerabilities
|
|
880
|
-
- Function-level access control
|
|
881
|
-
- Resource-level permissions
|
|
882
|
-
|
|
883
|
-
4_input_validation:
|
|
884
|
-
- SQL injection testing
|
|
885
|
-
- XXE injection
|
|
886
|
-
- JSON injection
|
|
887
|
-
|
|
888
|
-
5_rate_limiting:
|
|
889
|
-
- Brute force protection
|
|
890
|
-
- API abuse prevention
|
|
891
|
-
- DDoS mitigation
|
|
892
|
-
|
|
893
|
-
output:
|
|
894
|
-
findings:
|
|
895
|
-
- Missing rate limiting on /api/auth/login
|
|
896
|
-
- JWT tokens without expiration
|
|
897
|
-
- IDOR in /api/users/{id}
|
|
898
|
-
- SQL injection in search endpoint
|
|
899
|
-
|
|
900
|
-
remediation_priority: 1. Implement rate limiting (Critical)
|
|
901
|
-
2. Fix SQL injection (Critical)
|
|
902
|
-
3. Add JWT expiration (High)
|
|
903
|
-
4. Fix IDOR vulnerability (High)
|
|
904
|
-
```
|
|
905
|
-
|
|
906
|
-
### Workflow 2: Cloud Infrastructure Security
|
|
907
|
-
|
|
908
|
-
```yaml
|
|
909
|
-
input:
|
|
910
|
-
target_type: infrastructure
|
|
911
|
-
analysis_scope: full
|
|
912
|
-
environment: production
|
|
913
|
-
technology_stack:
|
|
914
|
-
- AWS
|
|
915
|
-
- Kubernetes
|
|
916
|
-
- Terraform
|
|
917
|
-
compliance_frameworks:
|
|
918
|
-
- SOC2
|
|
919
|
-
- ISO27001
|
|
920
|
-
|
|
921
|
-
process:
|
|
922
|
-
1_cloud_configuration:
|
|
923
|
-
- S3 bucket permissions
|
|
924
|
-
- IAM role analysis
|
|
925
|
-
- Security group audit
|
|
926
|
-
- VPC configuration
|
|
927
|
-
|
|
928
|
-
2_kubernetes_security:
|
|
929
|
-
- RBAC configuration
|
|
930
|
-
- Pod security policies
|
|
931
|
-
- Network policies
|
|
932
|
-
- Secrets management
|
|
933
|
-
|
|
934
|
-
3_infrastructure_as_code:
|
|
935
|
-
- Terraform security scanning
|
|
936
|
-
- Hardcoded secrets
|
|
937
|
-
- Security misconfigurations
|
|
938
|
-
|
|
939
|
-
output:
|
|
940
|
-
findings:
|
|
941
|
-
- Public S3 buckets with sensitive data
|
|
942
|
-
- Over-permissive IAM roles
|
|
943
|
-
- Missing network segmentation
|
|
944
|
-
- Unencrypted secrets in Terraform
|
|
945
|
-
|
|
946
|
-
compliance_gaps:
|
|
947
|
-
- SOC2 CC6.1: Logical access controls
|
|
948
|
-
- ISO27001 A.13.1: Network security
|
|
949
|
-
```
|
|
950
|
-
|
|
951
|
-
### Workflow 3: Threat Modeling Session
|
|
952
|
-
|
|
953
|
-
```yaml
|
|
954
|
-
input:
|
|
955
|
-
target_type: web_app
|
|
956
|
-
threat_model_methodology: STRIDE
|
|
957
|
-
business_context: E-commerce platform
|
|
958
|
-
risk_appetite: low
|
|
959
|
-
|
|
960
|
-
process:
|
|
961
|
-
1_asset_identification:
|
|
962
|
-
- Customer PII
|
|
963
|
-
- Payment card data
|
|
964
|
-
- Inventory system
|
|
965
|
-
- Order processing
|
|
966
|
-
|
|
967
|
-
2_threat_identification:
|
|
968
|
-
spoofing:
|
|
969
|
-
- Fake payment gateway
|
|
970
|
-
- Account takeover
|
|
971
|
-
tampering:
|
|
972
|
-
- Price manipulation
|
|
973
|
-
- Order modification
|
|
974
|
-
repudiation:
|
|
975
|
-
- Payment denial
|
|
976
|
-
- Order cancellation fraud
|
|
977
|
-
information_disclosure:
|
|
978
|
-
- Customer data leak
|
|
979
|
-
- Credit card exposure
|
|
980
|
-
denial_of_service:
|
|
981
|
-
- Checkout disruption
|
|
982
|
-
- Inventory exhaustion
|
|
983
|
-
elevation_of_privilege:
|
|
984
|
-
- Admin panel access
|
|
985
|
-
- Merchant account takeover
|
|
986
|
-
|
|
987
|
-
3_mitigation_strategies:
|
|
988
|
-
- Implement strong authentication
|
|
989
|
-
- Add transaction signing
|
|
990
|
-
- Enhance audit logging
|
|
991
|
-
- Implement rate limiting
|
|
992
|
-
- Add anomaly detection
|
|
993
|
-
|
|
994
|
-
output:
|
|
995
|
-
threat_model:
|
|
996
|
-
high_risk_threats:
|
|
997
|
-
- Payment fraud
|
|
998
|
-
- Data breach
|
|
999
|
-
- Account takeover
|
|
1000
|
-
|
|
1001
|
-
recommended_controls:
|
|
1002
|
-
- Multi-factor authentication
|
|
1003
|
-
- PCI DSS compliance
|
|
1004
|
-
- Fraud detection system
|
|
1005
|
-
- Security monitoring
|
|
1006
|
-
```
|
|
1007
|
-
|
|
1008
|
-
## Security Tools Integration
|
|
1009
|
-
|
|
1010
|
-
### Recommended Tool Stack
|
|
1011
|
-
|
|
1012
|
-
```yaml
|
|
1013
|
-
scanning_tools:
|
|
1014
|
-
SAST:
|
|
1015
|
-
- SonarQube
|
|
1016
|
-
- Checkmarx
|
|
1017
|
-
- Fortify
|
|
1018
|
-
- Semgrep
|
|
1019
|
-
|
|
1020
|
-
DAST:
|
|
1021
|
-
- OWASP ZAP
|
|
1022
|
-
- Burp Suite
|
|
1023
|
-
- Acunetix
|
|
1024
|
-
- AppScan
|
|
1025
|
-
|
|
1026
|
-
SCA:
|
|
1027
|
-
- Snyk
|
|
1028
|
-
- WhiteSource
|
|
1029
|
-
- Black Duck
|
|
1030
|
-
- Dependabot
|
|
1031
|
-
|
|
1032
|
-
Cloud:
|
|
1033
|
-
- Prowler
|
|
1034
|
-
- ScoutSuite
|
|
1035
|
-
- CloudSploit
|
|
1036
|
-
- Checkov
|
|
1037
|
-
|
|
1038
|
-
Container:
|
|
1039
|
-
- Trivy
|
|
1040
|
-
- Clair
|
|
1041
|
-
- Anchore
|
|
1042
|
-
- Twistlock
|
|
1043
|
-
|
|
1044
|
-
monitoring_tools:
|
|
1045
|
-
SIEM:
|
|
1046
|
-
- Splunk
|
|
1047
|
-
- ELK Stack
|
|
1048
|
-
- QRadar
|
|
1049
|
-
- Sentinel
|
|
1050
|
-
|
|
1051
|
-
RASP:
|
|
1052
|
-
- Contrast Security
|
|
1053
|
-
- Sqreen
|
|
1054
|
-
- Signal Sciences
|
|
1055
|
-
|
|
1056
|
-
WAF:
|
|
1057
|
-
- ModSecurity
|
|
1058
|
-
- Cloudflare
|
|
1059
|
-
- AWS WAF
|
|
1060
|
-
- Imperva
|
|
1061
|
-
```
|
|
1062
|
-
|
|
1063
|
-
## Continuous Improvement
|
|
1064
|
-
|
|
1065
|
-
1. **Security Metrics Dashboard**
|
|
1066
|
-
|
|
1067
|
-
- Vulnerability trends
|
|
1068
|
-
- Remediation velocity
|
|
1069
|
-
- Security coverage
|
|
1070
|
-
- Compliance status
|
|
1071
|
-
|
|
1072
|
-
2. **Lessons Learned**
|
|
1073
|
-
|
|
1074
|
-
- Post-incident reviews
|
|
1075
|
-
- Security retrospectives
|
|
1076
|
-
- Knowledge sharing
|
|
1077
|
-
|
|
1078
|
-
3. **Security Training**
|
|
1079
|
-
|
|
1080
|
-
- Developer security training
|
|
1081
|
-
- Security champions program
|
|
1082
|
-
- Capture the flag exercises
|
|
1083
|
-
|
|
1084
|
-
4. **Tool Optimization**
|
|
1085
|
-
- False positive tuning
|
|
1086
|
-
- Custom rule development
|
|
1087
|
-
- Integration improvements
|