vaspera 2.11.0 → 2.13.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 (176) hide show
  1. package/CHANGELOG.md +46 -0
  2. package/dist/__tests__/audit-trail.test.d.ts +7 -0
  3. package/dist/__tests__/audit-trail.test.d.ts.map +1 -0
  4. package/dist/__tests__/audit-trail.test.js +336 -0
  5. package/dist/__tests__/audit-trail.test.js.map +1 -0
  6. package/dist/__tests__/property-test-helpers.d.ts +1 -1
  7. package/dist/__tests__/siem-integration.test.d.ts +7 -0
  8. package/dist/__tests__/siem-integration.test.d.ts.map +1 -0
  9. package/dist/__tests__/siem-integration.test.js +285 -0
  10. package/dist/__tests__/siem-integration.test.js.map +1 -0
  11. package/dist/action/pr-comment.test.js +1 -0
  12. package/dist/action/pr-comment.test.js.map +1 -1
  13. package/dist/action/sarif-upload.test.js +1 -0
  14. package/dist/action/sarif-upload.test.js.map +1 -1
  15. package/dist/autofix/ast/__tests__/typescript.test.d.ts +5 -0
  16. package/dist/autofix/ast/__tests__/typescript.test.d.ts.map +1 -0
  17. package/dist/autofix/ast/__tests__/typescript.test.js +210 -0
  18. package/dist/autofix/ast/__tests__/typescript.test.js.map +1 -0
  19. package/dist/autofix/ast/index.d.ts +11 -0
  20. package/dist/autofix/ast/index.d.ts.map +1 -0
  21. package/dist/autofix/ast/index.js +11 -0
  22. package/dist/autofix/ast/index.js.map +1 -0
  23. package/dist/autofix/ast/types.d.ts +77 -0
  24. package/dist/autofix/ast/types.d.ts.map +1 -0
  25. package/dist/autofix/ast/types.js +9 -0
  26. package/dist/autofix/ast/types.js.map +1 -0
  27. package/dist/autofix/ast/typescript.d.ts +17 -0
  28. package/dist/autofix/ast/typescript.d.ts.map +1 -0
  29. package/dist/autofix/ast/typescript.js +427 -0
  30. package/dist/autofix/ast/typescript.js.map +1 -0
  31. package/dist/autofix/constitution.schema.d.ts +21 -21
  32. package/dist/autofix/index.d.ts +1 -0
  33. package/dist/autofix/index.d.ts.map +1 -1
  34. package/dist/autofix/index.js +2 -0
  35. package/dist/autofix/index.js.map +1 -1
  36. package/dist/config/flags.d.ts +6 -6
  37. package/dist/history/store.d.ts +55 -1
  38. package/dist/history/store.d.ts.map +1 -1
  39. package/dist/history/store.js +152 -4
  40. package/dist/history/store.js.map +1 -1
  41. package/dist/history/types.d.ts +9 -5
  42. package/dist/history/types.d.ts.map +1 -1
  43. package/dist/history/verify.d.ts.map +1 -1
  44. package/dist/history/verify.js +5 -3
  45. package/dist/history/verify.js.map +1 -1
  46. package/dist/index.d.ts.map +1 -1
  47. package/dist/index.js +923 -16
  48. package/dist/index.js.map +1 -1
  49. package/dist/integrations/siem/datadog.d.ts +44 -0
  50. package/dist/integrations/siem/datadog.d.ts.map +1 -0
  51. package/dist/integrations/siem/datadog.js +211 -0
  52. package/dist/integrations/siem/datadog.js.map +1 -0
  53. package/dist/integrations/siem/format.d.ts +59 -0
  54. package/dist/integrations/siem/format.d.ts.map +1 -0
  55. package/dist/integrations/siem/format.js +360 -0
  56. package/dist/integrations/siem/format.js.map +1 -0
  57. package/dist/integrations/siem/index.d.ts +56 -0
  58. package/dist/integrations/siem/index.d.ts.map +1 -0
  59. package/dist/integrations/siem/index.js +117 -0
  60. package/dist/integrations/siem/index.js.map +1 -0
  61. package/dist/integrations/siem/sentinel.d.ts +53 -0
  62. package/dist/integrations/siem/sentinel.d.ts.map +1 -0
  63. package/dist/integrations/siem/sentinel.js +231 -0
  64. package/dist/integrations/siem/sentinel.js.map +1 -0
  65. package/dist/integrations/siem/splunk.d.ts +46 -0
  66. package/dist/integrations/siem/splunk.d.ts.map +1 -0
  67. package/dist/integrations/siem/splunk.js +210 -0
  68. package/dist/integrations/siem/splunk.js.map +1 -0
  69. package/dist/integrations/siem/types.d.ts +210 -0
  70. package/dist/integrations/siem/types.d.ts.map +1 -0
  71. package/dist/integrations/siem/types.js +9 -0
  72. package/dist/integrations/siem/types.js.map +1 -0
  73. package/dist/persistence/__tests__/json-fallback.test.d.ts +5 -0
  74. package/dist/persistence/__tests__/json-fallback.test.d.ts.map +1 -0
  75. package/dist/persistence/__tests__/json-fallback.test.js +249 -0
  76. package/dist/persistence/__tests__/json-fallback.test.js.map +1 -0
  77. package/dist/persistence/__tests__/persistence.test.d.ts +5 -0
  78. package/dist/persistence/__tests__/persistence.test.d.ts.map +1 -0
  79. package/dist/persistence/__tests__/persistence.test.js +369 -0
  80. package/dist/persistence/__tests__/persistence.test.js.map +1 -0
  81. package/dist/persistence/db.d.ts +30 -0
  82. package/dist/persistence/db.d.ts.map +1 -0
  83. package/dist/persistence/db.js +128 -0
  84. package/dist/persistence/db.js.map +1 -0
  85. package/dist/persistence/index.d.ts +75 -0
  86. package/dist/persistence/index.d.ts.map +1 -0
  87. package/dist/persistence/index.js +268 -0
  88. package/dist/persistence/index.js.map +1 -0
  89. package/dist/persistence/json-fallback.d.ts +52 -0
  90. package/dist/persistence/json-fallback.d.ts.map +1 -0
  91. package/dist/persistence/json-fallback.js +283 -0
  92. package/dist/persistence/json-fallback.js.map +1 -0
  93. package/dist/persistence/migrations/index.d.ts +10 -0
  94. package/dist/persistence/migrations/index.d.ts.map +1 -0
  95. package/dist/persistence/migrations/index.js +125 -0
  96. package/dist/persistence/migrations/index.js.map +1 -0
  97. package/dist/persistence/repositories/findings.d.ts +41 -0
  98. package/dist/persistence/repositories/findings.d.ts.map +1 -0
  99. package/dist/persistence/repositories/findings.js +238 -0
  100. package/dist/persistence/repositories/findings.js.map +1 -0
  101. package/dist/persistence/repositories/projects.d.ts +22 -0
  102. package/dist/persistence/repositories/projects.d.ts.map +1 -0
  103. package/dist/persistence/repositories/projects.js +71 -0
  104. package/dist/persistence/repositories/projects.js.map +1 -0
  105. package/dist/persistence/repositories/scans.d.ts +30 -0
  106. package/dist/persistence/repositories/scans.d.ts.map +1 -0
  107. package/dist/persistence/repositories/scans.js +107 -0
  108. package/dist/persistence/repositories/scans.js.map +1 -0
  109. package/dist/persistence/repositories/trends.d.ts +42 -0
  110. package/dist/persistence/repositories/trends.d.ts.map +1 -0
  111. package/dist/persistence/repositories/trends.js +178 -0
  112. package/dist/persistence/repositories/trends.js.map +1 -0
  113. package/dist/persistence/types.d.ts +105 -0
  114. package/dist/persistence/types.d.ts.map +1 -0
  115. package/dist/persistence/types.js +13 -0
  116. package/dist/persistence/types.js.map +1 -0
  117. package/dist/plugins/types.d.ts +2 -2
  118. package/dist/scanners/ai-code/index.d.ts.map +1 -1
  119. package/dist/scanners/ai-code/index.js +90 -2
  120. package/dist/scanners/ai-code/index.js.map +1 -1
  121. package/dist/scanners/ai-code/types.d.ts +24 -12
  122. package/dist/scanners/ai-code/types.d.ts.map +1 -1
  123. package/dist/scanners/cache.d.ts.map +1 -1
  124. package/dist/scanners/cache.js +1 -0
  125. package/dist/scanners/cache.js.map +1 -1
  126. package/dist/scanners/deploy/types.d.ts +13 -13
  127. package/dist/scanners/detection/__tests__/detection.test.d.ts +5 -0
  128. package/dist/scanners/detection/__tests__/detection.test.d.ts.map +1 -0
  129. package/dist/scanners/detection/__tests__/detection.test.js +265 -0
  130. package/dist/scanners/detection/__tests__/detection.test.js.map +1 -0
  131. package/dist/scanners/detection/engines/ast-query.d.ts +23 -0
  132. package/dist/scanners/detection/engines/ast-query.d.ts.map +1 -0
  133. package/dist/scanners/detection/engines/ast-query.js +232 -0
  134. package/dist/scanners/detection/engines/ast-query.js.map +1 -0
  135. package/dist/scanners/detection/engines/data-flow.d.ts +12 -0
  136. package/dist/scanners/detection/engines/data-flow.d.ts.map +1 -0
  137. package/dist/scanners/detection/engines/data-flow.js +269 -0
  138. package/dist/scanners/detection/engines/data-flow.js.map +1 -0
  139. package/dist/scanners/detection/index.d.ts +29 -0
  140. package/dist/scanners/detection/index.d.ts.map +1 -0
  141. package/dist/scanners/detection/index.js +140 -0
  142. package/dist/scanners/detection/index.js.map +1 -0
  143. package/dist/scanners/detection/rules/builtin.d.ts +14 -0
  144. package/dist/scanners/detection/rules/builtin.d.ts.map +1 -0
  145. package/dist/scanners/detection/rules/builtin.js +307 -0
  146. package/dist/scanners/detection/rules/builtin.js.map +1 -0
  147. package/dist/scanners/detection/rules/loader.d.ts +19 -0
  148. package/dist/scanners/detection/rules/loader.d.ts.map +1 -0
  149. package/dist/scanners/detection/rules/loader.js +111 -0
  150. package/dist/scanners/detection/rules/loader.js.map +1 -0
  151. package/dist/scanners/detection/types.d.ts +171 -0
  152. package/dist/scanners/detection/types.d.ts.map +1 -0
  153. package/dist/scanners/detection/types.js +36 -0
  154. package/dist/scanners/detection/types.js.map +1 -0
  155. package/dist/scanners/eslint.d.ts.map +1 -1
  156. package/dist/scanners/eslint.js +45 -3
  157. package/dist/scanners/eslint.js.map +1 -1
  158. package/dist/scanners/index.d.ts +9 -1
  159. package/dist/scanners/index.d.ts.map +1 -1
  160. package/dist/scanners/index.js +64 -0
  161. package/dist/scanners/index.js.map +1 -1
  162. package/dist/scanners/index.test.js +6 -6
  163. package/dist/scanners/index.test.js.map +1 -1
  164. package/dist/scanners/scale/bottleneck-detector.d.ts +13 -2
  165. package/dist/scanners/scale/bottleneck-detector.d.ts.map +1 -1
  166. package/dist/scanners/scale/bottleneck-detector.js +199 -72
  167. package/dist/scanners/scale/bottleneck-detector.js.map +1 -1
  168. package/dist/scanners/scale/types.d.ts +3 -3
  169. package/dist/scanners/types.d.ts +19 -2
  170. package/dist/scanners/types.d.ts.map +1 -1
  171. package/dist/scanners/types.js +1 -0
  172. package/dist/scanners/types.js.map +1 -1
  173. package/dist/scanners/typescript.d.ts.map +1 -1
  174. package/dist/scanners/typescript.js +36 -4
  175. package/dist/scanners/typescript.js.map +1 -1
  176. package/package.json +5 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,51 @@
1
1
  # Changelog
2
2
 
3
+ ## [2.13.0] - 2026-06-04
4
+
5
+ ### Added
6
+
7
+ #### False Positive Feedback System
8
+ - New `feedback_submit` tool to mark findings as true/false positives
9
+ - New `feedback_report` tool to view FP rates by scanner and rule
10
+ - New `feedback_suppressions` tool to get rule suppression suggestions based on feedback
11
+ - Feedback stored in `.vaspera/fp-feedback.json` with full audit trail
12
+
13
+ #### Diff-Aware CI Scanning
14
+ - New `certification_scan_diff` tool scans only changed files (git diff)
15
+ - Estimates scan time savings vs full scan
16
+ - Auto-detects security-critical files that always get scanned
17
+
18
+ #### Standalone Autofix Preview
19
+ - `autofix_preview` now works without certification_id
20
+ - Provide file + pattern_id to preview fixes directly
21
+ - Use `autofix_list_patterns` to see available fix patterns
22
+
23
+ ### Fixed
24
+
25
+ #### Persistence DB Fallback
26
+ - Added JSON file fallback when SQLite is unavailable
27
+ - New `src/persistence/json-fallback.ts` with atomic writes
28
+ - Graceful degradation: warns but continues operating
29
+
30
+ #### scale_bottlenecks False Positives
31
+ - Added semantic analysis for workflow/pipeline patterns
32
+ - Confidence scoring (60-100) based on context
33
+ - Sequential workflows no longer flagged as N+1 queries
34
+
35
+ #### ai_code_verify Diagnostics
36
+ - Returns detailed diagnostics when 0 files found
37
+ - Shows which extensions were searched
38
+ - Reports which exclude patterns matched
39
+ - Suggests alternative file extensions
40
+
41
+ #### Scanner Error Messages
42
+ - Added `ScannerErrorDetails` with actionable suggestions
43
+ - tsc/eslint now report phase (init/scan/parse) and fix steps
44
+ - Full error output available for debugging
45
+
46
+ ### Changed
47
+ - MCP tools increased from 103 to 108
48
+
3
49
  ## 2.10.0
4
50
 
5
51
  ### Minor Changes
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Audit Trail Tests
3
+ *
4
+ * Tests for tamper-evident audit trail with hash chains and Sigstore signing.
5
+ */
6
+ export {};
7
+ //# sourceMappingURL=audit-trail.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"audit-trail.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/audit-trail.test.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}
@@ -0,0 +1,336 @@
1
+ /**
2
+ * Audit Trail Tests
3
+ *
4
+ * Tests for tamper-evident audit trail with hash chains and Sigstore signing.
5
+ */
6
+ import { describe, it, expect, beforeEach, afterEach } from "vitest";
7
+ import { mkdtemp, rm, readFile } from "fs/promises";
8
+ import { join } from "path";
9
+ import { tmpdir } from "os";
10
+ import { appendHistoryEntry, calculateEntryHash, exportAuditTrail, getHistoryStats, } from "../history/store.js";
11
+ import { verifyHistoryIntegrity, verifyEntry, formatVerificationResultAsMarkdown, } from "../history/verify.js";
12
+ describe("Audit Trail", () => {
13
+ let tempDir;
14
+ beforeEach(async () => {
15
+ tempDir = await mkdtemp(join(tmpdir(), "audit-trail-test-"));
16
+ });
17
+ afterEach(async () => {
18
+ await rm(tempDir, { recursive: true, force: true });
19
+ });
20
+ describe("Hash Chain", () => {
21
+ it("creates genesis entry with correct hash chain", async () => {
22
+ const entry = await appendHistoryEntry(tempDir, {
23
+ type: "certification_started",
24
+ agents: ["security", "dependency"],
25
+ certificationId: "cert-001",
26
+ });
27
+ expect(entry.integrity).toBeDefined();
28
+ expect(entry.integrity?.hash).toBeDefined();
29
+ expect(entry.integrity?.previousHash).toBe("0000000000000000000000000000000000000000000000000000000000000000");
30
+ });
31
+ it("chains entries correctly", async () => {
32
+ const entry1 = await appendHistoryEntry(tempDir, {
33
+ type: "certification_started",
34
+ agents: ["security"],
35
+ certificationId: "cert-001",
36
+ });
37
+ const entry2 = await appendHistoryEntry(tempDir, {
38
+ type: "scan_completed",
39
+ scanners: ["semgrep"],
40
+ findingsCount: 5,
41
+ bySeverity: { critical: 1, high: 2, medium: 2, low: 0, info: 0 },
42
+ durationMs: 1000,
43
+ certificationId: "cert-001",
44
+ });
45
+ expect(entry2.integrity?.previousHash).toBe(entry1.integrity?.hash);
46
+ });
47
+ it("calculates consistent hashes", async () => {
48
+ const entry = await appendHistoryEntry(tempDir, {
49
+ type: "finding_submitted",
50
+ certificationId: "cert-001",
51
+ agent: "security",
52
+ findingId: "finding-001",
53
+ severity: "high",
54
+ category: "sql-injection",
55
+ file: "src/api.ts",
56
+ });
57
+ const recalculatedHash = calculateEntryHash(entry);
58
+ expect(recalculatedHash).toBe(entry.integrity?.hash);
59
+ });
60
+ it("detects tampering", async () => {
61
+ await appendHistoryEntry(tempDir, {
62
+ type: "certification_started",
63
+ agents: ["security"],
64
+ certificationId: "cert-001",
65
+ });
66
+ await appendHistoryEntry(tempDir, {
67
+ type: "scan_completed",
68
+ scanners: ["semgrep"],
69
+ findingsCount: 5,
70
+ bySeverity: { critical: 1, high: 2, medium: 2, low: 0, info: 0 },
71
+ durationMs: 1000,
72
+ certificationId: "cert-001",
73
+ });
74
+ // Verify chain is valid
75
+ const result = await verifyHistoryIntegrity(tempDir);
76
+ expect(result.verified).toBe(true);
77
+ expect(result.chainIntegrity).toBe(true);
78
+ expect(result.entriesFailed).toBe(0);
79
+ });
80
+ });
81
+ describe("Entry Verification", () => {
82
+ it("verifies valid entry", async () => {
83
+ const entry = await appendHistoryEntry(tempDir, {
84
+ type: "certification_started",
85
+ agents: ["security"],
86
+ certificationId: "cert-001",
87
+ });
88
+ const result = verifyEntry(entry, "0000000000000000000000000000000000000000000000000000000000000000");
89
+ expect(result.hashValid).toBe(true);
90
+ expect(result.chainValid).toBe(true);
91
+ });
92
+ it("detects hash mismatch", async () => {
93
+ const entry = await appendHistoryEntry(tempDir, {
94
+ type: "certification_started",
95
+ agents: ["security"],
96
+ certificationId: "cert-001",
97
+ });
98
+ // Tamper with the entry
99
+ const tamperedEntry = {
100
+ ...entry,
101
+ integrity: {
102
+ ...entry.integrity,
103
+ hash: "tampered-hash",
104
+ },
105
+ };
106
+ const result = verifyEntry(tamperedEntry, "0000000000000000000000000000000000000000000000000000000000000000");
107
+ expect(result.hashValid).toBe(false);
108
+ expect(result.failureReason).toContain("Hash mismatch");
109
+ });
110
+ it("detects chain break", async () => {
111
+ const entry = await appendHistoryEntry(tempDir, {
112
+ type: "certification_started",
113
+ agents: ["security"],
114
+ certificationId: "cert-001",
115
+ });
116
+ const result = verifyEntry(entry, "wrong-previous-hash");
117
+ expect(result.chainValid).toBe(false);
118
+ expect(result.failureReason).toContain("Chain break");
119
+ });
120
+ });
121
+ describe("Audit Export", () => {
122
+ it("exports to JSON format", async () => {
123
+ await appendHistoryEntry(tempDir, {
124
+ type: "certification_started",
125
+ agents: ["security"],
126
+ certificationId: "cert-001",
127
+ });
128
+ await appendHistoryEntry(tempDir, {
129
+ type: "scan_completed",
130
+ scanners: ["semgrep"],
131
+ findingsCount: 3,
132
+ bySeverity: { critical: 0, high: 1, medium: 2, low: 0, info: 0 },
133
+ durationMs: 500,
134
+ certificationId: "cert-001",
135
+ });
136
+ const result = await exportAuditTrail(tempDir, { format: "json" });
137
+ expect(result.entryCount).toBe(2);
138
+ expect(result.content).toBeDefined();
139
+ expect(result.chainIntegrity.entriesWithIntegrity).toBe(2);
140
+ const parsed = JSON.parse(result.content);
141
+ expect(parsed.entries).toHaveLength(2);
142
+ expect(parsed.chainIntegrity.genesisHash).toBeDefined();
143
+ });
144
+ it("exports to JSONL format", async () => {
145
+ await appendHistoryEntry(tempDir, {
146
+ type: "certification_started",
147
+ agents: ["security"],
148
+ certificationId: "cert-001",
149
+ });
150
+ const result = await exportAuditTrail(tempDir, { format: "jsonl" });
151
+ expect(result.content).toBeDefined();
152
+ const lines = result.content.trim().split("\n");
153
+ expect(lines).toHaveLength(1);
154
+ const parsed = JSON.parse(lines[0]);
155
+ expect(parsed.type).toBe("certification_started");
156
+ });
157
+ it("exports to CSV format", async () => {
158
+ await appendHistoryEntry(tempDir, {
159
+ type: "certification_started",
160
+ agents: ["security"],
161
+ certificationId: "cert-001",
162
+ });
163
+ const result = await exportAuditTrail(tempDir, { format: "csv" });
164
+ expect(result.content).toBeDefined();
165
+ const lines = result.content.trim().split("\n");
166
+ expect(lines.length).toBeGreaterThanOrEqual(2);
167
+ expect(lines[0]).toContain("id");
168
+ expect(lines[0]).toContain("timestamp");
169
+ expect(lines[0]).toContain("hash");
170
+ });
171
+ it("writes to file when outputPath provided", async () => {
172
+ await appendHistoryEntry(tempDir, {
173
+ type: "certification_started",
174
+ agents: ["security"],
175
+ certificationId: "cert-001",
176
+ });
177
+ const outputPath = join(tempDir, "audit-export.json");
178
+ const result = await exportAuditTrail(tempDir, {
179
+ format: "json",
180
+ outputPath,
181
+ });
182
+ expect(result.outputPath).toBe(outputPath);
183
+ expect(result.content).toBeUndefined();
184
+ const fileContent = await readFile(outputPath, "utf-8");
185
+ const parsed = JSON.parse(fileContent);
186
+ expect(parsed.entries).toHaveLength(1);
187
+ });
188
+ it("filters by date range", async () => {
189
+ const now = new Date();
190
+ await appendHistoryEntry(tempDir, {
191
+ type: "certification_started",
192
+ agents: ["security"],
193
+ certificationId: "cert-001",
194
+ });
195
+ const result = await exportAuditTrail(tempDir, {
196
+ startDate: now.toISOString(),
197
+ endDate: new Date(now.getTime() + 1000).toISOString(),
198
+ });
199
+ expect(result.entryCount).toBe(1);
200
+ });
201
+ it("filters by entry type", async () => {
202
+ await appendHistoryEntry(tempDir, {
203
+ type: "certification_started",
204
+ agents: ["security"],
205
+ certificationId: "cert-001",
206
+ });
207
+ await appendHistoryEntry(tempDir, {
208
+ type: "scan_completed",
209
+ scanners: ["semgrep"],
210
+ findingsCount: 3,
211
+ bySeverity: { critical: 0, high: 1, medium: 2, low: 0, info: 0 },
212
+ durationMs: 500,
213
+ certificationId: "cert-001",
214
+ });
215
+ const result = await exportAuditTrail(tempDir, {
216
+ types: ["scan_completed"],
217
+ });
218
+ expect(result.entryCount).toBe(1);
219
+ const parsed = JSON.parse(result.content);
220
+ expect(parsed.entries[0].type).toBe("scan_completed");
221
+ });
222
+ it("excludes integrity proofs when requested", async () => {
223
+ await appendHistoryEntry(tempDir, {
224
+ type: "certification_started",
225
+ agents: ["security"],
226
+ certificationId: "cert-001",
227
+ });
228
+ const result = await exportAuditTrail(tempDir, {
229
+ includeIntegrity: false,
230
+ });
231
+ const parsed = JSON.parse(result.content);
232
+ expect(parsed.entries[0].integrity).toBeUndefined();
233
+ });
234
+ });
235
+ describe("History Stats", () => {
236
+ it("returns stats for existing history", async () => {
237
+ await appendHistoryEntry(tempDir, {
238
+ type: "certification_started",
239
+ agents: ["security"],
240
+ certificationId: "cert-001",
241
+ });
242
+ await appendHistoryEntry(tempDir, {
243
+ type: "scan_completed",
244
+ scanners: ["semgrep"],
245
+ findingsCount: 3,
246
+ bySeverity: { critical: 0, high: 1, medium: 2, low: 0, info: 0 },
247
+ durationMs: 500,
248
+ certificationId: "cert-001",
249
+ });
250
+ const stats = await getHistoryStats(tempDir);
251
+ expect(stats.exists).toBe(true);
252
+ expect(stats.entries).toBe(2);
253
+ expect(stats.sizeBytes).toBeGreaterThan(0);
254
+ expect(stats.oldestEntry).toBeDefined();
255
+ expect(stats.newestEntry).toBeDefined();
256
+ });
257
+ it("returns empty stats for non-existent history", async () => {
258
+ const emptyDir = await mkdtemp(join(tmpdir(), "empty-"));
259
+ try {
260
+ const stats = await getHistoryStats(emptyDir);
261
+ expect(stats.exists).toBe(false);
262
+ expect(stats.entries).toBe(0);
263
+ expect(stats.sizeBytes).toBe(0);
264
+ }
265
+ finally {
266
+ await rm(emptyDir, { recursive: true, force: true });
267
+ }
268
+ });
269
+ });
270
+ describe("Actor Identity", () => {
271
+ it("records actor in entry", async () => {
272
+ const entry = await appendHistoryEntry(tempDir, {
273
+ type: "finding_fixed",
274
+ findingId: "finding-001",
275
+ severity: "high",
276
+ fixMethod: "manual",
277
+ }, {
278
+ actor: {
279
+ type: "user",
280
+ id: "user-123",
281
+ email: "developer@example.com",
282
+ name: "Developer",
283
+ },
284
+ });
285
+ expect(entry.actor).toBeDefined();
286
+ expect(entry.actor?.type).toBe("user");
287
+ expect(entry.actor?.email).toBe("developer@example.com");
288
+ });
289
+ });
290
+ describe("Verification Formatting", () => {
291
+ it("formats successful verification as markdown", async () => {
292
+ await appendHistoryEntry(tempDir, {
293
+ type: "certification_started",
294
+ agents: ["security"],
295
+ certificationId: "cert-001",
296
+ });
297
+ const result = await verifyHistoryIntegrity(tempDir);
298
+ const markdown = formatVerificationResultAsMarkdown(result);
299
+ expect(markdown).toContain("# Audit Trail Integrity Verification");
300
+ expect(markdown).toContain("VERIFIED");
301
+ expect(markdown).toContain("Attestation");
302
+ });
303
+ it("formats failed verification as markdown", async () => {
304
+ await appendHistoryEntry(tempDir, {
305
+ type: "certification_started",
306
+ agents: ["security"],
307
+ certificationId: "cert-001",
308
+ });
309
+ // Create a mock failed result
310
+ const failedResult = {
311
+ projectPath: tempDir,
312
+ verifiedAt: new Date().toISOString(),
313
+ verified: false,
314
+ totalEntries: 2,
315
+ entriesVerified: 2,
316
+ entriesPassed: 1,
317
+ entriesFailed: 1,
318
+ chainIntegrity: false,
319
+ failures: [
320
+ {
321
+ entryId: "test-id",
322
+ timestamp: new Date().toISOString(),
323
+ hashValid: false,
324
+ chainValid: true,
325
+ failureReason: "Hash mismatch",
326
+ },
327
+ ],
328
+ };
329
+ const markdown = formatVerificationResultAsMarkdown(failedResult);
330
+ expect(markdown).toContain("FAILED");
331
+ expect(markdown).toContain("Warning");
332
+ expect(markdown).toContain("COMPROMISED");
333
+ });
334
+ });
335
+ });
336
+ //# sourceMappingURL=audit-trail.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"audit-trail.test.js","sourceRoot":"","sources":["../../src/__tests__/audit-trail.test.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACrE,OAAO,EAAE,OAAO,EAAE,EAAE,EAAS,QAAQ,EAAE,MAAM,aAAa,CAAC;AAC3D,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,MAAM,EAAE,MAAM,IAAI,CAAC;AAC5B,OAAO,EACL,kBAAkB,EAGlB,kBAAkB,EAClB,gBAAgB,EAChB,eAAe,GAChB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,sBAAsB,EACtB,WAAW,EACX,kCAAkC,GACnC,MAAM,sBAA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AAE,CAAC,WAAW,EAAE;gBACpC,QAAQ,EAAE,KAAK;gBACf,YAAY,EAAE,CAAC;gBACf,eAAe,EAAE,CAAC;gBAClB,aAAa,EAAE,CAAC;gBAChB,aAAa,EAAE,CAAC;gBAChB,cAAc,EAAE,KAAK;gBACrB,QAAQ,EAAE;oBACR;wBACE,OAAO,EAAE,SAAS;wBAClB,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;wBACnC,SAAS,EAAE,KAAK;wBAChB,UAAU,EAAE,IAAI;wBAChB,aAAa,EAAE,eAAe;qBAC/B;iBACF;aACF,CAAC;YAEF,MAAM,QAAQ,GAAG,kCAAkC,CAAC,YAAY,CAAC,CAAC;YAElE,MAAM,CAAC,QAAQ,CAAC,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;YACrC,MAAM,CAAC,QAAQ,CAAC,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;YACtC,MAAM,CAAC,QAAQ,CAAC,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC;QAC5C,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -26,7 +26,7 @@ export declare const arbitraries: {
26
26
  /**
27
27
  * Generate a plural noun for singularization testing
28
28
  */
29
- pluralNoun: fc.Arbitrary<"entries" | "data" | "categories" | "matches" | "users" | "products" | "orders" | "items" | "companies" | "stories" | "addresses" | "statuses" | "boxes" | "bushes" | "media" | "sheep" | "fish">;
29
+ pluralNoun: fc.Arbitrary<"entries" | "data" | "matches" | "categories" | "users" | "products" | "orders" | "items" | "companies" | "stories" | "addresses" | "statuses" | "boxes" | "bushes" | "media" | "sheep" | "fish">;
30
30
  /**
31
31
  * Generate an API path prefix
32
32
  */
@@ -0,0 +1,7 @@
1
+ /**
2
+ * SIEM Integration Tests
3
+ *
4
+ * Tests for SIEM event formatting and client registry.
5
+ */
6
+ export {};
7
+ //# sourceMappingURL=siem-integration.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"siem-integration.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/siem-integration.test.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}