erosolar-cli 2.1.238 → 2.1.239

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 (138) hide show
  1. package/README.md +9 -0
  2. package/dist/contracts/tools.schema.json +3 -1
  3. package/dist/core/agent.d.ts.map +1 -1
  4. package/dist/core/agent.js +5 -1
  5. package/dist/core/agent.js.map +1 -1
  6. package/dist/core/agentOrchestrator.d.ts +4 -0
  7. package/dist/core/agentOrchestrator.d.ts.map +1 -1
  8. package/dist/core/agentOrchestrator.js +58 -6
  9. package/dist/core/agentOrchestrator.js.map +1 -1
  10. package/dist/core/autoExecutionOrchestrator.d.ts +172 -0
  11. package/dist/core/autoExecutionOrchestrator.d.ts.map +1 -0
  12. package/dist/core/autoExecutionOrchestrator.js +591 -0
  13. package/dist/core/autoExecutionOrchestrator.js.map +1 -0
  14. package/dist/core/contextManager.d.ts.map +1 -1
  15. package/dist/core/contextManager.js.map +1 -1
  16. package/dist/core/dualAgentOrchestrator.d.ts +34 -0
  17. package/dist/core/dualAgentOrchestrator.d.ts.map +1 -0
  18. package/dist/core/dualAgentOrchestrator.js +94 -0
  19. package/dist/core/dualAgentOrchestrator.js.map +1 -0
  20. package/dist/core/errors/safetyValidator.d.ts +25 -12
  21. package/dist/core/errors/safetyValidator.d.ts.map +1 -1
  22. package/dist/core/errors/safetyValidator.js +165 -17
  23. package/dist/core/errors/safetyValidator.js.map +1 -1
  24. package/dist/core/governmentProcedures.d.ts +118 -0
  25. package/dist/core/governmentProcedures.d.ts.map +1 -0
  26. package/dist/core/governmentProcedures.js +912 -0
  27. package/dist/core/governmentProcedures.js.map +1 -0
  28. package/dist/core/infrastructureTemplates.d.ts +123 -0
  29. package/dist/core/infrastructureTemplates.d.ts.map +1 -0
  30. package/dist/core/infrastructureTemplates.js +1326 -0
  31. package/dist/core/infrastructureTemplates.js.map +1 -0
  32. package/dist/core/orchestration.d.ts +534 -0
  33. package/dist/core/orchestration.d.ts.map +1 -0
  34. package/dist/core/orchestration.js +2009 -0
  35. package/dist/core/orchestration.js.map +1 -0
  36. package/dist/core/persistentObjectiveStore.d.ts +292 -0
  37. package/dist/core/persistentObjectiveStore.d.ts.map +1 -0
  38. package/dist/core/persistentObjectiveStore.js +613 -0
  39. package/dist/core/persistentObjectiveStore.js.map +1 -0
  40. package/dist/core/preferences.js +1 -1
  41. package/dist/core/preferences.js.map +1 -1
  42. package/dist/core/reliabilityPrompt.d.ts.map +1 -1
  43. package/dist/core/reliabilityPrompt.js +3 -0
  44. package/dist/core/reliabilityPrompt.js.map +1 -1
  45. package/dist/core/securityDeliverableGenerator.d.ts +292 -0
  46. package/dist/core/securityDeliverableGenerator.d.ts.map +1 -0
  47. package/dist/core/securityDeliverableGenerator.js +1590 -0
  48. package/dist/core/securityDeliverableGenerator.js.map +1 -0
  49. package/dist/core/taskCompletionDetector.d.ts.map +1 -1
  50. package/dist/core/taskCompletionDetector.js +4 -1
  51. package/dist/core/taskCompletionDetector.js.map +1 -1
  52. package/dist/shell/autoExecutor.d.ts.map +1 -1
  53. package/dist/shell/autoExecutor.js +32 -3
  54. package/dist/shell/autoExecutor.js.map +1 -1
  55. package/dist/shell/interactiveShell.d.ts +9 -0
  56. package/dist/shell/interactiveShell.d.ts.map +1 -1
  57. package/dist/shell/interactiveShell.js +282 -190
  58. package/dist/shell/interactiveShell.js.map +1 -1
  59. package/dist/tools/bashTools.d.ts +3 -5
  60. package/dist/tools/bashTools.d.ts.map +1 -1
  61. package/dist/tools/bashTools.js +259 -161
  62. package/dist/tools/bashTools.js.map +1 -1
  63. package/dist/tools/tao/index.d.ts +4 -4
  64. package/dist/tools/tao/index.d.ts.map +1 -1
  65. package/dist/tools/tao/index.js +15 -5
  66. package/dist/tools/tao/index.js.map +1 -1
  67. package/dist/tools/tao/rl.d.ts +164 -0
  68. package/dist/tools/tao/rl.d.ts.map +1 -0
  69. package/dist/tools/tao/rl.js +2998 -0
  70. package/dist/tools/tao/rl.js.map +1 -0
  71. package/dist/tools/taoTools.d.ts +2 -2
  72. package/dist/tools/taoTools.d.ts.map +1 -1
  73. package/dist/tools/taoTools.js +103 -20
  74. package/dist/tools/taoTools.js.map +1 -1
  75. package/dist/ui/PromptController.d.ts +3 -0
  76. package/dist/ui/PromptController.d.ts.map +1 -1
  77. package/dist/ui/PromptController.js +3 -0
  78. package/dist/ui/PromptController.js.map +1 -1
  79. package/dist/ui/UnifiedUIRenderer.d.ts +4 -0
  80. package/dist/ui/UnifiedUIRenderer.d.ts.map +1 -1
  81. package/dist/ui/UnifiedUIRenderer.js +37 -6
  82. package/dist/ui/UnifiedUIRenderer.js.map +1 -1
  83. package/dist/ui/display.d.ts +9 -1
  84. package/dist/ui/display.d.ts.map +1 -1
  85. package/dist/ui/display.js +66 -9
  86. package/dist/ui/display.js.map +1 -1
  87. package/dist/ui/shortcutsHelp.d.ts.map +1 -1
  88. package/dist/ui/shortcutsHelp.js +1 -0
  89. package/dist/ui/shortcutsHelp.js.map +1 -1
  90. package/package.json +3 -2
  91. package/dist/capabilities/askUserCapability.d.ts +0 -14
  92. package/dist/capabilities/askUserCapability.d.ts.map +0 -1
  93. package/dist/capabilities/askUserCapability.js +0 -134
  94. package/dist/capabilities/askUserCapability.js.map +0 -1
  95. package/dist/capabilities/codeGenerationCapability.d.ts +0 -13
  96. package/dist/capabilities/codeGenerationCapability.d.ts.map +0 -1
  97. package/dist/capabilities/codeGenerationCapability.js +0 -25
  98. package/dist/capabilities/codeGenerationCapability.js.map +0 -1
  99. package/dist/capabilities/performanceMonitoringCapability.d.ts +0 -108
  100. package/dist/capabilities/performanceMonitoringCapability.d.ts.map +0 -1
  101. package/dist/capabilities/performanceMonitoringCapability.js +0 -176
  102. package/dist/capabilities/performanceMonitoringCapability.js.map +0 -1
  103. package/dist/capabilities/todoCapability.d.ts +0 -19
  104. package/dist/capabilities/todoCapability.d.ts.map +0 -1
  105. package/dist/capabilities/todoCapability.js +0 -170
  106. package/dist/capabilities/todoCapability.js.map +0 -1
  107. package/dist/core/baseToolFactory.d.ts +0 -187
  108. package/dist/core/baseToolFactory.d.ts.map +0 -1
  109. package/dist/core/baseToolFactory.js +0 -352
  110. package/dist/core/baseToolFactory.js.map +0 -1
  111. package/dist/core/intelligentSummarizer.d.ts +0 -79
  112. package/dist/core/intelligentSummarizer.d.ts.map +0 -1
  113. package/dist/core/intelligentSummarizer.js +0 -273
  114. package/dist/core/intelligentSummarizer.js.map +0 -1
  115. package/dist/core/memorySystem.d.ts +0 -67
  116. package/dist/core/memorySystem.d.ts.map +0 -1
  117. package/dist/core/memorySystem.js +0 -334
  118. package/dist/core/memorySystem.js.map +0 -1
  119. package/dist/core/outputStyles.d.ts +0 -48
  120. package/dist/core/outputStyles.d.ts.map +0 -1
  121. package/dist/core/outputStyles.js +0 -270
  122. package/dist/core/outputStyles.js.map +0 -1
  123. package/dist/core/toolPatternAnalyzer.d.ts +0 -87
  124. package/dist/core/toolPatternAnalyzer.d.ts.map +0 -1
  125. package/dist/core/toolPatternAnalyzer.js +0 -272
  126. package/dist/core/toolPatternAnalyzer.js.map +0 -1
  127. package/dist/tools/backgroundBashTools.d.ts +0 -21
  128. package/dist/tools/backgroundBashTools.d.ts.map +0 -1
  129. package/dist/tools/backgroundBashTools.js +0 -215
  130. package/dist/tools/backgroundBashTools.js.map +0 -1
  131. package/dist/tools/code-quality-dashboard.d.ts +0 -57
  132. package/dist/tools/code-quality-dashboard.d.ts.map +0 -1
  133. package/dist/tools/code-quality-dashboard.js +0 -218
  134. package/dist/tools/code-quality-dashboard.js.map +0 -1
  135. package/dist/tools/tao/rlEngine.d.ts +0 -40
  136. package/dist/tools/tao/rlEngine.d.ts.map +0 -1
  137. package/dist/tools/tao/rlEngine.js +0 -237
  138. package/dist/tools/tao/rlEngine.js.map +0 -1
@@ -0,0 +1,912 @@
1
+ /**
2
+ * Government and Law Enforcement Procedures
3
+ *
4
+ * Comprehensive procedures for:
5
+ * - Law enforcement coordination
6
+ * - Government agency interfaces
7
+ * - Legal compliance frameworks
8
+ * - Evidence handling
9
+ * - Inter-agency cooperation
10
+ *
11
+ * For authorized security operations only.
12
+ */
13
+ // ═══════════════════════════════════════════════════════════════════════════════
14
+ // US FEDERAL AGENCY CONTACTS
15
+ // ═══════════════════════════════════════════════════════════════════════════════
16
+ export const US_FEDERAL_CONTACTS = [
17
+ {
18
+ agency: 'Federal Bureau of Investigation',
19
+ agencyType: 'federal-le',
20
+ division: 'Cyber Division',
21
+ contact: {
22
+ name: 'FBI Cyber Division',
23
+ title: 'Cyber Task Force',
24
+ phone: '1-800-CALL-FBI',
25
+ email: 'cywatch@ic.fbi.gov',
26
+ secureComms: 'FBI SIPR Portal',
27
+ },
28
+ jurisdiction: ['Federal cyber crimes', 'National security', 'Critical infrastructure'],
29
+ capabilities: ['Digital forensics', 'Malware analysis', 'Attribution', 'International coordination'],
30
+ responseTime: '24-48 hours for critical',
31
+ classification: 'secret',
32
+ },
33
+ {
34
+ agency: 'FBI Internet Crime Complaint Center',
35
+ agencyType: 'federal-le',
36
+ division: 'IC3',
37
+ contact: {
38
+ name: 'IC3',
39
+ title: 'Internet Crime Complaint Center',
40
+ phone: 'N/A',
41
+ email: 'ic3.gov',
42
+ },
43
+ jurisdiction: ['Internet crimes', 'Fraud', 'Ransomware'],
44
+ capabilities: ['Complaint intake', 'Pattern analysis', 'Referrals'],
45
+ responseTime: 'Varies',
46
+ classification: 'unclassified',
47
+ },
48
+ {
49
+ agency: 'US Secret Service',
50
+ agencyType: 'federal-le',
51
+ division: 'Criminal Investigative Division',
52
+ contact: {
53
+ name: 'USSS CID',
54
+ title: 'Electronic Crimes Task Force',
55
+ phone: '202-406-5708',
56
+ email: 'contact via local field office',
57
+ },
58
+ jurisdiction: ['Financial crimes', 'Counterfeit', 'Network intrusions affecting financial systems'],
59
+ capabilities: ['Financial forensics', 'Cryptocurrency tracing', 'ECTF network'],
60
+ responseTime: '24-72 hours',
61
+ classification: 'secret',
62
+ },
63
+ {
64
+ agency: 'Cybersecurity and Infrastructure Security Agency',
65
+ agencyType: 'cisa',
66
+ division: 'Cybersecurity Division',
67
+ contact: {
68
+ name: 'CISA',
69
+ title: '24/7 Operations Center',
70
+ phone: '1-888-282-0870',
71
+ email: 'central@cisa.dhs.gov',
72
+ secureComms: 'CISA Portal',
73
+ },
74
+ jurisdiction: ['Critical infrastructure', 'Federal networks', '.gov domains'],
75
+ capabilities: ['Incident response', 'Threat intelligence', 'Vulnerability coordination', 'Hunt teams'],
76
+ responseTime: '2-4 hours for critical',
77
+ classification: 'secret',
78
+ },
79
+ {
80
+ agency: 'National Security Agency',
81
+ agencyType: 'intelligence',
82
+ division: 'Cybersecurity Directorate',
83
+ contact: {
84
+ name: 'NSA Cybersecurity',
85
+ title: 'Cybersecurity Collaboration Center',
86
+ phone: 'Classified',
87
+ email: 'cybersecurity_inquiries@nsa.gov',
88
+ secureComms: 'NSA/CSS classified channels',
89
+ },
90
+ jurisdiction: ['National security systems', 'Defense industrial base', 'Foreign threats'],
91
+ capabilities: ['Signals intelligence', 'Cryptanalysis', 'Advanced threat detection'],
92
+ responseTime: 'Classified',
93
+ classification: 'ts-sci',
94
+ },
95
+ {
96
+ agency: 'Department of Justice',
97
+ agencyType: 'federal-le',
98
+ division: 'Computer Crime and Intellectual Property Section',
99
+ contact: {
100
+ name: 'DOJ CCIPS',
101
+ title: 'CCIPS',
102
+ phone: '202-514-1026',
103
+ email: 'CCIPS.Intake@usdoj.gov',
104
+ },
105
+ jurisdiction: ['Federal computer crimes', 'Intellectual property', 'International cybercrime'],
106
+ capabilities: ['Prosecution', 'Legal guidance', 'MLAT coordination'],
107
+ responseTime: 'Varies by case',
108
+ classification: 'secret',
109
+ },
110
+ {
111
+ agency: 'Department of Homeland Security',
112
+ agencyType: 'federal-le',
113
+ division: 'Homeland Security Investigations',
114
+ contact: {
115
+ name: 'HSI Cyber Crimes Center',
116
+ title: 'C3',
117
+ phone: '1-866-DHS-2-ICE',
118
+ email: 'HSI-Tip-Line@ice.dhs.gov',
119
+ },
120
+ jurisdiction: ['Transnational crime', 'Child exploitation', 'Dark web'],
121
+ capabilities: ['Undercover operations', 'Dark web investigations', 'International partnerships'],
122
+ responseTime: '24-48 hours',
123
+ classification: 'secret',
124
+ },
125
+ {
126
+ agency: 'Department of Defense',
127
+ agencyType: 'military',
128
+ division: 'US Cyber Command',
129
+ contact: {
130
+ name: 'USCYBERCOM',
131
+ title: 'Cyber National Mission Force',
132
+ phone: 'Classified',
133
+ email: 'Classified channels only',
134
+ secureComms: 'DOD SIPRNET/JWICS',
135
+ },
136
+ jurisdiction: ['DOD networks', 'National defense', 'Foreign military threats'],
137
+ capabilities: ['Offensive cyber', 'Defensive cyber', 'Military operations'],
138
+ responseTime: 'Mission dependent',
139
+ classification: 'ts-sci',
140
+ },
141
+ {
142
+ agency: 'Securities and Exchange Commission',
143
+ agencyType: 'regulatory',
144
+ division: 'Division of Enforcement',
145
+ contact: {
146
+ name: 'SEC Enforcement',
147
+ title: 'Cyber Unit',
148
+ phone: '202-551-8090',
149
+ email: 'enforcement@sec.gov',
150
+ },
151
+ jurisdiction: ['Securities fraud', 'Market manipulation', 'Public company breaches'],
152
+ capabilities: ['Civil enforcement', 'Subpoena power', 'Financial investigation'],
153
+ responseTime: '1-2 weeks',
154
+ classification: 'cui',
155
+ },
156
+ {
157
+ agency: 'Federal Trade Commission',
158
+ agencyType: 'regulatory',
159
+ division: 'Bureau of Consumer Protection',
160
+ contact: {
161
+ name: 'FTC',
162
+ title: 'Division of Privacy and Identity Protection',
163
+ phone: '877-FTC-HELP',
164
+ email: 'reportfraud.ftc.gov',
165
+ },
166
+ jurisdiction: ['Consumer protection', 'Privacy violations', 'Data security'],
167
+ capabilities: ['Civil enforcement', 'Consumer education', 'Industry guidance'],
168
+ responseTime: '1-4 weeks',
169
+ classification: 'unclassified',
170
+ },
171
+ ];
172
+ // ═══════════════════════════════════════════════════════════════════════════════
173
+ // LEGAL FRAMEWORKS
174
+ // ═══════════════════════════════════════════════════════════════════════════════
175
+ export const LEGAL_FRAMEWORKS = [
176
+ {
177
+ id: 'cfaa',
178
+ name: 'Computer Fraud and Abuse Act (18 U.S.C. § 1030)',
179
+ jurisdiction: 'federal',
180
+ applicableAgencies: ['federal-le', 'intelligence'],
181
+ requirements: [
182
+ {
183
+ id: 'cfaa-auth',
184
+ requirement: 'Must have explicit authorization for any access to protected computers',
185
+ mandatory: true,
186
+ timeline: 'Before any access',
187
+ evidence: ['Written authorization', 'Scope documentation', 'Rules of engagement'],
188
+ verification: 'Legal counsel review',
189
+ },
190
+ {
191
+ id: 'cfaa-scope',
192
+ requirement: 'Must stay within authorized scope at all times',
193
+ mandatory: true,
194
+ timeline: 'During engagement',
195
+ evidence: ['Activity logs', 'Scope boundaries', 'Deviation documentation'],
196
+ verification: 'Continuous monitoring',
197
+ },
198
+ ],
199
+ penalties: ['Up to 10 years imprisonment for first offense', 'Up to 20 years for repeat', 'Civil liability'],
200
+ exemptions: ['Authorized penetration testing', 'Law enforcement with warrant', 'Intelligence activities'],
201
+ references: ['https://www.law.cornell.edu/uscode/text/18/1030'],
202
+ },
203
+ {
204
+ id: 'ecpa',
205
+ name: 'Electronic Communications Privacy Act',
206
+ jurisdiction: 'federal',
207
+ applicableAgencies: ['federal-le', 'state-le', 'local-le'],
208
+ requirements: [
209
+ {
210
+ id: 'ecpa-wiretap',
211
+ requirement: 'Wiretap warrant required for real-time interception',
212
+ mandatory: true,
213
+ timeline: 'Before interception',
214
+ evidence: ['Court order', 'Probable cause affidavit'],
215
+ verification: 'Judicial approval',
216
+ },
217
+ {
218
+ id: 'ecpa-stored',
219
+ requirement: 'Proper legal process for stored communications',
220
+ mandatory: true,
221
+ timeline: 'Before access',
222
+ evidence: ['Warrant/subpoena/court order as appropriate', 'Provider records'],
223
+ verification: 'Legal process documentation',
224
+ },
225
+ ],
226
+ penalties: ['Criminal penalties', 'Civil damages', 'Exclusion of evidence'],
227
+ exemptions: ['Consent', 'Service provider exception', 'Law enforcement with proper process'],
228
+ references: ['18 U.S.C. § 2510-2522', '18 U.S.C. § 2701-2712'],
229
+ },
230
+ {
231
+ id: 'fisma',
232
+ name: 'Federal Information Security Modernization Act',
233
+ jurisdiction: 'federal',
234
+ applicableAgencies: ['cisa', 'nist', 'contractor'],
235
+ requirements: [
236
+ {
237
+ id: 'fisma-risk',
238
+ requirement: 'Implement risk-based cybersecurity program',
239
+ mandatory: true,
240
+ timeline: 'Continuous',
241
+ evidence: ['Risk assessment', 'Security plan', 'POA&M'],
242
+ verification: 'Annual assessment',
243
+ },
244
+ {
245
+ id: 'fisma-incident',
246
+ requirement: 'Report incidents to CISA',
247
+ mandatory: true,
248
+ timeline: 'Within 24 hours for major incidents',
249
+ evidence: ['Incident report', 'Timeline', 'Impact assessment'],
250
+ verification: 'CISA confirmation',
251
+ },
252
+ ],
253
+ penalties: ['Agency sanctions', 'Funding impacts', 'Personnel actions'],
254
+ exemptions: ['National security systems (NSS)'],
255
+ references: ['44 U.S.C. § 3551-3558'],
256
+ },
257
+ {
258
+ id: 'circia',
259
+ name: 'Cyber Incident Reporting for Critical Infrastructure Act',
260
+ jurisdiction: 'federal',
261
+ applicableAgencies: ['cisa'],
262
+ requirements: [
263
+ {
264
+ id: 'circia-covered',
265
+ requirement: 'Report covered cyber incidents within 72 hours',
266
+ mandatory: true,
267
+ timeline: '72 hours',
268
+ evidence: ['Incident report', 'Impact assessment', 'IOCs'],
269
+ verification: 'CISA receipt confirmation',
270
+ },
271
+ {
272
+ id: 'circia-ransom',
273
+ requirement: 'Report ransomware payments within 24 hours',
274
+ mandatory: true,
275
+ timeline: '24 hours',
276
+ evidence: ['Payment details', 'Attacker demands', 'Decryption status'],
277
+ verification: 'CISA receipt confirmation',
278
+ },
279
+ ],
280
+ penalties: ['Civil penalties', 'Subpoena for non-compliance'],
281
+ exemptions: ['Already reported to another federal agency'],
282
+ references: ['Pub. L. 117-103, Division Y'],
283
+ },
284
+ {
285
+ id: 'hipaa',
286
+ name: 'Health Insurance Portability and Accountability Act',
287
+ jurisdiction: 'federal',
288
+ applicableAgencies: ['regulatory'],
289
+ requirements: [
290
+ {
291
+ id: 'hipaa-breach',
292
+ requirement: 'Report breaches affecting 500+ individuals to HHS and media',
293
+ mandatory: true,
294
+ timeline: '60 days',
295
+ evidence: ['Breach assessment', 'Notification letters', 'Media notice'],
296
+ verification: 'HHS portal submission',
297
+ },
298
+ {
299
+ id: 'hipaa-individual',
300
+ requirement: 'Notify affected individuals',
301
+ mandatory: true,
302
+ timeline: '60 days',
303
+ evidence: ['Notification letters', 'Delivery confirmation'],
304
+ verification: 'Documentation of notifications',
305
+ },
306
+ ],
307
+ penalties: ['$100-$50,000 per violation', 'Up to $1.5M per year', 'Criminal penalties'],
308
+ exemptions: ['Encrypted data (safe harbor)', 'Low probability of compromise'],
309
+ references: ['45 CFR Parts 160, 162, 164'],
310
+ },
311
+ ];
312
+ // ═══════════════════════════════════════════════════════════════════════════════
313
+ // EVIDENCE HANDLING PROCEDURES
314
+ // ═══════════════════════════════════════════════════════════════════════════════
315
+ export const EVIDENCE_HANDLING_PROCEDURES = [
316
+ {
317
+ id: 'digital-forensics',
318
+ name: 'Digital Evidence Collection',
319
+ evidenceType: 'Digital media (hard drives, SSDs, USB, mobile devices)',
320
+ collectionMethod: `
321
+ 1. Document scene and device state (photos, notes)
322
+ 2. Isolate device from network (Faraday bag for mobile)
323
+ 3. Create bit-for-bit forensic image
324
+ 4. Calculate and record hash values (SHA-256)
325
+ 5. Verify image integrity
326
+ 6. Store original evidence in secure location
327
+ 7. Work only with forensic copies
328
+ `,
329
+ chainOfCustody: [
330
+ {
331
+ order: 1,
332
+ action: 'Initial seizure/collection',
333
+ responsible: 'Lead investigator',
334
+ documentation: 'Evidence tag, photo, collection form',
335
+ verification: 'Witness signature',
336
+ },
337
+ {
338
+ order: 2,
339
+ action: 'Transport to lab',
340
+ responsible: 'Evidence custodian',
341
+ documentation: 'Transport log, sealed evidence bag',
342
+ verification: 'Chain of custody form',
343
+ },
344
+ {
345
+ order: 3,
346
+ action: 'Lab intake',
347
+ responsible: 'Forensic examiner',
348
+ documentation: 'Intake form, condition assessment',
349
+ verification: 'Examiner signature',
350
+ },
351
+ {
352
+ order: 4,
353
+ action: 'Forensic imaging',
354
+ responsible: 'Forensic examiner',
355
+ documentation: 'Imaging log, hash values',
356
+ verification: 'Hash verification',
357
+ },
358
+ {
359
+ order: 5,
360
+ action: 'Analysis',
361
+ responsible: 'Forensic examiner',
362
+ documentation: 'Analysis notes, findings report',
363
+ verification: 'Peer review',
364
+ },
365
+ {
366
+ order: 6,
367
+ action: 'Storage/Return',
368
+ responsible: 'Evidence custodian',
369
+ documentation: 'Storage location, return form if applicable',
370
+ verification: 'Final chain of custody entry',
371
+ },
372
+ ],
373
+ storageRequirements: [
374
+ 'Climate-controlled evidence room',
375
+ 'Access logging',
376
+ '24/7 security',
377
+ 'Backup of forensic images',
378
+ 'Encryption for digital copies',
379
+ ],
380
+ retentionPeriod: 'Until case closure + appeals period (typically 5-10 years)',
381
+ destructionProcedure: 'DOD 5220.22-M compliant wiping or physical destruction',
382
+ legalConsiderations: [
383
+ 'Fourth Amendment - warrant requirements',
384
+ 'Best evidence rule',
385
+ 'Authentication requirements (FRE 901)',
386
+ 'Hearsay exceptions for business records',
387
+ ],
388
+ },
389
+ {
390
+ id: 'network-logs',
391
+ name: 'Network Log Collection',
392
+ evidenceType: 'Network logs, PCAP, flow data',
393
+ collectionMethod: `
394
+ 1. Identify relevant log sources
395
+ 2. Preserve logs before rotation
396
+ 3. Export with timestamps intact
397
+ 4. Document time zone and NTP status
398
+ 5. Calculate hash of log files
399
+ 6. Maintain chain of custody
400
+ `,
401
+ chainOfCustody: [
402
+ {
403
+ order: 1,
404
+ action: 'Log identification',
405
+ responsible: 'Incident responder',
406
+ documentation: 'Log source list, retention status',
407
+ verification: 'Verified with system admin',
408
+ },
409
+ {
410
+ order: 2,
411
+ action: 'Log preservation',
412
+ responsible: 'Incident responder',
413
+ documentation: 'Preservation notice, collection timestamp',
414
+ verification: 'Hash of collected logs',
415
+ },
416
+ {
417
+ order: 3,
418
+ action: 'Transfer to investigation team',
419
+ responsible: 'Evidence custodian',
420
+ documentation: 'Transfer form, hash verification',
421
+ verification: 'Receiving signature',
422
+ },
423
+ ],
424
+ storageRequirements: [
425
+ 'Encrypted storage',
426
+ 'Access controls',
427
+ 'Audit logging',
428
+ 'Backup copies',
429
+ ],
430
+ retentionPeriod: 'Per legal hold or organizational policy (typically 1-7 years)',
431
+ destructionProcedure: 'Secure deletion with verification',
432
+ legalConsiderations: [
433
+ 'Authenticity of logs',
434
+ 'Timestamp accuracy',
435
+ 'Completeness of collection',
436
+ 'Privacy considerations for content',
437
+ ],
438
+ },
439
+ {
440
+ id: 'malware-samples',
441
+ name: 'Malware Sample Handling',
442
+ evidenceType: 'Malware executables, scripts, documents',
443
+ collectionMethod: `
444
+ 1. Isolate infected system
445
+ 2. Collect sample without execution
446
+ 3. Archive in password-protected container
447
+ 4. Calculate multiple hash values
448
+ 5. Document collection context
449
+ 6. Submit to analysis sandbox (isolated)
450
+ `,
451
+ chainOfCustody: [
452
+ {
453
+ order: 1,
454
+ action: 'Sample identification',
455
+ responsible: 'Malware analyst',
456
+ documentation: 'File path, hash, metadata',
457
+ verification: 'Initial hash calculation',
458
+ },
459
+ {
460
+ order: 2,
461
+ action: 'Secure containment',
462
+ responsible: 'Malware analyst',
463
+ documentation: 'Container type, password storage',
464
+ verification: 'Contained hash verification',
465
+ },
466
+ {
467
+ order: 3,
468
+ action: 'Analysis',
469
+ responsible: 'Malware analyst',
470
+ documentation: 'Analysis report, IOCs extracted',
471
+ verification: 'Analysis methodology documented',
472
+ },
473
+ ],
474
+ storageRequirements: [
475
+ 'Air-gapped storage',
476
+ 'Encrypted containers',
477
+ 'Access restricted to trained personnel',
478
+ 'Separate from production systems',
479
+ ],
480
+ retentionPeriod: 'Indefinite for threat intelligence purposes',
481
+ destructionProcedure: 'N/A - samples typically retained',
482
+ legalConsiderations: [
483
+ 'Authorization to possess malware',
484
+ 'Sharing restrictions (export controls)',
485
+ 'Attribution considerations',
486
+ ],
487
+ },
488
+ ];
489
+ // ═══════════════════════════════════════════════════════════════════════════════
490
+ // REPORTING PROCEDURES
491
+ // ═══════════════════════════════════════════════════════════════════════════════
492
+ export const REPORTING_PROCEDURES = [
493
+ {
494
+ id: 'cisa-incident',
495
+ name: 'CISA Incident Report',
496
+ triggerConditions: [
497
+ 'Critical infrastructure incident',
498
+ 'Federal network compromise',
499
+ 'Ransomware affecting CI',
500
+ 'Major vulnerability exploitation',
501
+ ],
502
+ requiredAgencies: ['cisa'],
503
+ timeline: '24 hours for critical, 72 hours for significant',
504
+ reportFormat: 'CISA Incident Reporting Portal format',
505
+ deliveryMethod: 'CISA reporting portal (us-cert.cisa.gov) or 1-888-282-0870',
506
+ followUp: [
507
+ 'Monitor for CISA requests for additional information',
508
+ 'Provide updates on containment/eradication',
509
+ 'Participate in information sharing if requested',
510
+ ],
511
+ },
512
+ {
513
+ id: 'fbi-cyber',
514
+ name: 'FBI Cyber Incident Report',
515
+ triggerConditions: [
516
+ 'Suspected nation-state activity',
517
+ 'Critical infrastructure attack',
518
+ 'Ransomware with major impact',
519
+ 'Significant financial loss',
520
+ ],
521
+ requiredAgencies: ['federal-le'],
522
+ timeline: 'As soon as practical after discovery',
523
+ reportFormat: 'FBI IC3 form or direct to local field office',
524
+ deliveryMethod: 'ic3.gov or local FBI field office',
525
+ followUp: [
526
+ 'Assign case agent liaison',
527
+ 'Provide evidence as requested',
528
+ 'Coordinate on public disclosure',
529
+ ],
530
+ },
531
+ {
532
+ id: 'sec-8k',
533
+ name: 'SEC Form 8-K Cybersecurity Incident',
534
+ triggerConditions: [
535
+ 'Material cybersecurity incident at public company',
536
+ 'Significant impact on operations',
537
+ 'Material financial impact',
538
+ ],
539
+ requiredAgencies: ['regulatory'],
540
+ timeline: '4 business days of materiality determination',
541
+ reportFormat: 'SEC Form 8-K Item 1.05',
542
+ deliveryMethod: 'EDGAR filing system',
543
+ followUp: [
544
+ 'Quarterly 10-Q/10-K updates',
545
+ 'Additional 8-K if circumstances change materially',
546
+ ],
547
+ },
548
+ {
549
+ id: 'hipaa-breach',
550
+ name: 'HIPAA Breach Notification',
551
+ triggerConditions: [
552
+ 'PHI breach affecting 1+ individuals',
553
+ 'Unauthorized access/disclosure of PHI',
554
+ ],
555
+ requiredAgencies: ['regulatory'],
556
+ timeline: '60 days from discovery (500+ requires immediate media)',
557
+ reportFormat: 'HHS Breach Notification Portal',
558
+ deliveryMethod: 'HHS portal + individual notification + media if 500+',
559
+ followUp: [
560
+ 'Annual HHS report for breaches < 500',
561
+ 'State attorney general notifications',
562
+ 'OCR investigation response if audited',
563
+ ],
564
+ },
565
+ ];
566
+ // ═══════════════════════════════════════════════════════════════════════════════
567
+ // COORDINATION PROTOCOLS
568
+ // ═══════════════════════════════════════════════════════════════════════════════
569
+ export const COORDINATION_PROTOCOLS = [
570
+ {
571
+ id: 'federal-cyber-unified',
572
+ name: 'Federal Cyber Unified Coordination Group',
573
+ participants: ['federal-le', 'cisa', 'intelligence'],
574
+ purpose: 'Coordinate federal response to significant cyber incidents',
575
+ initiationCriteria: [
576
+ 'National security implications',
577
+ 'Multiple federal agencies affected',
578
+ 'Critical infrastructure at risk',
579
+ 'Presidential directive',
580
+ ],
581
+ communicationChannels: [
582
+ {
583
+ type: 'secure-email',
584
+ classification: 'secret',
585
+ availability: '24/7',
586
+ contactInfo: 'ucg@cisa.dhs.gov (SIPRNET)',
587
+ },
588
+ {
589
+ type: 'secure-phone',
590
+ classification: 'secret',
591
+ availability: '24/7',
592
+ contactInfo: 'CISA SOC classified line',
593
+ },
594
+ {
595
+ type: 'classified-network',
596
+ classification: 'ts-sci',
597
+ availability: '24/7',
598
+ contactInfo: 'JWICS portal',
599
+ },
600
+ ],
601
+ informationSharing: [
602
+ {
603
+ dataType: 'IOCs (unattributed)',
604
+ canShareWith: ['federal-le', 'cisa', 'intelligence', 'contractor'],
605
+ restrictions: ['TLP:AMBER minimum'],
606
+ approval: 'Automatic',
607
+ },
608
+ {
609
+ dataType: 'Attribution',
610
+ canShareWith: ['intelligence', 'federal-le'],
611
+ restrictions: ['Need-to-know', 'Originator approval required'],
612
+ approval: 'Senior official',
613
+ },
614
+ {
615
+ dataType: 'Victim information',
616
+ canShareWith: ['federal-le'],
617
+ restrictions: ['Victim consent preferred', 'Privacy Act'],
618
+ approval: 'Legal counsel',
619
+ },
620
+ ],
621
+ escalationPath: [
622
+ {
623
+ level: 1,
624
+ criteria: 'Initial incident assessment',
625
+ contacts: ['CISA duty officer', 'FBI cyber watch'],
626
+ timeline: '1-2 hours',
627
+ actions: ['Establish facts', 'Assess scope', 'Initial notifications'],
628
+ },
629
+ {
630
+ level: 2,
631
+ criteria: 'Confirmed significant incident',
632
+ contacts: ['Agency CISO', 'Sector ISAC', 'Relevant sector agencies'],
633
+ timeline: '2-4 hours',
634
+ actions: ['Activate response team', 'Begin coordination calls', 'Engage victim'],
635
+ },
636
+ {
637
+ level: 3,
638
+ criteria: 'Critical infrastructure at risk or national security implications',
639
+ contacts: ['National Security Council', 'CISA Director', 'FBI Director'],
640
+ timeline: '4-8 hours',
641
+ actions: ['UCG activation', 'Senior briefings', 'Interagency coordination'],
642
+ },
643
+ {
644
+ level: 4,
645
+ criteria: 'National emergency',
646
+ contacts: ['White House', 'Cabinet-level', 'Congressional notification'],
647
+ timeline: 'Immediate',
648
+ actions: ['Presidential briefing', 'Emergency declarations', 'Public communications'],
649
+ },
650
+ ],
651
+ terminationCriteria: [
652
+ 'Threat neutralized',
653
+ 'Incident contained',
654
+ 'Recovery complete',
655
+ 'Transition to normal operations',
656
+ ],
657
+ },
658
+ {
659
+ id: 'state-local-coordination',
660
+ name: 'State/Local Law Enforcement Coordination',
661
+ participants: ['federal-le', 'state-le', 'local-le'],
662
+ purpose: 'Coordinate cyber response across jurisdictions',
663
+ initiationCriteria: [
664
+ 'Multi-jurisdiction incident',
665
+ 'State/local request for assistance',
666
+ 'Federal nexus identified',
667
+ ],
668
+ communicationChannels: [
669
+ {
670
+ type: 'secure-portal',
671
+ classification: 'cui',
672
+ availability: 'Business hours + on-call',
673
+ contactInfo: 'FBI LEEP portal',
674
+ },
675
+ {
676
+ type: 'secure-phone',
677
+ classification: 'unclassified',
678
+ availability: '24/7',
679
+ contactInfo: 'Local FBI field office',
680
+ },
681
+ ],
682
+ informationSharing: [
683
+ {
684
+ dataType: 'Case information',
685
+ canShareWith: ['federal-le', 'state-le', 'local-le'],
686
+ restrictions: ['Need-to-know', 'Investigation sensitivity'],
687
+ approval: 'Case agent',
688
+ },
689
+ {
690
+ dataType: 'Threat intelligence',
691
+ canShareWith: ['state-le', 'local-le'],
692
+ restrictions: ['TLP:GREEN or above'],
693
+ approval: 'Intelligence unit',
694
+ },
695
+ ],
696
+ escalationPath: [
697
+ {
698
+ level: 1,
699
+ criteria: 'Local incident with federal nexus',
700
+ contacts: ['Local FBI field office', 'State fusion center'],
701
+ timeline: 'Same day',
702
+ actions: ['Information sharing', 'Jurisdiction determination'],
703
+ },
704
+ {
705
+ level: 2,
706
+ criteria: 'Multi-state or complex case',
707
+ contacts: ['FBI cyber squad', 'USAO cyber unit'],
708
+ timeline: '1-2 days',
709
+ actions: ['Joint investigation', 'Resource allocation'],
710
+ },
711
+ ],
712
+ terminationCriteria: [
713
+ 'Case resolution',
714
+ 'Jurisdiction transfer',
715
+ 'Investigation closure',
716
+ ],
717
+ },
718
+ {
719
+ id: 'international-coordination',
720
+ name: 'International Law Enforcement Coordination',
721
+ participants: ['federal-le', 'international'],
722
+ purpose: 'Coordinate with foreign law enforcement on cyber investigations',
723
+ initiationCriteria: [
724
+ 'Foreign-based threat actors',
725
+ 'Cross-border criminal activity',
726
+ 'Foreign victim assistance',
727
+ 'Extradition matters',
728
+ ],
729
+ communicationChannels: [
730
+ {
731
+ type: 'secure-email',
732
+ classification: 'secret',
733
+ availability: 'Business hours',
734
+ contactInfo: 'FBI Legal Attaché network',
735
+ },
736
+ {
737
+ type: 'in-person',
738
+ classification: 'secret',
739
+ availability: 'Scheduled',
740
+ contactInfo: 'Via embassy coordination',
741
+ },
742
+ ],
743
+ informationSharing: [
744
+ {
745
+ dataType: 'Case information',
746
+ canShareWith: ['international'],
747
+ restrictions: ['MLAT required for formal cooperation', 'Originator control'],
748
+ approval: 'DOJ OIA',
749
+ },
750
+ {
751
+ dataType: 'IOCs',
752
+ canShareWith: ['international'],
753
+ restrictions: ['TLP:WHITE preferred', 'Attribution removed'],
754
+ approval: 'Case agent with legal review',
755
+ },
756
+ ],
757
+ escalationPath: [
758
+ {
759
+ level: 1,
760
+ criteria: 'International lead identified',
761
+ contacts: ['FBI Legal Attaché', 'Interpol NCB'],
762
+ timeline: '24-48 hours',
763
+ actions: ['Request information', 'Establish liaison'],
764
+ },
765
+ {
766
+ level: 2,
767
+ criteria: 'Formal cooperation needed',
768
+ contacts: ['DOJ OIA', 'Foreign ministry'],
769
+ timeline: 'Weeks to months',
770
+ actions: ['MLAT request', 'Diplomatic coordination'],
771
+ },
772
+ ],
773
+ terminationCriteria: [
774
+ 'Investigation complete',
775
+ 'Prosecution concluded',
776
+ 'Cooperation no longer needed',
777
+ ],
778
+ },
779
+ ];
780
+ // ═══════════════════════════════════════════════════════════════════════════════
781
+ // HELPER FUNCTIONS
782
+ // ═══════════════════════════════════════════════════════════════════════════════
783
+ export function getAgencyContacts(agencyType) {
784
+ return US_FEDERAL_CONTACTS.filter(c => c.agencyType === agencyType);
785
+ }
786
+ export function getApplicableLegalFrameworks(agencyTypes) {
787
+ return LEGAL_FRAMEWORKS.filter(f => f.applicableAgencies.some(a => agencyTypes.includes(a)));
788
+ }
789
+ export function getReportingRequirements(triggerCondition) {
790
+ return REPORTING_PROCEDURES.filter(p => p.triggerConditions.some(tc => tc.toLowerCase().includes(triggerCondition.toLowerCase())));
791
+ }
792
+ export function getCoordinationProtocol(participants) {
793
+ return COORDINATION_PROTOCOLS.find(p => participants.every(part => p.participants.includes(part)));
794
+ }
795
+ export function generateIncidentReportTemplate(incidentType, agency) {
796
+ const contacts = getAgencyContacts(agency);
797
+ const frameworks = getApplicableLegalFrameworks([agency]);
798
+ const procedures = getReportingRequirements(incidentType);
799
+ return `
800
+ # Incident Report: ${incidentType}
801
+ Generated: ${new Date().toISOString()}
802
+
803
+ ## Reporting Agency Information
804
+ ${contacts.map(c => `- ${c.agency}: ${c.contact.phone} / ${c.contact.email}`).join('\n')}
805
+
806
+ ## Applicable Legal Frameworks
807
+ ${frameworks.map(f => `- ${f.name}`).join('\n')}
808
+
809
+ ## Reporting Timeline
810
+ ${procedures.map(p => `- ${p.name}: ${p.timeline}`).join('\n')}
811
+
812
+ ## Incident Details
813
+ [TO BE COMPLETED]
814
+
815
+ ### Initial Discovery
816
+ - Date/Time:
817
+ - Discovery Method:
818
+ - Initial Reporter:
819
+
820
+ ### Impact Assessment
821
+ - Systems Affected:
822
+ - Data Potentially Compromised:
823
+ - Business Impact:
824
+
825
+ ### Technical Details
826
+ - Attack Vector:
827
+ - IOCs Identified:
828
+ - Malware/Tools Used:
829
+
830
+ ### Response Actions
831
+ - Containment Measures:
832
+ - Eradication Steps:
833
+ - Recovery Status:
834
+
835
+ ### Evidence Collected
836
+ - Digital Evidence:
837
+ - Network Logs:
838
+ - Other Evidence:
839
+
840
+ ## Chain of Custody
841
+ | Date | Action | Handler | Signature |
842
+ |------|--------|---------|-----------|
843
+ | | | | |
844
+
845
+ ## Notifications Made
846
+ | Agency | Date | Method | Reference |
847
+ |--------|------|--------|-----------|
848
+ | | | | |
849
+
850
+ ## Approval
851
+ - Prepared By:
852
+ - Reviewed By:
853
+ - Approved By:
854
+ `;
855
+ }
856
+ export function generateEvidenceForm(evidenceType) {
857
+ const procedure = EVIDENCE_HANDLING_PROCEDURES.find(p => p.evidenceType.toLowerCase().includes(evidenceType.toLowerCase()));
858
+ if (!procedure) {
859
+ return '# Evidence Form - Type Not Found';
860
+ }
861
+ return `
862
+ # Evidence Collection Form
863
+ Type: ${procedure.evidenceType}
864
+ Procedure: ${procedure.name}
865
+
866
+ ## Collection Information
867
+ - Collection Date/Time:
868
+ - Location:
869
+ - Collector Name:
870
+ - Collector Badge/ID:
871
+ - Witness Name:
872
+ - Witness Badge/ID:
873
+
874
+ ## Evidence Description
875
+ - Item Description:
876
+ - Serial Number (if applicable):
877
+ - Condition at Collection:
878
+ - Photos Taken: [ ] Yes [ ] No
879
+
880
+ ## Hash Values
881
+ - MD5:
882
+ - SHA-1:
883
+ - SHA-256:
884
+
885
+ ## Collection Method
886
+ ${procedure.collectionMethod}
887
+
888
+ ## Chain of Custody
889
+
890
+ ${procedure.chainOfCustody.map(step => `
891
+ ### Step ${step.order}: ${step.action}
892
+ - Responsible: ${step.responsible}
893
+ - Documentation: ${step.documentation}
894
+ - Verification: ${step.verification}
895
+ - Date/Time:
896
+ - Signature:
897
+ `).join('')}
898
+
899
+ ## Storage Location
900
+ - Initial Storage:
901
+ - Current Storage:
902
+ - Access Log Reference:
903
+
904
+ ## Legal Considerations
905
+ ${procedure.legalConsiderations.map(c => `- ${c}`).join('\n')}
906
+
907
+ ## Retention
908
+ - Retention Period: ${procedure.retentionPeriod}
909
+ - Destruction Procedure: ${procedure.destructionProcedure}
910
+ `;
911
+ }
912
+ //# sourceMappingURL=governmentProcedures.js.map