-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathte_seed_data.sql
More file actions
730 lines (659 loc) · 23.3 KB
/
te_seed_data.sql
File metadata and controls
730 lines (659 loc) · 23.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
-- ====
-- schema/postgresql/te_seed_data.sql — PostgreSQL T&E Seed Data
-- ====
-- Appended to the psql script by adapter_postgresql.sh when SEED=true.
-- The placeholder {{DB_NAME}} is replaced before execution.
--
-- Data mirrors the Teradata seed data for cross-engine consistency.
-- PostgreSQL differences applied here:
-- - ON CONFLICT DO NOTHING — safe to re-run without duplicate errors
-- - UUID type used for ID columns (stored as uuid, not CHAR(36))
-- - TRUE/FALSE instead of BYTEINT 1/0
-- - DATE format: '2025-01-01'::date (ISO 8601)
-- - TIMESTAMP format: '2025-01-01 00:00:00'::timestamp
-- - No COLLECT STATISTICS (use ANALYZE instead)
-- - Schema-qualified as {{DB_NAME}}.{{TBL_*}} via search_path or explicit schema
-- ====
SET search_path TO {{DB_NAME}};
-- ====
-- organisations
-- ====
INSERT INTO {{TBL_ORGANISATIONS}}
(org_id, name, org_type, country, is_active)
VALUES
('10000-0000-0000-0000-00001',
'Capability Acquisition and Sustainment Group (CASG)',
'government', 'AU', TRUE)
ON CONFLICT DO NOTHING;
INSERT INTO {{TBL_ORGANISATIONS}}
(org_id, name, org_type, country, is_active)
VALUES
('10000-0000-0000-0000-00002',
'Defence Science and Technology (DST) Group',
'government', 'AU', TRUE)
ON CONFLICT DO NOTHING;
INSERT INTO {{TBL_ORGANISATIONS}}
(org_id, name, org_type, country, is_active)
VALUES
('10000-0000-0000-0000-00003',
'Leidos Australia',
'prime', 'AU', TRUE)
ON CONFLICT DO NOTHING;
INSERT INTO {{TBL_ORGANISATIONS}}
(org_id, name, org_type, country, is_active)
VALUES
('10000-0000-0000-0000-00004',
'BAE Systems Australia',
'prime', 'AU', TRUE)
ON CONFLICT DO NOTHING;
INSERT INTO {{TBL_ORGANISATIONS}}
(org_id, name, org_type, country, is_active)
VALUES
('10000-0000-0000-0000-00005',
'Joint Systems Test Facility (JSTF)',
'test_unit', 'AU', TRUE)
ON CONFLICT DO NOTHING;
-- ====
-- personnel
-- NOTE: password_hash values are bcrypt placeholders — replace before production
-- ====
INSERT INTO {{TBL_PERSONNEL}}
(person_id, org_id, full_name, email, te_role, clearance, password_hash, is_active)
VALUES
('20000-0000-0000-0000-00001',
'10000-0000-0000-0000-00001',
'Brigadier Helen Marsh', 'h.marsh@defence.gov.au',
'test_director', 'PV',
'$2b$12$PLACEHOLDER_BRIG_MARSH', TRUE)
ON CONFLICT DO NOTHING;
INSERT INTO {{TBL_PERSONNEL}}
(person_id, org_id, full_name, email, te_role, clearance, password_hash, is_active)
VALUES
('20000-0000-0000-0000-00002',
'10000-0000-0000-0000-00001',
'Col. Patrick OBrien', 'p.obrien@defence.gov.au',
'test_manager', 'NV2',
'$2b$12$PLACEHOLDER_COL_OBRIEN', TRUE)
ON CONFLICT DO NOTHING;
INSERT INTO {{TBL_PERSONNEL}}
(person_id, org_id, full_name, email, te_role, clearance, password_hash, is_active)
VALUES
('20000-0000-0000-0000-00003',
'10000-0000-0000-0000-00002',
'Dr. Anika Sharma', 'a.sharma@dst.defence.gov.au',
'test_engineer', 'NV2',
'$2b$12$PLACEHOLDER_DR_SHARMA', TRUE)
ON CONFLICT DO NOTHING;
INSERT INTO {{TBL_PERSONNEL}}
(person_id, org_id, full_name, email, te_role, clearance, password_hash, is_active)
VALUES
('20000-0000-0000-0000-00004',
'10000-0000-0000-0000-00003',
'Marcus Tran', 'm.tran@leidos.com.au',
'te_analyst', 'NV1',
'$2b$12$PLACEHOLDER_TRAN', TRUE)
ON CONFLICT DO NOTHING;
INSERT INTO {{TBL_PERSONNEL}}
(person_id, org_id, full_name, email, te_role, clearance, password_hash, is_active)
VALUES
('20000-0000-0000-0000-00005',
'10000-0000-0000-0000-00003',
'Yasmin El-Khoury', 'y.elkhoury@leidos.com.au',
'te_analyst', 'NV1',
'$2b$12$PLACEHOLDER_ELKHOURY', TRUE)
ON CONFLICT DO NOTHING;
INSERT INTO {{TBL_PERSONNEL}}
(person_id, org_id, full_name, email, te_role, clearance, password_hash, is_active)
VALUES
('20000-0000-0000-0000-00006',
'10000-0000-0000-0000-00005',
'Flt Lt Sam Burgess', 's.burgess@defence.gov.au',
'safety_engineer', 'NV2',
'$2b$12$PLACEHOLDER_BURGESS', TRUE)
ON CONFLICT DO NOTHING;
-- ====
-- test_programs
-- ====
INSERT INTO {{TBL_TEST_PROGRAMS}}
(program_id, org_id, program_director_id, program_code, program_name,
capability_area, classification, status, start_date, end_date)
VALUES
('30000-0000-0000-0000-00001',
'10000-0000-0000-0000-00001',
'20000-0000-0000-0000-00001',
'CYB9131',
'COSPO Cyber OT&E Programme',
'Cyber / Information Warfare',
'PROTECTED', 'active',
'2024-07-01'::date, '2026-06-30'::date)
ON CONFLICT DO NOTHING;
INSERT INTO {{TBL_TEST_PROGRAMS}}
(program_id, org_id, program_director_id, program_code, program_name,
capability_area, classification, status, start_date, end_date)
VALUES
('30000-0000-0000-0000-00002',
'10000-0000-0000-0000-00001',
'20000-0000-0000-0000-00001',
'LAND400-P3',
'LAND 400 Phase 3 - Infantry Fighting Vehicle T&E',
'Land Combat Vehicle',
'SECRET', 'active',
'2024-01-15'::date, '2027-12-31'::date)
ON CONFLICT DO NOTHING;
-- ====
-- temp_documents
-- ====
INSERT INTO {{TBL_TEMP_DOCUMENTS}}
(temp_id, program_id, author_id, version, title, status, doc_path)
VALUES
('40000-0000-0000-0000-00001',
'30000-0000-0000-0000-00001',
'20000-0000-0000-0000-00002',
'v1.0',
'COSPO CYB9131 Test and Evaluation Master Plan v1.0',
'approved',
'/documents/CYB9131/TEMP_v1.0_APPROVED.pdf')
ON CONFLICT DO NOTHING;
INSERT INTO {{TBL_TEMP_DOCUMENTS}}
(temp_id, program_id, author_id, version, title, status, doc_path)
VALUES
('40000-0000-0000-0000-00002',
'30000-0000-0000-0000-00001',
'20000-0000-0000-0000-00002',
'v1.1',
'COSPO CYB9131 Test and Evaluation Master Plan v1.1 (Amendment)',
'in_review',
'/documents/CYB9131/TEMP_v1.1_DRAFT.pdf')
ON CONFLICT DO NOTHING;
INSERT INTO {{TBL_TEMP_DOCUMENTS}}
(temp_id, program_id, author_id, version, title, status, doc_path)
VALUES
('40000-0000-0000-0000-00003',
'30000-0000-0000-0000-00002',
'20000-0000-0000-0000-00002',
'v0.5',
'LAND 400 Phase 3 IFV T&E Master Plan v0.5',
'draft',
'/documents/LAND400P3/TEMP_v0.5_DRAFT.pdf')
ON CONFLICT DO NOTHING;
-- ====
-- test_phases
-- ====
INSERT INTO {{TBL_TEST_PHASES}}
(phase_id, program_id, phase_manager_id, phase_code, phase_type,
phase_name, status, planned_start, planned_end, actual_start)
VALUES
('50000-0000-0000-0000-00001',
'30000-0000-0000-0000-00001',
'20000-0000-0000-0000-00002',
'CYB9131-DTE', 'DT&E',
'COSPO CYB9131 - Developmental Test and Evaluation',
'completed',
'2024-07-01'::date, '2024-12-31'::date, '2024-07-08'::date)
ON CONFLICT DO NOTHING;
INSERT INTO {{TBL_TEST_PHASES}}
(phase_id, program_id, phase_manager_id, phase_code, phase_type,
phase_name, status, planned_start, planned_end, actual_start)
VALUES
('50000-0000-0000-0000-00002',
'30000-0000-0000-0000-00001',
'20000-0000-0000-0000-00002',
'CYB9131-OTE', 'OT&E',
'COSPO CYB9131 - Operational Test and Evaluation',
'active',
'2025-01-15'::date, '2025-12-31'::date, '2025-01-20'::date)
ON CONFLICT DO NOTHING;
INSERT INTO {{TBL_TEST_PHASES}}
(phase_id, program_id, phase_manager_id, phase_code, phase_type,
phase_name, status, planned_start, planned_end)
VALUES
('50000-0000-0000-0000-00003',
'30000-0000-0000-0000-00002',
'20000-0000-0000-0000-00003',
'L400P3-ATE', 'AT&E',
'LAND 400 Ph3 IFV - Acceptance Test and Evaluation',
'planned',
'2025-06-01'::date, '2026-03-31'::date)
ON CONFLICT DO NOTHING;
-- ====
-- requirements
-- ====
INSERT INTO {{TBL_REQUIREMENTS}}
(req_id, program_id, req_identifier, title, req_type,
priority, source_document, verification_method)
VALUES
('60000-0000-0000-0000-00001',
'30000-0000-0000-0000-00001',
'SYS-SEC-001', 'Multi-Factor Authentication Enforcement',
'security', 1, 'CYB9131 SRD v2.3 S4.1', 'test')
ON CONFLICT DO NOTHING;
INSERT INTO {{TBL_REQUIREMENTS}}
(req_id, program_id, req_identifier, title, req_type,
priority, source_document, verification_method)
VALUES
('60000-0000-0000-0000-00002',
'30000-0000-0000-0000-00001',
'SYS-SEC-002', 'Data-at-Rest Encryption (AES-256)',
'security', 1, 'CYB9131 SRD v2.3 S4.2', 'test')
ON CONFLICT DO NOTHING;
INSERT INTO {{TBL_REQUIREMENTS}}
(req_id, program_id, req_identifier, title, req_type,
priority, source_document, verification_method)
VALUES
('60000-0000-0000-0000-00003',
'30000-0000-0000-0000-00001',
'SYS-PERF-001', 'System Availability - 99.5% Uptime SLA',
'performance', 1, 'CYB9131 SRD v2.3 S5.1', 'test')
ON CONFLICT DO NOTHING;
INSERT INTO {{TBL_REQUIREMENTS}}
(req_id, program_id, req_identifier, title, req_type,
priority, source_document, verification_method)
VALUES
('60000-0000-0000-0000-00004',
'30000-0000-0000-0000-00001',
'SYS-FUNC-001', 'Audit Log - All User Actions Captured',
'functional', 1, 'CYB9131 SRD v2.3 S6.3', 'test')
ON CONFLICT DO NOTHING;
INSERT INTO {{TBL_REQUIREMENTS}}
(req_id, program_id, req_identifier, title, req_type,
priority, source_document, verification_method)
VALUES
('60000-0000-0000-0000-00005',
'30000-0000-0000-0000-00001',
'SYS-FUNC-002', 'Role-Based Access Control (RBAC) Enforcement',
'functional', 1, 'CYB9131 SRD v2.3 S6.4', 'test')
ON CONFLICT DO NOTHING;
INSERT INTO {{TBL_REQUIREMENTS}}
(req_id, program_id, req_identifier, title, req_type,
priority, source_document, verification_method)
VALUES
('60000-0000-0000-0000-00006',
'30000-0000-0000-0000-00001',
'SYS-COMP-001', 'ISM Control Compliance - Section 3 (Gateways)',
'compliance', 1, 'ACSC ISM 2024 S3', 'inspection')
ON CONFLICT DO NOTHING;
INSERT INTO {{TBL_REQUIREMENTS}}
(req_id, program_id, req_identifier, title, req_type,
priority, source_document, verification_method)
VALUES
('60000-0000-0000-0000-00007',
'30000-0000-0000-0000-00002',
'IFV-PERF-001', 'Cross-Country Speed - 40 km/h Minimum',
'performance', 1, 'LAND400 SRD v1.0 S8.2', 'test')
ON CONFLICT DO NOTHING;
INSERT INTO {{TBL_REQUIREMENTS}}
(req_id, program_id, req_identifier, title, req_type,
priority, source_document, verification_method)
VALUES
('60000-0000-0000-0000-00008',
'30000-0000-0000-0000-00002',
'IFV-SAF-001', 'Crew Survivability - STANAG 4569 Level 4',
'safety', 1, 'LAND400 SRD v1.0 S9.1', 'analysis')
ON CONFLICT DO NOTHING;
-- ====
-- test_cases
-- ====
INSERT INTO {{TBL_TEST_CASES}}
(tc_id, phase_id, author_id, tc_identifier, title,
objective, tc_type, status)
VALUES
('70000-0000-0000-0000-00001',
'50000-0000-0000-0000-00002',
'20000-0000-0000-0000-00003',
'TC-OTE-001', 'MFA - Valid TOTP Login Succeeds',
'Verify system grants access when correct TOTP code is supplied.',
'security', 'approved')
ON CONFLICT DO NOTHING;
INSERT INTO {{TBL_TEST_CASES}}
(tc_id, phase_id, author_id, tc_identifier, title,
objective, tc_type, status)
VALUES
('70000-0000-0000-0000-00002',
'50000-0000-0000-0000-00002',
'20000-0000-0000-0000-00003',
'TC-OTE-002', 'MFA - Brute-Force Lockout After 5 Failures',
'Verify account is locked after 5 consecutive incorrect TOTP codes.',
'security', 'approved')
ON CONFLICT DO NOTHING;
INSERT INTO {{TBL_TEST_CASES}}
(tc_id, phase_id, author_id, tc_identifier, title,
objective, tc_type, status)
VALUES
('70000-0000-0000-0000-00003',
'50000-0000-0000-0000-00002',
'20000-0000-0000-0000-00003',
'TC-OTE-003', 'Encryption - Verify AES-256 on Stored Data',
'Confirm classified records are stored encrypted using AES-256.',
'security', 'approved')
ON CONFLICT DO NOTHING;
INSERT INTO {{TBL_TEST_CASES}}
(tc_id, phase_id, author_id, tc_identifier, title,
objective, tc_type, status)
VALUES
('70000-0000-0000-0000-00004',
'50000-0000-0000-0000-00002',
'20000-0000-0000-0000-00004',
'TC-OTE-004', 'Availability - Sustained Load Over 72-Hour Window',
'Confirm system sustains 99.5% uptime under simulated operational load.',
'performance', 'approved')
ON CONFLICT DO NOTHING;
INSERT INTO {{TBL_TEST_CASES}}
(tc_id, phase_id, author_id, tc_identifier, title,
objective, tc_type, status)
VALUES
('70000-0000-0000-0000-00005',
'50000-0000-0000-0000-00002',
'20000-0000-0000-0000-00004',
'TC-OTE-005', 'Audit Log - Verify All Write Operations Are Captured',
'Confirm every CREATE, UPDATE, DELETE action is recorded in the audit log.',
'functional', 'approved')
ON CONFLICT DO NOTHING;
INSERT INTO {{TBL_TEST_CASES}}
(tc_id, phase_id, author_id, tc_identifier, title,
objective, tc_type, status)
VALUES
('70000-0000-0000-0000-00006',
'50000-0000-0000-0000-00002',
'20000-0000-0000-0000-00003',
'TC-OTE-006', 'RBAC - Operator Cannot Access Admin Functions',
'Verify operator role cannot invoke admin-only API endpoints.',
'functional', 'approved')
ON CONFLICT DO NOTHING;
INSERT INTO {{TBL_TEST_CASES}}
(tc_id, phase_id, author_id, tc_identifier, title,
objective, tc_type, status)
VALUES
('70000-0000-0000-0000-00007',
'50000-0000-0000-0000-00002',
'20000-0000-0000-0000-00005',
'TC-OTE-007', 'ISM Compliance - Gateway Configuration Inspection',
'Inspect gateway configuration against ACSC ISM Section 3 controls.',
'acceptance', 'approved')
ON CONFLICT DO NOTHING;
INSERT INTO {{TBL_TEST_CASES}}
(tc_id, phase_id, author_id, tc_identifier, title,
objective, tc_type, status)
VALUES
('70000-0000-0000-0000-00008',
'50000-0000-0000-0000-00002',
'20000-0000-0000-0000-00005',
'TC-OTE-008', 'Data-in-Transit - TLS 1.3 Enforcement on All APIs',
'Confirm all REST API endpoints enforce TLS 1.3 minimum.',
'security', 'approved')
ON CONFLICT DO NOTHING;
-- ====
-- vcrm_entries
-- ====
INSERT INTO {{TBL_VCRM_ENTRIES}}
(vcrm_id, req_id, tc_id, coverage_type, rationale, added_by_id)
VALUES
('80000-0000-0000-0000-00001',
'60000-0000-0000-0000-00001',
'70000-0000-0000-0000-00001',
'full', 'Positive path - valid TOTP grants access.',
'20000-0000-0000-0000-00002')
ON CONFLICT DO NOTHING;
INSERT INTO {{TBL_VCRM_ENTRIES}}
(vcrm_id, req_id, tc_id, coverage_type, rationale, added_by_id)
VALUES
('80000-0000-0000-0000-00002',
'60000-0000-0000-0000-00001',
'70000-0000-0000-0000-00002',
'full', 'Negative path - brute-force lockout enforces MFA resilience.',
'20000-0000-0000-0000-00002')
ON CONFLICT DO NOTHING;
INSERT INTO {{TBL_VCRM_ENTRIES}}
(vcrm_id, req_id, tc_id, coverage_type, rationale, added_by_id)
VALUES
('80000-0000-0000-0000-00003',
'60000-0000-0000-0000-00002',
'70000-0000-0000-0000-00003',
'full', 'Directly verifies AES-256 applied to stored classified data.',
'20000-0000-0000-0000-00002')
ON CONFLICT DO NOTHING;
INSERT INTO {{TBL_VCRM_ENTRIES}}
(vcrm_id, req_id, tc_id, coverage_type, rationale, added_by_id)
VALUES
('80000-0000-0000-0000-00004',
'60000-0000-0000-0000-00002',
'70000-0000-0000-0000-00008',
'partial', 'TLS-in-transit complements data-at-rest encryption coverage.',
'20000-0000-0000-0000-00002')
ON CONFLICT DO NOTHING;
INSERT INTO {{TBL_VCRM_ENTRIES}}
(vcrm_id, req_id, tc_id, coverage_type, rationale, added_by_id)
VALUES
('80000-0000-0000-0000-00005',
'60000-0000-0000-0000-00003',
'70000-0000-0000-0000-00004',
'full', '72-hour load test directly validates the 99.5% SLA.',
'20000-0000-0000-0000-00002')
ON CONFLICT DO NOTHING;
INSERT INTO {{TBL_VCRM_ENTRIES}}
(vcrm_id, req_id, tc_id, coverage_type, rationale, added_by_id)
VALUES
('80000-0000-0000-0000-00006',
'60000-0000-0000-0000-00004',
'70000-0000-0000-0000-00005',
'full', 'Covers all write operations in prescribed test scenarios.',
'20000-0000-0000-0000-00002')
ON CONFLICT DO NOTHING;
INSERT INTO {{TBL_VCRM_ENTRIES}}
(vcrm_id, req_id, tc_id, coverage_type, rationale, added_by_id)
VALUES
('80000-0000-0000-0000-00007',
'60000-0000-0000-0000-00005',
'70000-0000-0000-0000-00006',
'full', 'Directly validates operator-role access restrictions.',
'20000-0000-0000-0000-00002')
ON CONFLICT DO NOTHING;
INSERT INTO {{TBL_VCRM_ENTRIES}}
(vcrm_id, req_id, tc_id, coverage_type, rationale, added_by_id)
VALUES
('80000-0000-0000-0000-00008',
'60000-0000-0000-0000-00006',
'70000-0000-0000-0000-00007',
'full', 'Inspection-based verification of all ISM S3 gateway controls.',
'20000-0000-0000-0000-00002')
ON CONFLICT DO NOTHING;
-- ====
-- test_events
-- ====
INSERT INTO {{TBL_TEST_EVENTS}}
(event_id, phase_id, event_lead_id, event_code, event_name,
event_type, location, status,
planned_start, planned_end, actual_start, actual_end)
VALUES
('90000-0000-0000-0000-00001',
'50000-0000-0000-0000-00002',
'20000-0000-0000-0000-00002',
'CYB9131-OTE-EV01',
'COSPO OT&E Event 1 - Security and Functional Verification',
'lab', 'JSTF Cyber Lab, Russell Offices, ACT',
'completed',
'2025-02-10'::date, '2025-02-14'::date,
'2025-02-10'::date, '2025-02-14'::date)
ON CONFLICT DO NOTHING;
INSERT INTO {{TBL_TEST_EVENTS}}
(event_id, phase_id, event_lead_id, event_code, event_name,
event_type, location, status,
planned_start, planned_end, actual_start)
VALUES
('90000-0000-0000-0000-00002',
'50000-0000-0000-0000-00002',
'20000-0000-0000-0000-00002',
'CYB9131-OTE-EV02',
'COSPO OT&E Event 2 - Performance and Endurance',
'lab', 'JSTF Cyber Lab, Russell Offices, ACT',
'in_progress',
'2025-04-07'::date, '2025-04-11'::date,
'2025-04-07'::date)
ON CONFLICT DO NOTHING;
INSERT INTO {{TBL_TEST_EVENTS}}
(event_id, phase_id, event_lead_id, event_code, event_name,
event_type, location, status,
planned_start, planned_end)
VALUES
('90000-0000-0000-0000-00003',
'50000-0000-0000-0000-00002',
'20000-0000-0000-0000-00002',
'CYB9131-OTE-EV03',
'COSPO OT&E Event 3 - ISM Compliance Inspection',
'integration_test', 'JSTF Cyber Lab, Russell Offices, ACT',
'planned',
'2025-06-16'::date, '2025-06-20'::date)
ON CONFLICT DO NOTHING;
-- ====
-- test_results
-- ====
INSERT INTO {{TBL_TEST_RESULTS}}
(result_id, event_id, tc_id, executed_by_id,
verdict, executed_at, actual_result, notes)
VALUES
('a0000-0000-0000-0000-00001',
'90000-0000-0000-0000-00001',
'70000-0000-0000-0000-00001',
'20000-0000-0000-0000-00003',
'pass',
'2025-02-11 09:35:00'::timestamp,
'User authenticated in 1.8s. Session token issued.',
'Repeated 20 times across 4 user accounts - all passed.')
ON CONFLICT DO NOTHING;
INSERT INTO {{TBL_TEST_RESULTS}}
(result_id, event_id, tc_id, executed_by_id,
verdict, executed_at, actual_result, notes)
VALUES
('a0000-0000-0000-0000-00002',
'90000-0000-0000-0000-00001',
'70000-0000-0000-0000-00002',
'20000-0000-0000-0000-00003',
'pass',
'2025-02-11 11:10:00'::timestamp,
'Account locked on 5th failed attempt. Alert triggered.',
'Lockout time 47ms after final failure - within spec.')
ON CONFLICT DO NOTHING;
INSERT INTO {{TBL_TEST_RESULTS}}
(result_id, event_id, tc_id, executed_by_id,
verdict, executed_at, actual_result, notes)
VALUES
('a0000-0000-0000-0000-00003',
'90000-0000-0000-0000-00001',
'70000-0000-0000-0000-00003',
'20000-0000-0000-0000-00004',
'pass',
'2025-02-12 09:00:00'::timestamp,
'All 100 PROTECTED records confirmed encrypted (AES-256-GCM).',
'Keys held in Azure Key Vault. Rotation schedule confirmed.')
ON CONFLICT DO NOTHING;
INSERT INTO {{TBL_TEST_RESULTS}}
(result_id, event_id, tc_id, executed_by_id,
verdict, executed_at, actual_result, notes)
VALUES
('a0000-0000-0000-0000-00004',
'90000-0000-0000-0000-00001',
'70000-0000-0000-0000-00005',
'20000-0000-0000-0000-00004',
'fail',
'2025-02-12 14:30:00'::timestamp,
'28 of 30 write operations captured. DELETE on archive endpoint not logged.',
'DR raised: DR-CYB-0001. Deficiency in audit hook for archive endpoint.')
ON CONFLICT DO NOTHING;
INSERT INTO {{TBL_TEST_RESULTS}}
(result_id, event_id, tc_id, executed_by_id,
verdict, executed_at, actual_result, notes)
VALUES
('a0000-0000-0000-0000-00005',
'90000-0000-0000-0000-00001',
'70000-0000-0000-0000-00006',
'20000-0000-0000-0000-00005',
'pass',
'2025-02-13 10:00:00'::timestamp,
'All 12 admin endpoints returned HTTP 403 for operator role.',
NULL)
ON CONFLICT DO NOTHING;
INSERT INTO {{TBL_TEST_RESULTS}}
(result_id, event_id, tc_id, executed_by_id,
verdict, executed_at, actual_result, notes)
VALUES
('a0000-0000-0000-0000-00006',
'90000-0000-0000-0000-00001',
'70000-0000-0000-0000-00008',
'20000-0000-0000-0000-00003',
'fail',
'2025-02-13 14:00:00'::timestamp,
'Endpoint /api/v1/legacy/export accepts TLS 1.2 connections.',
'DR raised: DR-CYB-0002. Legacy endpoint excluded from TLS policy rollout.')
ON CONFLICT DO NOTHING;
INSERT INTO {{TBL_TEST_RESULTS}}
(result_id, event_id, tc_id, executed_by_id,
verdict, executed_at, actual_result, notes)
VALUES
('a0000-0000-0000-0000-00007',
'90000-0000-0000-0000-00002',
'70000-0000-0000-0000-00004',
'20000-0000-0000-0000-00004',
'inconclusive',
'2025-04-08 08:00:00'::timestamp,
'24 hours elapsed - uptime 99.9%. Full 72-hour window in progress.',
'Monitoring dashboard live. Splunk alerts configured.')
ON CONFLICT DO NOTHING;
-- ====
-- defect_reports
-- ====
INSERT INTO {{TBL_DEFECT_REPORTS}}
(defect_id, result_id, program_id, raised_by_id, assigned_to_id,
defect_ref, title, description, severity, status, raised_at)
VALUES
('b0000-0000-0000-0000-00001',
'a0000-0000-0000-0000-00004',
'30000-0000-0000-0000-00001',
'20000-0000-0000-0000-00004',
'20000-0000-0000-0000-00003',
'DR-CYB-0001',
'Audit Log - DELETE on /api/v2/archive/ Not Captured',
'The DELETE method on the archive endpoint does not trigger an audit log entry. Affects SYS-FUNC-001 compliance.',
'major', 'in_progress',
'2025-02-12 15:00:00'::timestamp)
ON CONFLICT DO NOTHING;
INSERT INTO {{TBL_DEFECT_REPORTS}}
(defect_id, result_id, program_id, raised_by_id, assigned_to_id,
defect_ref, title, description, severity, status, raised_at)
VALUES
('b0000-0000-0000-0000-00002',
'a0000-0000-0000-0000-00006',
'30000-0000-0000-0000-00001',
'20000-0000-0000-0000-00003',
'20000-0000-0000-0000-00003',
'DR-CYB-0002',
'TLS 1.2 Accepted on Legacy Export Endpoint',
'The /api/v1/legacy/export endpoint was excluded from the TLS 1.3 policy rollout. Affects SYS-SEC-002 coverage.',
'major', 'open',
'2025-02-13 14:45:00'::timestamp)
ON CONFLICT DO NOTHING;
INSERT INTO {{TBL_DEFECT_REPORTS}}
(defect_id, result_id, program_id, raised_by_id, assigned_to_id,
defect_ref, title, description, severity, status, raised_at)
VALUES
('b0000-0000-0000-0000-00003',
NULL,
'30000-0000-0000-0000-00001',
'20000-0000-0000-0000-00006',
'20000-0000-0000-0000-00002',
'DR-CYB-0003',
'Session Timeout Not Enforced After 15-Minute Inactivity',
'Idle sessions remain active indefinitely. ISM S6.2.4 requires automatic session termination after 15 minutes.',
'minor', 'open',
'2025-03-04 11:20:00'::timestamp)
ON CONFLICT DO NOTHING;
-- ====
-- evidence_artifacts — intentionally left empty (no evidence uploaded yet)
-- ====
-- ====
-- ANALYZE tables after seed data load for accurate query plans
-- (PostgreSQL equivalent of Teradata COLLECT STATISTICS)
-- ====
ANALYZE {{TBL_ORGANISATIONS}};
ANALYZE {{TBL_PERSONNEL}};
ANALYZE {{TBL_TEST_PROGRAMS}};
ANALYZE {{TBL_TEST_RESULTS}};
ANALYZE {{TBL_DEFECT_REPORTS}};