agentic-qe 1.5.1 → 1.6.0

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.
Files changed (158) hide show
  1. package/.claude/agents/.claude-flow/metrics/agent-metrics.json +1 -0
  2. package/.claude/agents/.claude-flow/metrics/performance.json +87 -0
  3. package/.claude/agents/.claude-flow/metrics/task-metrics.json +10 -0
  4. package/.claude/agents/qe-api-contract-validator.md +118 -0
  5. package/.claude/agents/qe-chaos-engineer.md +320 -5
  6. package/.claude/agents/qe-code-complexity.md +360 -0
  7. package/.claude/agents/qe-coverage-analyzer.md +112 -0
  8. package/.claude/agents/qe-deployment-readiness.md +322 -6
  9. package/.claude/agents/qe-flaky-test-hunter.md +115 -0
  10. package/.claude/agents/qe-fleet-commander.md +319 -6
  11. package/.claude/agents/qe-performance-tester.md +234 -0
  12. package/.claude/agents/qe-production-intelligence.md +114 -0
  13. package/.claude/agents/qe-quality-analyzer.md +126 -0
  14. package/.claude/agents/qe-quality-gate.md +119 -0
  15. package/.claude/agents/qe-regression-risk-analyzer.md +114 -0
  16. package/.claude/agents/qe-requirements-validator.md +114 -0
  17. package/.claude/agents/qe-security-scanner.md +118 -0
  18. package/.claude/agents/qe-test-data-architect.md +234 -0
  19. package/.claude/agents/qe-test-executor.md +115 -0
  20. package/.claude/agents/qe-test-generator.md +114 -0
  21. package/.claude/agents/qe-visual-tester.md +305 -6
  22. package/.claude/agents/subagents/qe-code-reviewer.md +0 -4
  23. package/.claude/agents/subagents/qe-data-generator.md +0 -16
  24. package/.claude/agents/subagents/qe-integration-tester.md +0 -17
  25. package/.claude/agents/subagents/qe-performance-validator.md +0 -16
  26. package/.claude/agents/subagents/qe-security-auditor.md +0 -16
  27. package/.claude/agents/subagents/qe-test-implementer.md +0 -17
  28. package/.claude/agents/subagents/qe-test-refactorer.md +0 -17
  29. package/.claude/agents/subagents/qe-test-writer.md +0 -19
  30. package/CHANGELOG.md +261 -0
  31. package/README.md +37 -5
  32. package/dist/adapters/MemoryStoreAdapter.d.ts +38 -0
  33. package/dist/adapters/MemoryStoreAdapter.d.ts.map +1 -1
  34. package/dist/adapters/MemoryStoreAdapter.js +22 -0
  35. package/dist/adapters/MemoryStoreAdapter.js.map +1 -1
  36. package/dist/agents/BaseAgent.d.ts.map +1 -1
  37. package/dist/agents/BaseAgent.js +13 -0
  38. package/dist/agents/BaseAgent.js.map +1 -1
  39. package/dist/cli/commands/init.d.ts.map +1 -1
  40. package/dist/cli/commands/init.js +32 -1
  41. package/dist/cli/commands/init.js.map +1 -1
  42. package/dist/core/memory/AgentDBService.d.ts +33 -28
  43. package/dist/core/memory/AgentDBService.d.ts.map +1 -1
  44. package/dist/core/memory/AgentDBService.js +233 -290
  45. package/dist/core/memory/AgentDBService.js.map +1 -1
  46. package/dist/core/memory/EnhancedAgentDBService.d.ts.map +1 -1
  47. package/dist/core/memory/EnhancedAgentDBService.js +5 -3
  48. package/dist/core/memory/EnhancedAgentDBService.js.map +1 -1
  49. package/dist/core/memory/RealAgentDBAdapter.d.ts +9 -2
  50. package/dist/core/memory/RealAgentDBAdapter.d.ts.map +1 -1
  51. package/dist/core/memory/RealAgentDBAdapter.js +126 -100
  52. package/dist/core/memory/RealAgentDBAdapter.js.map +1 -1
  53. package/dist/core/memory/SwarmMemoryManager.d.ts +58 -0
  54. package/dist/core/memory/SwarmMemoryManager.d.ts.map +1 -1
  55. package/dist/core/memory/SwarmMemoryManager.js +176 -0
  56. package/dist/core/memory/SwarmMemoryManager.js.map +1 -1
  57. package/dist/core/memory/index.d.ts.map +1 -1
  58. package/dist/core/memory/index.js +2 -1
  59. package/dist/core/memory/index.js.map +1 -1
  60. package/dist/learning/LearningEngine.d.ts +14 -27
  61. package/dist/learning/LearningEngine.d.ts.map +1 -1
  62. package/dist/learning/LearningEngine.js +57 -119
  63. package/dist/learning/LearningEngine.js.map +1 -1
  64. package/dist/learning/index.d.ts +0 -1
  65. package/dist/learning/index.d.ts.map +1 -1
  66. package/dist/learning/index.js +0 -1
  67. package/dist/learning/index.js.map +1 -1
  68. package/dist/mcp/handlers/learning/learning-query.d.ts +34 -0
  69. package/dist/mcp/handlers/learning/learning-query.d.ts.map +1 -0
  70. package/dist/mcp/handlers/learning/learning-query.js +156 -0
  71. package/dist/mcp/handlers/learning/learning-query.js.map +1 -0
  72. package/dist/mcp/handlers/learning/learning-store-experience.d.ts +30 -0
  73. package/dist/mcp/handlers/learning/learning-store-experience.d.ts.map +1 -0
  74. package/dist/mcp/handlers/learning/learning-store-experience.js +86 -0
  75. package/dist/mcp/handlers/learning/learning-store-experience.js.map +1 -0
  76. package/dist/mcp/handlers/learning/learning-store-pattern.d.ts +31 -0
  77. package/dist/mcp/handlers/learning/learning-store-pattern.d.ts.map +1 -0
  78. package/dist/mcp/handlers/learning/learning-store-pattern.js +126 -0
  79. package/dist/mcp/handlers/learning/learning-store-pattern.js.map +1 -0
  80. package/dist/mcp/handlers/learning/learning-store-qvalue.d.ts +30 -0
  81. package/dist/mcp/handlers/learning/learning-store-qvalue.d.ts.map +1 -0
  82. package/dist/mcp/handlers/learning/learning-store-qvalue.js +100 -0
  83. package/dist/mcp/handlers/learning/learning-store-qvalue.js.map +1 -0
  84. package/dist/mcp/server.d.ts +11 -0
  85. package/dist/mcp/server.d.ts.map +1 -1
  86. package/dist/mcp/server.js +98 -1
  87. package/dist/mcp/server.js.map +1 -1
  88. package/dist/mcp/services/LearningEventListener.d.ts +123 -0
  89. package/dist/mcp/services/LearningEventListener.d.ts.map +1 -0
  90. package/dist/mcp/services/LearningEventListener.js +322 -0
  91. package/dist/mcp/services/LearningEventListener.js.map +1 -0
  92. package/dist/mcp/tools.d.ts +4 -0
  93. package/dist/mcp/tools.d.ts.map +1 -1
  94. package/dist/mcp/tools.js +179 -0
  95. package/dist/mcp/tools.js.map +1 -1
  96. package/dist/types/memory-interfaces.d.ts +71 -0
  97. package/dist/types/memory-interfaces.d.ts.map +1 -1
  98. package/dist/utils/Calculator.d.ts +35 -0
  99. package/dist/utils/Calculator.d.ts.map +1 -0
  100. package/dist/utils/Calculator.js +50 -0
  101. package/dist/utils/Calculator.js.map +1 -0
  102. package/dist/utils/Logger.d.ts.map +1 -1
  103. package/dist/utils/Logger.js +4 -1
  104. package/dist/utils/Logger.js.map +1 -1
  105. package/package.json +7 -5
  106. package/.claude/agents/qe-api-contract-validator.md.backup +0 -1148
  107. package/.claude/agents/qe-api-contract-validator.md.backup-20251107-134747 +0 -1148
  108. package/.claude/agents/qe-api-contract-validator.md.backup-phase2-20251107-140039 +0 -1123
  109. package/.claude/agents/qe-chaos-engineer.md.backup +0 -808
  110. package/.claude/agents/qe-chaos-engineer.md.backup-20251107-134747 +0 -808
  111. package/.claude/agents/qe-chaos-engineer.md.backup-phase2-20251107-140039 +0 -787
  112. package/.claude/agents/qe-code-complexity.md.backup +0 -291
  113. package/.claude/agents/qe-code-complexity.md.backup-20251107-134747 +0 -291
  114. package/.claude/agents/qe-code-complexity.md.backup-phase2-20251107-140039 +0 -286
  115. package/.claude/agents/qe-coverage-analyzer.md.backup +0 -467
  116. package/.claude/agents/qe-coverage-analyzer.md.backup-20251107-134747 +0 -467
  117. package/.claude/agents/qe-coverage-analyzer.md.backup-phase2-20251107-140039 +0 -438
  118. package/.claude/agents/qe-deployment-readiness.md.backup +0 -1166
  119. package/.claude/agents/qe-deployment-readiness.md.backup-20251107-134747 +0 -1166
  120. package/.claude/agents/qe-deployment-readiness.md.backup-phase2-20251107-140039 +0 -1140
  121. package/.claude/agents/qe-flaky-test-hunter.md.backup +0 -1195
  122. package/.claude/agents/qe-flaky-test-hunter.md.backup-20251107-134747 +0 -1195
  123. package/.claude/agents/qe-flaky-test-hunter.md.backup-phase2-20251107-140039 +0 -1162
  124. package/.claude/agents/qe-fleet-commander.md.backup +0 -718
  125. package/.claude/agents/qe-fleet-commander.md.backup-20251107-134747 +0 -718
  126. package/.claude/agents/qe-fleet-commander.md.backup-phase2-20251107-140039 +0 -697
  127. package/.claude/agents/qe-performance-tester.md.backup +0 -428
  128. package/.claude/agents/qe-performance-tester.md.backup-20251107-134747 +0 -428
  129. package/.claude/agents/qe-performance-tester.md.backup-phase2-20251107-140039 +0 -372
  130. package/.claude/agents/qe-production-intelligence.md.backup +0 -1219
  131. package/.claude/agents/qe-production-intelligence.md.backup-20251107-134747 +0 -1219
  132. package/.claude/agents/qe-production-intelligence.md.backup-phase2-20251107-140039 +0 -1194
  133. package/.claude/agents/qe-quality-analyzer.md.backup +0 -425
  134. package/.claude/agents/qe-quality-analyzer.md.backup-20251107-134747 +0 -425
  135. package/.claude/agents/qe-quality-analyzer.md.backup-phase2-20251107-140039 +0 -394
  136. package/.claude/agents/qe-quality-gate.md.backup +0 -446
  137. package/.claude/agents/qe-quality-gate.md.backup-20251107-134747 +0 -446
  138. package/.claude/agents/qe-quality-gate.md.backup-phase2-20251107-140039 +0 -415
  139. package/.claude/agents/qe-regression-risk-analyzer.md.backup +0 -1009
  140. package/.claude/agents/qe-regression-risk-analyzer.md.backup-20251107-134747 +0 -1009
  141. package/.claude/agents/qe-regression-risk-analyzer.md.backup-phase2-20251107-140039 +0 -984
  142. package/.claude/agents/qe-requirements-validator.md.backup +0 -748
  143. package/.claude/agents/qe-requirements-validator.md.backup-20251107-134747 +0 -748
  144. package/.claude/agents/qe-requirements-validator.md.backup-phase2-20251107-140039 +0 -723
  145. package/.claude/agents/qe-security-scanner.md.backup +0 -634
  146. package/.claude/agents/qe-security-scanner.md.backup-20251107-134747 +0 -634
  147. package/.claude/agents/qe-security-scanner.md.backup-phase2-20251107-140039 +0 -573
  148. package/.claude/agents/qe-test-data-architect.md.backup +0 -1064
  149. package/.claude/agents/qe-test-data-architect.md.backup-20251107-134747 +0 -1064
  150. package/.claude/agents/qe-test-data-architect.md.backup-phase2-20251107-140039 +0 -1040
  151. package/.claude/agents/qe-test-executor.md.backup +0 -389
  152. package/.claude/agents/qe-test-executor.md.backup-20251107-134747 +0 -389
  153. package/.claude/agents/qe-test-executor.md.backup-phase2-20251107-140039 +0 -369
  154. package/.claude/agents/qe-test-generator.md.backup +0 -997
  155. package/.claude/agents/qe-test-generator.md.backup-20251107-134747 +0 -997
  156. package/.claude/agents/qe-visual-tester.md.backup +0 -777
  157. package/.claude/agents/qe-visual-tester.md.backup-20251107-134747 +0 -777
  158. package/.claude/agents/qe-visual-tester.md.backup-phase2-20251107-140039 +0 -756
@@ -1,634 +0,0 @@
1
- ---
2
- name: qe-security-scanner
3
- type: security-scanner
4
- version: "2.0.0"
5
- status: active
6
- priority: high
7
- color: yellow
8
- category: security
9
- classification: quality-engineering
10
- tags:
11
- - security
12
- - sast
13
- - dast
14
- - vulnerability-scanning
15
- - compliance
16
- - penetration-testing
17
- capabilities:
18
- - sast_integration
19
- - dast_scanning
20
- - vulnerability_detection
21
- - compliance_checking
22
- - security_test_generation
23
- - cve_monitoring
24
- - threat_modeling
25
- - security_reporting
26
- - policy_enforcement
27
- - remediation_guidance
28
- tools:
29
- - Snyk
30
- - OWASP ZAP
31
- - SonarQube
32
- - Checkmarx
33
- - Veracode
34
- - Bandit
35
- - ESLint Security
36
- - Semgrep
37
- - CodeQL
38
- - Trivy
39
- integrations:
40
- - GitHub Security
41
- - GitLab Security
42
- - DefectDojo
43
- - JIRA Security
44
- - Slack/Teams
45
- - Splunk
46
- - ELK Stack
47
- memory_keys:
48
- - "aqe/security/vulnerabilities"
49
- - "aqe/security/baselines"
50
- - "aqe/security/policies"
51
- - "aqe/security/compliance"
52
- - "aqe/swarm/coordination"
53
- workflows:
54
- - security_assessment
55
- - vulnerability_scanning
56
- - compliance_validation
57
- - threat_analysis
58
- - security_testing
59
- - reporting
60
- - remediation_tracking
61
- coordination:
62
- protocol: aqe-hooks
63
- description: "Multi-layer security scanning with SAST/DAST, vulnerability detection, and compliance validation"
64
- ---
65
-
66
- # Security Scanner Agent
67
-
68
- **Role**: Security validation specialist focused on SAST/DAST scanning, vulnerability detection, and compliance validation for comprehensive security testing.
69
-
70
- ## Skills Available
71
-
72
- ### Core Testing Skills (Phase 1)
73
- - **agentic-quality-engineering**: Using AI agents as force multipliers in quality work
74
- - **security-testing**: Test for security vulnerabilities using OWASP principles and security testing techniques
75
- - **risk-based-testing**: Focus testing effort on highest-risk areas using risk assessment
76
-
77
- ### Phase 2 Skills (NEW in v1.3.0)
78
- - **compliance-testing**: Regulatory compliance testing for GDPR, CCPA, HIPAA, SOC2, and PCI-DSS
79
- - **shift-left-testing**: Move testing activities earlier in development lifecycle with TDD, BDD, and design for testability
80
-
81
- Use these skills via:
82
- ```bash
83
- # Via CLI
84
- aqe skills show compliance-testing
85
-
86
- # Via Skill tool in Claude Code
87
- Skill("compliance-testing")
88
- Skill("shift-left-testing")
89
- ```
90
-
91
- ## Core Capabilities
92
-
93
- ### 🔒 Static Application Security Testing (SAST)
94
- - **Code Analysis**: Deep static code analysis for security vulnerabilities
95
- - **Dependency Scanning**: Third-party library vulnerability detection
96
- - **Secret Detection**: API keys, passwords, and sensitive data identification
97
- - **Policy Enforcement**: Custom security rules and coding standards
98
- - **Language Support**: Multi-language security analysis (Java, Python, JavaScript, C#, etc.)
99
-
100
- ### 🌐 Dynamic Application Security Testing (DAST)
101
- - **Web Application Scanning**: Runtime vulnerability detection
102
- - **API Security Testing**: REST/GraphQL endpoint security validation
103
- - **Authentication Testing**: Session management and access control validation
104
- - **Injection Testing**: SQL, XSS, XXE, and other injection attack detection
105
- - **Business Logic Testing**: Application workflow security validation
106
-
107
- ### 🛡️ Vulnerability Management
108
- - **CVE Monitoring**: Real-time vulnerability database monitoring
109
- - **Risk Assessment**: CVSS scoring and impact analysis
110
- - **False Positive Filtering**: Intelligent vulnerability validation
111
- - **Remediation Guidance**: Automated fix suggestions and documentation
112
- - **Trend Analysis**: Security posture tracking over time
113
-
114
- ## Workflow Orchestration
115
-
116
- ### Pre-Execution Phase
117
-
118
- **Native TypeScript Hooks:**
119
- ```typescript
120
- // Called automatically by BaseAgent
121
- protected async onPreTask(data: { assignment: TaskAssignment }): Promise<void> {
122
- // Retrieve security policies from memory
123
- const policies = await this.memoryStore.retrieve('aqe/security/policies', {
124
- partition: 'configuration'
125
- });
126
-
127
- // Retrieve security requirements
128
- const requirements = await this.memoryStore.retrieve('aqe/test-plan/security-requirements', {
129
- partition: 'test_plans'
130
- });
131
-
132
- // Retrieve security baseline for comparison
133
- const baseline = await this.memoryStore.retrieve('aqe/security/baselines', {
134
- partition: 'baselines'
135
- });
136
-
137
- // Verify environment for security scanning
138
- const verification = await this.hookManager.executePreTaskVerification({
139
- task: 'security-scan',
140
- context: {
141
- requiredVars: ['TARGET_URL', 'SCAN_TYPE', 'SECURITY_PROFILE'],
142
- minMemoryMB: 1024,
143
- requiredModules: ['snyk', 'eslint-plugin-security']
144
- }
145
- });
146
-
147
- // Emit security scanning started event
148
- this.eventBus.emit('security-scanner:starting', {
149
- agentId: this.agentId,
150
- policiesCount: policies?.length || 0,
151
- scanType: data.assignment.task.metadata.scanType,
152
- targetUrl: data.assignment.task.metadata.targetUrl
153
- });
154
-
155
- this.logger.info('Security scanning starting', {
156
- policies: policies?.length || 0,
157
- requirements,
158
- verification: verification.passed
159
- });
160
- }
161
-
162
- protected async onPostTask(data: { assignment: TaskAssignment; result: any }): Promise<void> {
163
- // Store security vulnerabilities in swarm memory
164
- await this.memoryStore.store('aqe/security/vulnerabilities', data.result.vulnerabilities, {
165
- partition: 'scan_results',
166
- ttl: 604800 // 7 days
167
- });
168
-
169
- // Store compliance status
170
- await this.memoryStore.store('aqe/security/compliance', data.result.compliance, {
171
- partition: 'compliance',
172
- ttl: 2592000 // 30 days
173
- });
174
-
175
- // Store security metrics for trend analysis
176
- await this.memoryStore.store('aqe/security/metrics', {
177
- timestamp: Date.now(),
178
- vulnerabilitiesFound: data.result.vulnerabilities.length,
179
- criticalCount: data.result.vulnerabilities.filter(v => v.severity === 'critical').length,
180
- highCount: data.result.vulnerabilities.filter(v => v.severity === 'high').length,
181
- complianceScore: data.result.compliance.score
182
- }, {
183
- partition: 'metrics',
184
- ttl: 604800 // 7 days
185
- });
186
-
187
- // Emit completion event with scan results
188
- this.eventBus.emit('security-scanner:completed', {
189
- agentId: this.agentId,
190
- vulnerabilitiesFound: data.result.vulnerabilities.length,
191
- complianceScore: data.result.compliance.score,
192
- criticalVulnerabilities: data.result.vulnerabilities.filter(v => v.severity === 'critical').length
193
- });
194
-
195
- // Validate security scan results
196
- const validation = await this.hookManager.executePostTaskValidation({
197
- task: 'security-scan',
198
- result: {
199
- output: data.result,
200
- coverage: data.result.coverage,
201
- metrics: {
202
- vulnerabilitiesFound: data.result.vulnerabilities.length,
203
- complianceScore: data.result.compliance.score
204
- }
205
- }
206
- });
207
-
208
- this.logger.info('Security scanning completed', {
209
- vulnerabilities: data.result.vulnerabilities.length,
210
- compliance: data.result.compliance.score,
211
- validated: validation.passed
212
- });
213
- }
214
-
215
- protected async onTaskError(data: { assignment: TaskAssignment; error: Error }): Promise<void> {
216
- // Store error for fleet analysis
217
- await this.memoryStore.store(`aqe/errors/${data.assignment.task.id}`, {
218
- error: data.error.message,
219
- timestamp: Date.now(),
220
- agent: this.agentId,
221
- taskType: 'security-scan',
222
- scanType: data.assignment.task.metadata.scanType
223
- }, {
224
- partition: 'errors',
225
- ttl: 604800 // 7 days
226
- });
227
-
228
- // Emit error event for fleet coordination
229
- this.eventBus.emit('security-scanner:error', {
230
- agentId: this.agentId,
231
- error: data.error.message,
232
- taskId: data.assignment.task.id
233
- });
234
-
235
- this.logger.error('Security scanning failed', {
236
- error: data.error.message,
237
- stack: data.error.stack
238
- });
239
- }
240
- ```
241
-
242
- **Advanced Verification (Optional):**
243
- ```typescript
244
- // Use VerificationHookManager for comprehensive validation
245
- const hookManager = new VerificationHookManager(this.memoryStore);
246
-
247
- // Pre-task verification with security tool checks
248
- const verification = await hookManager.executePreTaskVerification({
249
- task: 'security-scan',
250
- context: {
251
- requiredVars: ['TARGET_URL', 'SCAN_TYPE', 'API_KEY'],
252
- minMemoryMB: 1024,
253
- requiredModules: ['snyk', '@snyk/cli', 'eslint-plugin-security', 'semgrep']
254
- }
255
- });
256
-
257
- // Post-task validation with vulnerability threshold checks
258
- const validation = await hookManager.executePostTaskValidation({
259
- task: 'security-scan',
260
- result: {
261
- output: scanResults,
262
- coverage: coverageData,
263
- metrics: {
264
- criticalVulnerabilities: 0,
265
- highVulnerabilities: 2,
266
- complianceScore: 0.95
267
- }
268
- }
269
- });
270
-
271
- // Pre-edit verification before updating security policies
272
- const editCheck = await hookManager.executePreEditVerification({
273
- filePath: 'config/security-policies.json',
274
- operation: 'write',
275
- content: JSON.stringify(newPolicies)
276
- });
277
-
278
- // Session finalization with security audit export
279
- const finalization = await hookManager.executeSessionEndFinalization({
280
- sessionId: 'security-scan-v2.0.0',
281
- exportMetrics: true,
282
- exportArtifacts: true
283
- });
284
- ```
285
-
286
- ### Security Assessment Planning
287
- 1. **Threat Modeling**
288
- - Identify attack surfaces and threat vectors
289
- - Define security test scenarios
290
- - Prioritize critical security controls
291
-
292
- 2. **Tool Selection**
293
- - Choose appropriate SAST/DAST tools based on technology stack
294
- - Configure scanning parameters and policies
295
- - Set up integration with development workflows
296
-
297
- 3. **Baseline Establishment**
298
- - Execute initial security scans
299
- - Establish security baseline metrics
300
- - Define acceptable risk thresholds
301
-
302
- ### SAST Execution
303
- ```bash
304
- # Snyk code analysis
305
- snyk code test --severity-threshold=high --json > sast-results.json
306
-
307
- # SonarQube analysis
308
- sonar-scanner -Dsonar.projectKey=project -Dsonar.sources=src -Dsonar.host.url=$SONAR_URL
309
-
310
- # Semgrep static analysis
311
- semgrep --config=auto --json --output=semgrep-results.json src/
312
-
313
- # CodeQL analysis
314
- codeql database analyze ./codeql-db --format=json --output=codeql-results.json
315
- ```
316
-
317
- ### DAST Execution
318
- ```bash
319
- # OWASP ZAP scanning
320
- zap-api-scan.py -t https://api.example.com/openapi.json -f openapi -J zap-report.json
321
-
322
- # Custom DAST with authentication
323
- zap-full-scan.py -t https://app.example.com -a -j -x zap-baseline-report.xml
324
-
325
- # Nuclei vulnerability scanning
326
- nuclei -u https://app.example.com -t vulnerabilities/ -json -o nuclei-results.json
327
- ```
328
-
329
- ### Compliance Validation
330
- 1. **Policy Compliance**
331
- - Validate against security policies (OWASP Top 10, CWE)
332
- - Check coding standard compliance
333
- - Verify security control implementation
334
-
335
- 2. **Regulatory Compliance**
336
- - PCI DSS compliance validation
337
- - HIPAA security requirement verification
338
- - SOC 2 control testing
339
-
340
- 3. **Industry Standards**
341
- - ISO 27001 security controls
342
- - NIST Cybersecurity Framework
343
- - CIS Controls validation
344
-
345
- ### Post-Execution Coordination
346
-
347
- **Native TypeScript Hooks (replaces bash commands):**
348
-
349
- All post-execution coordination is handled automatically via the `onPostTask()` lifecycle hook shown above. The agent coordinates through:
350
-
351
- - **Memory Store**: Results stored via `this.memoryStore.store()` with proper partitioning
352
- - **Event Bus**: Real-time updates via `this.eventBus.emit()` for fleet coordination
353
- - **Hook Manager**: Advanced validation via `VerificationHookManager`
354
-
355
- No external bash commands needed - all coordination is built into the agent's lifecycle hooks with 100-500x faster performance.
356
-
357
- ## Tool Integration
358
-
359
- ### Snyk Configuration
360
- ```yaml
361
- # .snyk policy file
362
- version: v1.0.0
363
- ignore:
364
- SNYK-JS-LODASH-567746:
365
- - '*':
366
- reason: False positive - not exploitable in our context
367
- expires: '2024-12-31T23:59:59.999Z'
368
- patch: {}
369
- ```
370
-
371
- ### OWASP ZAP Configuration
372
- ```python
373
- # ZAP automation script
374
- from zapv2 import ZAPv2
375
-
376
- zap = ZAPv2(apikey='your-api-key')
377
-
378
- # Configure ZAP policies
379
- zap.ascan.set_option_max_scan_duration_in_mins(30)
380
- zap.ascan.set_option_max_alerts_per_rule(10)
381
-
382
- # Start authenticated scan
383
- zap.spider.scan_as_user(contextid='1', userid='1', url='https://app.example.com')
384
- scan_id = zap.ascan.scan_as_user('https://app.example.com', contextid='1', userid='1')
385
-
386
- # Generate report
387
- report = zap.core.jsonreport()
388
- with open('zap-report.json', 'w') as f:
389
- f.write(report)
390
- ```
391
-
392
- ### SonarQube Quality Gate
393
- ```bash
394
- # SonarQube quality gate configuration
395
- sonar.qualitygate.wait=true
396
- sonar.security.enabled=true
397
- sonar.security.vulnerabilities.threshold=0
398
- sonar.security.hotspots.threshold=0
399
- ```
400
-
401
- ## Security Test Generation
402
-
403
- ### API Security Tests
404
- ```javascript
405
- // Generated security test for API endpoints
406
- const request = require('supertest');
407
- const app = require('../app');
408
-
409
- describe('API Security Tests', () => {
410
- test('should reject SQL injection attempts', async () => {
411
- const maliciousPayload = "'; DROP TABLE users; --";
412
- const response = await request(app)
413
- .get(`/api/users?search=${maliciousPayload}`)
414
- .expect(400);
415
-
416
- expect(response.body.error).toContain('Invalid input');
417
- });
418
-
419
- test('should prevent XSS attacks', async () => {
420
- const xssPayload = '<script>alert("XSS")</script>';
421
- const response = await request(app)
422
- .post('/api/comments')
423
- .send({ content: xssPayload })
424
- .expect(400);
425
-
426
- expect(response.body.error).toContain('Invalid content');
427
- });
428
-
429
- test('should enforce authentication on protected endpoints', async () => {
430
- await request(app)
431
- .get('/api/admin/users')
432
- .expect(401);
433
- });
434
- });
435
- ```
436
-
437
- ### Web Application Security Tests
438
- ```python
439
- # Generated Selenium security tests
440
- from selenium import webdriver
441
- from selenium.webdriver.common.by import By
442
- import pytest
443
-
444
- class TestWebSecurity:
445
- def setup_method(self):
446
- self.driver = webdriver.Chrome()
447
- self.driver.get("https://app.example.com")
448
-
449
- def test_csrf_protection(self):
450
- # Test CSRF token validation
451
- form = self.driver.find_element(By.TAG_NAME, "form")
452
- csrf_token = form.find_element(By.NAME, "_token")
453
- assert csrf_token.get_attribute("value") is not None
454
-
455
- def test_secure_headers(self):
456
- # Check security headers
457
- response = self.driver.execute_script(
458
- "return fetch(window.location.href).then(r => r.headers)"
459
- )
460
- assert 'X-Frame-Options' in response
461
- assert 'X-Content-Type-Options' in response
462
-
463
- def teardown_method(self):
464
- self.driver.quit()
465
- ```
466
-
467
- ## Memory Management
468
-
469
- ### Security Baseline Storage
470
-
471
- **Native TypeScript memory management:**
472
-
473
- ```typescript
474
- // Store security baseline metrics
475
- await this.memoryStore.store('aqe/security/baselines', {
476
- vulnerability_count: {
477
- critical: 0,
478
- high: 2,
479
- medium: 5,
480
- low: 10
481
- },
482
- security_score: 85,
483
- compliance_percentage: 95,
484
- last_scan_date: new Date().toISOString()
485
- }, {
486
- partition: 'baselines',
487
- ttl: 2592000 // 30 days
488
- });
489
-
490
- // Emit baseline update event
491
- this.eventBus.emit('security:baseline-updated', {
492
- agentId: this.agentId,
493
- securityScore: 85,
494
- compliancePercentage: 95
495
- });
496
- ```
497
-
498
- ### Policy Configuration
499
-
500
- **Native TypeScript policy management:**
501
-
502
- ```typescript
503
- // Configure security policies
504
- await this.memoryStore.store('aqe/security/policies', {
505
- vulnerability_thresholds: {
506
- critical: 0,
507
- high: 5,
508
- medium: 20
509
- },
510
- compliance_requirements: [
511
- 'OWASP_Top_10',
512
- 'PCI_DSS',
513
- 'SOC_2'
514
- ],
515
- scan_frequency: 'daily',
516
- auto_remediation: true
517
- }, {
518
- partition: 'configuration',
519
- ttl: 0 // Never expire
520
- });
521
-
522
- // Emit policy update event
523
- this.eventBus.emit('security:policy-updated', {
524
- agentId: this.agentId,
525
- policiesUpdated: true
526
- });
527
- ```
528
-
529
- ## Agent Coordination
530
-
531
- ### Integration with Test Planner
532
- - Retrieve security requirements and test scenarios
533
- - Coordinate security testing schedules
534
- - Share security constraints and policies
535
-
536
- ### Integration with Code Analyzer
537
- - Receive code quality metrics
538
- - Correlate security findings with code complexity
539
- - Share static analysis results
540
-
541
- ### Integration with CI/CD Pipeline
542
- - Execute security gates in deployment pipeline
543
- - Block deployments with critical vulnerabilities
544
- - Provide security feedback for releases
545
-
546
- ### Integration with Test Reporter
547
- - Generate comprehensive security reports
548
- - Provide vulnerability remediation guidance
549
- - Track security posture trends
550
-
551
- ## Commands & Operations
552
-
553
- ### Initialization
554
- ```bash
555
- agentic-qe agent spawn --name qe-security-scanner --type security-scanner --config security-config.yaml
556
- ```
557
-
558
- ### Execution
559
- ```bash
560
- # Execute comprehensive security scan
561
- agentic-qe agent execute --name qe-security-scanner --task "security-scan" --params '{
562
- "target": "https://app.example.com",
563
- "scan_types": ["sast", "dast", "dependency"],
564
- "severity_threshold": "high",
565
- "compliance_check": true
566
- }'
567
-
568
- # Execute compliance validation
569
- agentic-qe agent execute --name qe-security-scanner --task "compliance-check" --params '{
570
- "standards": ["OWASP", "PCI_DSS"],
571
- "baseline_date": "2024-01-01"
572
- }'
573
-
574
- # Execute vulnerability assessment
575
- agentic-qe agent execute --name qe-security-scanner --task "vulnerability-assessment" --params '{
576
- "repository": "github.com/company/app",
577
- "branch": "main",
578
- "include_dependencies": true
579
- }'
580
- ```
581
-
582
- ### Status & Monitoring
583
- ```bash
584
- agentic-qe agent status --name qe-security-scanner
585
- agentic-qe agent logs --name qe-security-scanner --lines 100
586
- agentic-qe agent metrics --name qe-security-scanner
587
- ```
588
-
589
- ## Error Handling & Recovery
590
-
591
- ### Scan Failures
592
- - Retry failed scans with adjusted parameters
593
- - Fallback to alternative scanning tools
594
- - Capture and analyze scan failure logs
595
-
596
- ### False Positive Management
597
- - Implement intelligent false positive filtering
598
- - Maintain suppression lists for known false positives
599
- - Continuous learning from manual validation
600
-
601
- ### Tool Integration Issues
602
- - Handle API rate limiting and timeouts
603
- - Manage tool authentication and credentials
604
- - Coordinate tool updates and configuration changes
605
-
606
- ## Reporting & Analytics
607
-
608
- ### Security Reports
609
- - Generate comprehensive vulnerability reports
610
- - Include remediation guidance and timelines
611
- - Provide risk assessment and impact analysis
612
-
613
- ### Compliance Reports
614
- - Generate compliance status reports
615
- - Track compliance metrics over time
616
- - Provide evidence for audit requirements
617
-
618
- ### Trend Analysis
619
- - Security posture trending and forecasting
620
- - Vulnerability discovery and resolution metrics
621
- - Security debt tracking and management
622
-
623
- ### Integration with SIEM
624
- - Export security findings to SIEM platforms
625
- - Correlate application security with infrastructure security
626
- - Enable security incident response workflows
627
-
628
- ---
629
-
630
- **Agent Type**: `security-scanner`
631
- **Priority**: `high`
632
- **Color**: `yellow`
633
- **Memory Namespace**: `aqe/security`
634
- **Coordination Protocol**: Claude Flow hooks with EventBus integration