dvalincode 0.17.0 → 0.19.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 (104) hide show
  1. package/README.md +320 -46
  2. package/README.zh-CN.md +277 -39
  3. package/THIRD_PARTY_NOTICES.md +98 -43
  4. package/dist/cli.js +4 -0
  5. package/dist/cli.js.map +1 -1
  6. package/dist/commands/dvalin.d.ts +41 -1
  7. package/dist/commands/dvalin.js +219 -37
  8. package/dist/commands/dvalin.js.map +1 -1
  9. package/dist/commands/mcpInstall.d.ts +2 -0
  10. package/dist/commands/mcpInstall.js +69 -0
  11. package/dist/commands/mcpInstall.js.map +1 -0
  12. package/dist/commands/run.js +21 -0
  13. package/dist/commands/run.js.map +1 -1
  14. package/dist/commands/security.d.ts +47 -0
  15. package/dist/commands/security.js +415 -0
  16. package/dist/commands/security.js.map +1 -0
  17. package/dist/dvalinCli.d.ts +3 -0
  18. package/dist/dvalinCli.js +36 -0
  19. package/dist/dvalinCli.js.map +1 -0
  20. package/dist/dvalinIndex.d.ts +2 -0
  21. package/dist/dvalinIndex.js +9 -0
  22. package/dist/dvalinIndex.js.map +1 -0
  23. package/dist/evidence/pack.d.ts +8 -0
  24. package/dist/evidence/pack.js +16 -0
  25. package/dist/evidence/pack.js.map +1 -1
  26. package/dist/harness/run.d.ts +15 -0
  27. package/dist/harness/run.js +45 -19
  28. package/dist/harness/run.js.map +1 -1
  29. package/dist/harness/verification.d.ts +56 -0
  30. package/dist/harness/verification.js +90 -0
  31. package/dist/harness/verification.js.map +1 -0
  32. package/dist/mcp/install.d.ts +48 -0
  33. package/dist/mcp/install.js +74 -0
  34. package/dist/mcp/install.js.map +1 -0
  35. package/dist/mcp/server.d.ts +10 -1
  36. package/dist/mcp/server.js +251 -34
  37. package/dist/mcp/server.js.map +1 -1
  38. package/dist/remediation/automate.d.ts +4 -1
  39. package/dist/remediation/automate.js +35 -18
  40. package/dist/remediation/automate.js.map +1 -1
  41. package/dist/remediation/diffScope.d.ts +29 -0
  42. package/dist/remediation/diffScope.js +107 -0
  43. package/dist/remediation/diffScope.js.map +1 -0
  44. package/dist/remediation/executor.d.ts +60 -0
  45. package/dist/remediation/executor.js +144 -0
  46. package/dist/remediation/executor.js.map +1 -0
  47. package/dist/remediation/localScan.d.ts +2 -1
  48. package/dist/remediation/localScan.js +73 -3
  49. package/dist/remediation/localScan.js.map +1 -1
  50. package/dist/remediation/sarif.d.ts +6 -0
  51. package/dist/remediation/sarif.js +36 -14
  52. package/dist/remediation/sarif.js.map +1 -1
  53. package/dist/remediation/scannerSuite.d.ts +21 -0
  54. package/dist/remediation/scannerSuite.js +65 -4
  55. package/dist/remediation/scannerSuite.js.map +1 -1
  56. package/dist/remediation/verify.d.ts +38 -0
  57. package/dist/remediation/verify.js +116 -0
  58. package/dist/remediation/verify.js.map +1 -0
  59. package/dist/security/baseline.d.ts +7 -0
  60. package/dist/security/baseline.js +26 -0
  61. package/dist/security/baseline.js.map +1 -0
  62. package/dist/security/config.d.ts +32 -0
  63. package/dist/security/config.js +131 -0
  64. package/dist/security/config.js.map +1 -0
  65. package/dist/security/contracts.d.ts +149 -0
  66. package/dist/security/contracts.js +231 -0
  67. package/dist/security/contracts.js.map +1 -0
  68. package/dist/security/fixRecord.d.ts +231 -0
  69. package/dist/security/fixRecord.js +327 -0
  70. package/dist/security/fixRecord.js.map +1 -0
  71. package/dist/security/fixRecordFile.d.ts +8 -0
  72. package/dist/security/fixRecordFile.js +37 -0
  73. package/dist/security/fixRecordFile.js.map +1 -0
  74. package/dist/security/fixRecordStore.d.ts +23 -0
  75. package/dist/security/fixRecordStore.js +74 -0
  76. package/dist/security/fixRecordStore.js.map +1 -0
  77. package/dist/security/render.d.ts +8 -0
  78. package/dist/security/render.js +20 -0
  79. package/dist/security/render.js.map +1 -0
  80. package/dist/security/suppressions.d.ts +12 -0
  81. package/dist/security/suppressions.js +60 -0
  82. package/dist/security/suppressions.js.map +1 -0
  83. package/dist/security/verifyRun.d.ts +21 -0
  84. package/dist/security/verifyRun.js +74 -0
  85. package/dist/security/verifyRun.js.map +1 -0
  86. package/dist/security/workflow.d.ts +98 -0
  87. package/dist/security/workflow.js +276 -0
  88. package/dist/security/workflow.js.map +1 -0
  89. package/dist/server/routes/remediation.d.ts +19 -0
  90. package/dist/server/routes/remediation.js +90 -18
  91. package/dist/server/routes/remediation.js.map +1 -1
  92. package/dist/tools/runCheck.d.ts +6 -0
  93. package/dist/tools/runCheck.js +1 -1
  94. package/dist/tools/runCheck.js.map +1 -1
  95. package/dist/tools/runSecuritySuite.d.ts +3 -0
  96. package/dist/tools/runSecuritySuite.js +18 -11
  97. package/dist/tools/runSecuritySuite.js.map +1 -1
  98. package/dist/tui/app.js +21 -2
  99. package/dist/tui/app.js.map +1 -1
  100. package/dist/tui/render.js +2 -0
  101. package/dist/tui/render.js.map +1 -1
  102. package/dist/version.d.ts +1 -1
  103. package/dist/version.js +1 -1
  104. package/package.json +17 -10
@@ -0,0 +1,327 @@
1
+ import { canonicalJSON, sha256 } from '../audit/hash.js';
2
+ import { VERSION } from '../version.js';
3
+ import { SECURITY_COVERAGE_STATUSES, SECURITY_SEVERITIES, severityOfFinding, } from './contracts.js';
4
+ /**
5
+ * A Verified Fix Record.
6
+ *
7
+ * Every other tool in this space asks the model that wrote the patch whether
8
+ * the patch is good. This records the opposite arrangement: who proposed the
9
+ * change is metadata, and the verdict rests on exit codes Dvalin observed and a
10
+ * re-scan Dvalin ran. That is what makes the record worth re-deriving, and what
11
+ * lets it describe a repair produced by any agent, or by a person.
12
+ *
13
+ * What it proves is narrow, and the narrowness is the point: *this finding is
14
+ * gone from this scan, and these checks were observed to pass.* It is not a
15
+ * statement that the code is free of vulnerabilities, and nothing in this
16
+ * module may be extended to imply that.
17
+ */
18
+ export const FIX_RECORD_SCHEMA_V1 = 'dvalin-fix-record/v1';
19
+ export const FIX_RECORD_SCHEMA_V2 = 'dvalin-fix-record/v2';
20
+ /**
21
+ * Both are readable; v2 is what new records say.
22
+ *
23
+ * v1 asked one question — "is the target gone, and did the checks pass?" — and
24
+ * left "did this change introduce something new?" to whichever command happened
25
+ * to be producing the record. Two producers answered it differently, so the
26
+ * same record contents meant two different things depending on who wrote them.
27
+ * v2 puts that question, and the threshold used to answer it, inside the record.
28
+ *
29
+ * v1 records keep verifying under v1 rules, permanently. A record that stops
30
+ * re-deriving because the rules moved under it would break the one promise this
31
+ * format makes; a bug in the rules is not a reason to spend that.
32
+ */
33
+ export const SUPPORTED_FIX_RECORD_SCHEMAS = [FIX_RECORD_SCHEMA_V1, FIX_RECORD_SCHEMA_V2];
34
+ /** @deprecated Read `record.schema`; write with `FIX_RECORD_SCHEMA_V2`. */
35
+ export const FIX_RECORD_SCHEMA = FIX_RECORD_SCHEMA_V1;
36
+ export const FIX_EXECUTORS = ['dvalin', 'codex', 'claude-code', 'copilot', 'human', 'unknown'];
37
+ /**
38
+ * What happened, beyond the boolean.
39
+ *
40
+ * `verified` stays a boolean because every consumer already branches on it.
41
+ * This says which of the three ways a repair can fall short actually occurred,
42
+ * so a machine reader does not have to parse `reasons` prose to find out.
43
+ */
44
+ export const FIX_RECORD_OUTCOMES = ['verified', 'target-remains', 'regressed', 'unverifiable'];
45
+ /** Findings from `introduced` that meet or exceed the gate's threshold. */
46
+ export function blockingIntroduced(introduced, gate) {
47
+ if (gate.threshold === 'none')
48
+ return [];
49
+ const limit = SECURITY_SEVERITIES.indexOf(gate.threshold);
50
+ return introduced.filter(finding => SECURITY_SEVERITIES.indexOf(severityOfFinding(finding)) <= limit);
51
+ }
52
+ /**
53
+ * The v1 rule, frozen.
54
+ *
55
+ * Every record ever issued under v1 was hashed with a verdict this function
56
+ * produced, and `verifyFixRecord` re-derives and compares. Changing it would
57
+ * retroactively invalidate all of them, so it does not change — not to fix the
58
+ * gap v2 exists to fix, not for anything. New rules go in a new version.
59
+ */
60
+ export function evaluateFixVerdictV1(input) {
61
+ const reasons = [];
62
+ if (input.remainingTargets.length) {
63
+ reasons.push(`${input.remainingTargets.length} original finding target(s) still present after the re-scan`);
64
+ }
65
+ if (!input.checks.length) {
66
+ // Matches the rule the verifier already applies: a project whose checks
67
+ // cannot be run has not demonstrated anything, so it does not pass by default.
68
+ reasons.push('no project check could be run, so the repair is unverifiable');
69
+ }
70
+ const failed = input.checks.filter(check => !check.passed);
71
+ if (failed.length) {
72
+ reasons.push(`${failed.length} observed check(s) failed: ${failed.map(check => check.kind).join(', ')}`);
73
+ }
74
+ // A caveat, not a failure. Partial coverage does not make a passing check
75
+ // false — it bounds what the record is entitled to claim, and saying so is
76
+ // the difference between evidence and a badge.
77
+ const caveats = [];
78
+ if (input.afterCoverage.status !== 'complete') {
79
+ caveats.push(`the verifying scan's coverage is ${input.afterCoverage.status}, so this record covers only what was scanned`);
80
+ }
81
+ if (input.beforeCoverage.status !== 'complete') {
82
+ caveats.push(`the original scan's coverage was ${input.beforeCoverage.status}`);
83
+ }
84
+ return { verified: reasons.length === 0, reasons: [...reasons, ...caveats] };
85
+ }
86
+ /**
87
+ * The v2 rule: v1, plus the question v1 left to its callers.
88
+ *
89
+ * A repair is a change, and a change does two things — it removes what it was
90
+ * aimed at, and it may add something that was not there. v1 only asked the
91
+ * first. That was survivable while one producer answered the second on the
92
+ * side, and stopped being survivable when a second producer answered it
93
+ * differently.
94
+ *
95
+ * `introduced: null` fails. The alternative is that a producer which does not
96
+ * look gets a better verdict than one which looks and finds something, and a
97
+ * rule that rewards not looking is not a rule.
98
+ */
99
+ export function evaluateFixVerdictV2(input) {
100
+ const base = evaluateFixVerdictV1({
101
+ checks: input.checks,
102
+ remainingTargets: input.remainingTargets,
103
+ beforeCoverage: input.beforeCoverage,
104
+ afterCoverage: input.afterCoverage,
105
+ });
106
+ const reasons = [];
107
+ // Tracked as flags rather than read back out of the prose, so that what
108
+ // blocks a verdict never depends on how a sentence was worded.
109
+ let regressed = false;
110
+ let undetermined = false;
111
+ if (!input.gate) {
112
+ undetermined = true;
113
+ reasons.push('the record carries no gate, so the rule its verdict was reached under cannot be re-derived');
114
+ }
115
+ else if (input.introduced === null || input.introduced === undefined) {
116
+ undetermined = true;
117
+ reasons.push('the verifying scan did not determine whether the repair introduced new findings');
118
+ }
119
+ else {
120
+ const blocking = blockingIntroduced(input.introduced, input.gate);
121
+ if (blocking.length) {
122
+ regressed = true;
123
+ reasons.push(`the repair introduced ${blocking.length} finding(s) at or above ${input.gate.threshold}: ${blocking.map(finding => finding.ruleId).join(', ')}`);
124
+ }
125
+ else if (input.introduced.length) {
126
+ // Below the threshold: recorded, not blocking. Saying so keeps the record
127
+ // from reading as though the change introduced nothing at all.
128
+ reasons.push(`the repair introduced ${input.introduced.length} finding(s) below ${input.gate.threshold}`);
129
+ }
130
+ }
131
+ const verified = base.verified && !regressed && !undetermined;
132
+ const outcome = verified
133
+ ? 'verified'
134
+ : regressed
135
+ ? 'regressed'
136
+ : input.remainingTargets.length
137
+ ? 'target-remains'
138
+ : 'unverifiable';
139
+ return { verified, reasons: [...base.reasons, ...reasons], outcome };
140
+ }
141
+ /**
142
+ * Re-derive a record's verdict under the rules of its own schema version.
143
+ *
144
+ * The single place that decides which rule applies. A caller that picked the
145
+ * rule itself would be back to producers disagreeing about what a record means.
146
+ */
147
+ export function deriveFixVerdict(record) {
148
+ if (record.schema === FIX_RECORD_SCHEMA_V2) {
149
+ return evaluateFixVerdictV2({
150
+ checks: record.checks,
151
+ remainingTargets: record.after.remainingTargets,
152
+ introduced: record.after.introduced,
153
+ gate: record.gate,
154
+ beforeCoverage: record.before.coverage,
155
+ afterCoverage: record.after.coverage,
156
+ });
157
+ }
158
+ return evaluateFixVerdictV1({
159
+ checks: record.checks,
160
+ remainingTargets: record.after.remainingTargets,
161
+ beforeCoverage: record.before.coverage,
162
+ afterCoverage: record.after.coverage,
163
+ });
164
+ }
165
+ export function buildFixRecord(input) {
166
+ const schema = input.regression ? FIX_RECORD_SCHEMA_V2 : FIX_RECORD_SCHEMA_V1;
167
+ const after = input.regression
168
+ ? { ...input.after, introduced: input.regression.introduced }
169
+ : input.after;
170
+ const verdict = deriveFixVerdict({
171
+ schema,
172
+ checks: input.checks,
173
+ before: input.before,
174
+ after,
175
+ gate: input.regression?.gate,
176
+ });
177
+ const record = {
178
+ schema,
179
+ generatedAt: input.generatedAt ?? new Date().toISOString(),
180
+ tool: { name: 'dvalincode', version: input.version ?? VERSION },
181
+ ...(input.workflowId ? { workflowId: input.workflowId } : {}),
182
+ projectId: input.projectId,
183
+ executor: input.executor ?? 'unknown',
184
+ before: input.before,
185
+ after,
186
+ ...(input.regression ? { gate: input.regression.gate } : {}),
187
+ ...(verdict.outcome ? { outcome: verdict.outcome } : {}),
188
+ ...(input.changes ? { changes: input.changes } : {}),
189
+ checks: input.checks,
190
+ assurance: input.checks.length ? 'scan-and-checks' : 'scan-only',
191
+ verdict: { verified: verdict.verified, reasons: verdict.reasons },
192
+ ...(input.audit ? { audit: input.audit } : {}),
193
+ ...(input.policyHash ? { policyHash: input.policyHash } : {}),
194
+ };
195
+ return { ...record, recordHash: fixRecordHash(record) };
196
+ }
197
+ /** Hash of everything except the hash itself, over canonical JSON so key order cannot change it. */
198
+ export function fixRecordHash(record) {
199
+ const { recordHash: _ignored, ...rest } = record;
200
+ return sha256(canonicalJSON(rest));
201
+ }
202
+ /**
203
+ * Re-derive a record offline.
204
+ *
205
+ * Needs no workspace, no network, and no Dvalin state — that is the property
206
+ * that lets a reviewer who trusts none of the above check the record anyway.
207
+ * It answers "is this record internally sound and unmodified", not "is the
208
+ * repair still good"; re-running the scanners is a separate, explicit step.
209
+ */
210
+ export function verifyFixRecord(value) {
211
+ if (!isFixRecordShape(value)) {
212
+ return { ok: false, reasons: ['Not a Dvalin fix record, or written by an unsupported schema version.'] };
213
+ }
214
+ const record = value;
215
+ const reasons = [];
216
+ const expected = fixRecordHash(record);
217
+ if (expected !== record.recordHash) {
218
+ reasons.push(`recordHash mismatch: the record has been modified since it was issued (expected ${expected}, found ${record.recordHash})`);
219
+ }
220
+ // The verdict is derived, so a record whose stored verdict disagrees with its
221
+ // own evidence has been edited in a way the hash alone would catch only if
222
+ // the hash were left stale. Recomputing it closes that door.
223
+ //
224
+ // Under the rules of the record's own schema version, never the newest ones:
225
+ // a v1 record re-derives to what v1 said, permanently.
226
+ const derived = deriveFixVerdict(record);
227
+ if (derived.verified !== record.verdict.verified) {
228
+ reasons.push(`verdict does not follow from the record's own evidence: stored ${record.verdict.verified}, derived ${derived.verified}`);
229
+ }
230
+ if (derived.outcome && record.outcome && derived.outcome !== record.outcome) {
231
+ reasons.push(`outcome does not follow from the record's own evidence: stored ${record.outcome}, derived ${derived.outcome}`);
232
+ }
233
+ const expectedAssurance = record.checks.length ? 'scan-and-checks' : 'scan-only';
234
+ if (record.assurance !== expectedAssurance) {
235
+ reasons.push(`assurance says ${record.assurance} but the record carries ${record.checks.length} check(s)`);
236
+ }
237
+ return { ok: reasons.length === 0, reasons, record };
238
+ }
239
+ /** One-line summary for a terminal or a pull-request comment. */
240
+ export function renderFixRecord(record) {
241
+ const lines = [
242
+ `Fix record ${record.recordHash.slice(0, 12)} · ${record.verdict.verified ? 'VERIFIED' : 'NOT VERIFIED'} · ${record.assurance}`,
243
+ ` executor: ${record.executor} (recorded, not consulted)`,
244
+ ` targets: ${record.before.targets.length} before · ${record.after.remainingTargets.length} remaining`,
245
+ ` coverage: ${record.before.coverage.status} → ${record.after.coverage.status}`,
246
+ ];
247
+ if (record.schema === FIX_RECORD_SCHEMA_V2) {
248
+ const introduced = record.after.introduced;
249
+ lines.push(` introduced: ${introduced === null || introduced === undefined ? 'not determined' : `${introduced.length}`}`
250
+ + (record.gate ? ` (gate ${record.gate.threshold}/${record.gate.mode})` : ''));
251
+ if (record.outcome)
252
+ lines.push(` outcome: ${record.outcome}`);
253
+ }
254
+ else {
255
+ // Not a caveat about this repair — a caveat about the rules it was judged
256
+ // under. A reader comparing a v1 and a v2 record must not read them as
257
+ // having answered the same question.
258
+ lines.push(' note: issued under v1 rules — whether the repair introduced new findings was not evaluated');
259
+ }
260
+ for (const check of record.checks) {
261
+ lines.push(` ${check.passed ? '✓' : '✗'} ${check.kind}: ${check.command}${check.exitCode === null ? '' : ` (exit ${check.exitCode})`}`);
262
+ }
263
+ for (const reason of record.verdict.reasons)
264
+ lines.push(` · ${reason}`);
265
+ if (record.audit)
266
+ lines.push(` audit: run ${record.audit.runId} @ ${record.audit.headHash.slice(0, 12)}`);
267
+ return lines.join('\n');
268
+ }
269
+ function isFixRecordShape(value) {
270
+ if (!value || typeof value !== 'object' || Array.isArray(value))
271
+ return false;
272
+ const record = value;
273
+ if (!SUPPORTED_FIX_RECORD_SCHEMAS.includes(record.schema))
274
+ return false;
275
+ if (record.schema === FIX_RECORD_SCHEMA_V2 && !isV2Shape(record))
276
+ return false;
277
+ return typeof record.generatedAt === 'string'
278
+ && typeof record.projectId === 'string'
279
+ && typeof record.recordHash === 'string'
280
+ && (record.assurance === 'scan-only' || record.assurance === 'scan-and-checks')
281
+ && FIX_EXECUTORS.includes(record.executor)
282
+ && Array.isArray(record.checks)
283
+ && isVerdict(record.verdict)
284
+ && isScanSide(record.before, 'targets')
285
+ && isScanSide(record.after, 'remainingTargets');
286
+ }
287
+ /**
288
+ * The fields v2 adds, required because v2's rule cannot be re-derived without
289
+ * them. A v2 record missing them is malformed, not merely undetermined — the
290
+ * `null` that means "not determined" has to be written down deliberately.
291
+ */
292
+ function isV2Shape(record) {
293
+ const after = record.after;
294
+ if (!after)
295
+ return false;
296
+ const introduced = after.introduced;
297
+ if (introduced !== null && !Array.isArray(introduced))
298
+ return false;
299
+ const gate = record.gate;
300
+ if (!gate)
301
+ return false;
302
+ const thresholdOk = gate.threshold === 'none'
303
+ || SECURITY_SEVERITIES.includes(gate.threshold);
304
+ if (!thresholdOk)
305
+ return false;
306
+ if (gate.mode !== 'all' && gate.mode !== 'new')
307
+ return false;
308
+ return record.outcome === undefined || FIX_RECORD_OUTCOMES.includes(record.outcome);
309
+ }
310
+ function isVerdict(value) {
311
+ if (!value || typeof value !== 'object')
312
+ return false;
313
+ const verdict = value;
314
+ return typeof verdict.verified === 'boolean' && Array.isArray(verdict.reasons);
315
+ }
316
+ function isScanSide(value, findingsKey) {
317
+ if (!value || typeof value !== 'object')
318
+ return false;
319
+ const side = value;
320
+ const coverage = side.coverage;
321
+ return typeof side.scanId === 'string'
322
+ && typeof side.completedAt === 'string'
323
+ && !!coverage
324
+ && SECURITY_COVERAGE_STATUSES.includes(coverage.status)
325
+ && Array.isArray(side[findingsKey]);
326
+ }
327
+ //# sourceMappingURL=fixRecord.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fixRecord.js","sourceRoot":"","sources":["../../src/security/fixRecord.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EACL,0BAA0B,EAC1B,mBAAmB,EACnB,iBAAiB,GAKlB,MAAM,gBAAgB,CAAC;AAGxB;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,sBAAsB,CAAC;AAC3D,MAAM,CAAC,MAAM,oBAAoB,GAAG,sBAAsB,CAAC;AAE3D;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC,oBAAoB,EAAE,oBAAoB,CAAU,CAAC;AAGlG,2EAA2E;AAC3E,MAAM,CAAC,MAAM,iBAAiB,GAAG,oBAAoB,CAAC;AAEtD,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,QAAQ,EAAE,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,CAAU,CAAC;AAWxG;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,UAAU,EAAE,gBAAgB,EAAE,WAAW,EAAE,cAAc,CAAU,CAAC;AAgFxG,2EAA2E;AAC3E,MAAM,UAAU,kBAAkB,CAChC,UAAqC,EACrC,IAAmB;IAEnB,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AAK,MAAM;WACxC,mBAAmB,CAAC,QAAQ,CAAC,IAAI,CAAC,SAA+C,CAAC,CAAC;IACxF,IAAI,CAAC,WAAW;QAAE,OAAO,KAAK,CAAC;IAC/B,IAAI,IAAI,CAAC,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,IAAI,KAAK,KAAK;QAAE,OAAO,KAAK,CAAC;IAE7D,OAAO,MAAM,CAAC,OAAO,KAAK,SAAS,IAAI,mBAAmB,CAAC,QAAQ,CAAC,MAAM,CAAC,OAA2B,CAAC,CAAC;AAC1G,CAAC;AAED,SAAS,SAAS,CAAC,KAAc;IAC/B,IAAI,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAC;IACtD,MAAM,OAAO,GAAG,KAAgC,CAAC;IACjD,OAAO,OAAO,OAAO,CAAC,QAAQ,KAAK,SAAS,IAAI,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;AACjF,CAAC;AAED,SAAS,UAAU,CAAC,KAAc,EAAE,WAA2C;IAC7E,IAAI,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAC;IACtD,MAAM,IAAI,GAAG,KAAgC,CAAC;IAC9C,MAAM,QAAQ,GAAG,IAAI,CAAC,QAA+C,CAAC;IACtE,OAAO,OAAO,IAAI,CAAC,MAAM,KAAK,QAAQ;WACjC,OAAO,IAAI,CAAC,WAAW,KAAK,QAAQ;WACpC,CAAC,CAAC,QAAQ;WACV,0BAA0B,CAAC,QAAQ,CAAC,QAAQ,CAAC,MAAoC,CAAC;WAClF,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;AACxC,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { type FixRecordVerification } from './fixRecord.js';
2
+ export type FixRecordFileVerification = FixRecordVerification & {
3
+ path: string;
4
+ };
5
+ /** Load and re-derive a fix record without consulting a workspace or network. */
6
+ export declare function verifyFixRecordFile(recordPath: string, cwd?: string): Promise<FixRecordFileVerification>;
7
+ /** Human-readable verification output shared by the CLI and interactive TUI. */
8
+ export declare function renderFixRecordVerification(check: FixRecordVerification): string;
@@ -0,0 +1,37 @@
1
+ import { readFile } from 'node:fs/promises';
2
+ import path from 'node:path';
3
+ import { UsageError } from '../core/exitCodes.js';
4
+ import { renderFixRecord, verifyFixRecord, } from './fixRecord.js';
5
+ /** Load and re-derive a fix record without consulting a workspace or network. */
6
+ export async function verifyFixRecordFile(recordPath, cwd = process.cwd()) {
7
+ const target = path.resolve(cwd, recordPath);
8
+ let parsed;
9
+ try {
10
+ parsed = JSON.parse(await readFile(target, 'utf8'));
11
+ }
12
+ catch (error) {
13
+ throw new UsageError(`Cannot read fix record ${target}: ${error instanceof Error ? error.message : String(error)}`);
14
+ }
15
+ return { path: target, ...verifyFixRecord(parsed) };
16
+ }
17
+ /** Human-readable verification output shared by the CLI and interactive TUI. */
18
+ export function renderFixRecordVerification(check) {
19
+ if (!check.record)
20
+ throw new UsageError('Not a Dvalin fix record.');
21
+ if (check.ok) {
22
+ const meaning = check.record.verdict.verified
23
+ ? 'It attests that these findings were gone and these checks were observed to pass. It is not a claim that the code is free of vulnerabilities.'
24
+ : 'Its NOT VERIFIED verdict and caveats are intact; this record does not attest that the repair passed verification.';
25
+ return [
26
+ renderFixRecord(check.record),
27
+ '',
28
+ 'Re-derived successfully: this record is unmodified and its verdict follows from its own evidence.',
29
+ meaning,
30
+ ].join('\n');
31
+ }
32
+ return [
33
+ 'This fix record did not re-derive:',
34
+ ...check.reasons.map(reason => ` · ${reason}`),
35
+ ].join('\n');
36
+ }
37
+ //# sourceMappingURL=fixRecordFile.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fixRecordFile.js","sourceRoot":"","sources":["../../src/security/fixRecordFile.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,IAAI,MAAM,WAA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CAAoC;QACpC,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,OAAO,MAAM,EAAE,CAAC;KAChD,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC"}
@@ -0,0 +1,23 @@
1
+ import { type VerifiedFixRecord } from './fixRecord.js';
2
+ /**
3
+ * Where issued fix records accumulate.
4
+ *
5
+ * Kept beside the audit log rather than inside a workflow, because a record
6
+ * outlives the workflow that produced it and is the thing a reviewer wants to
7
+ * collect. Writes never throw into a verification: failing to file a record is
8
+ * not a reason to fail the repair it describes.
9
+ */
10
+ export declare function defaultFixRecordDir(): string;
11
+ /** Persist a record under its own hash, so filing the same one twice is a no-op. */
12
+ export declare function saveFixRecord(record: VerifiedFixRecord, dir?: string): string | null;
13
+ /**
14
+ * Records that still re-derive, newest first, optionally narrowed to one project.
15
+ *
16
+ * A record that no longer verifies is skipped rather than surfaced: an Evidence
17
+ * Pack that carried one would be asserting something it cannot support, and the
18
+ * pack's own verification would reject it anyway.
19
+ */
20
+ export declare function listFixRecords(dir?: string, options?: {
21
+ limit?: number;
22
+ projectId?: string;
23
+ }): VerifiedFixRecord[];
@@ -0,0 +1,74 @@
1
+ import { existsSync, mkdirSync, readdirSync, readFileSync, renameSync, writeFileSync } from 'node:fs';
2
+ import os from 'node:os';
3
+ import path from 'node:path';
4
+ import { randomUUID } from 'node:crypto';
5
+ import { verifyFixRecord } from './fixRecord.js';
6
+ /**
7
+ * Where issued fix records accumulate.
8
+ *
9
+ * Kept beside the audit log rather than inside a workflow, because a record
10
+ * outlives the workflow that produced it and is the thing a reviewer wants to
11
+ * collect. Writes never throw into a verification: failing to file a record is
12
+ * not a reason to fail the repair it describes.
13
+ */
14
+ export function defaultFixRecordDir() {
15
+ return process.env.DVALINCODE_FIX_RECORD_DIR
16
+ ?? path.join(os.homedir(), '.dvalincode', 'security', 'fix-records');
17
+ }
18
+ /** Persist a record under its own hash, so filing the same one twice is a no-op. */
19
+ export function saveFixRecord(record, dir = defaultFixRecordDir()) {
20
+ const target = path.join(dir, `${record.recordHash}.json`);
21
+ try {
22
+ mkdirSync(dir, { recursive: true });
23
+ if (existsSync(target))
24
+ return target;
25
+ const temporary = `${target}.${process.pid}.${randomUUID().slice(0, 8)}.tmp`;
26
+ writeFileSync(temporary, `${JSON.stringify(record, null, 2)}\n`, { encoding: 'utf8', mode: 0o600 });
27
+ renameSync(temporary, target);
28
+ return target;
29
+ }
30
+ catch {
31
+ return null;
32
+ }
33
+ }
34
+ /**
35
+ * Records that still re-derive, newest first, optionally narrowed to one project.
36
+ *
37
+ * A record that no longer verifies is skipped rather than surfaced: an Evidence
38
+ * Pack that carried one would be asserting something it cannot support, and the
39
+ * pack's own verification would reject it anyway.
40
+ */
41
+ export function listFixRecords(dir = defaultFixRecordDir(), options = {}) {
42
+ const limit = options.limit ?? 50;
43
+ if (!existsSync(dir))
44
+ return [];
45
+ let names;
46
+ try {
47
+ names = readdirSync(dir).filter(name => name.endsWith('.json'));
48
+ }
49
+ catch {
50
+ return [];
51
+ }
52
+ const records = [];
53
+ for (const name of names) {
54
+ try {
55
+ const parsed = JSON.parse(readFileSync(path.join(dir, name), 'utf8'));
56
+ const check = verifyFixRecord(parsed);
57
+ if (!check.ok || !check.record)
58
+ continue;
59
+ // The store is install-global; a record from another repository is
60
+ // someone else's file paths and rule ids, and does not belong in this
61
+ // project's evidence.
62
+ if (options.projectId && check.record.projectId !== options.projectId)
63
+ continue;
64
+ records.push(check.record);
65
+ }
66
+ catch {
67
+ // An unreadable file is not evidence; leave it out rather than guess.
68
+ }
69
+ }
70
+ return records
71
+ .sort((a, b) => b.generatedAt.localeCompare(a.generatedAt))
72
+ .slice(0, limit);
73
+ }
74
+ //# sourceMappingURL=fixRecordStore.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fixRecordStore.js","sourceRoot":"","sources":["../../src/security/fixRecordStore.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,S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Aa,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC;SAC1D,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;AACrB,CAAC"}
@@ -0,0 +1,8 @@
1
+ import type { SecurityCoverage, SecurityGateResult } from './contracts.js';
2
+ /**
3
+ * State the coverage next to the verdict, always. A gate result read without it
4
+ * says more than the scan knows.
5
+ */
6
+ export declare function renderCoverage(coverage: SecurityCoverage): string;
7
+ /** `none` is an advisory policy, not a security pass. */
8
+ export declare function renderSecurityGate(gate: SecurityGateResult): string;
@@ -0,0 +1,20 @@
1
+ /**
2
+ * State the coverage next to the verdict, always. A gate result read without it
3
+ * says more than the scan knows.
4
+ */
5
+ export function renderCoverage(coverage) {
6
+ const lines = [`Coverage: ${coverage.status}`];
7
+ for (const entry of coverage.deferred)
8
+ lines.push(` · deferred: ${entry}`);
9
+ for (const entry of coverage.exclusions)
10
+ lines.push(` · excluded: ${entry}`);
11
+ for (const note of coverage.notes)
12
+ lines.push(` · ${note}`);
13
+ return lines.join('\n');
14
+ }
15
+ /** `none` is an advisory policy, not a security pass. */
16
+ export function renderSecurityGate(gate) {
17
+ const status = gate.threshold === 'none' ? 'ADVISORY' : gate.passed ? 'PASS' : 'FAIL';
18
+ return `Gate: ${status} · ${gate.mode} findings · threshold ${gate.threshold}`;
19
+ }
20
+ //# sourceMappingURL=render.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"render.js","sourceRoot":"","sources":["../../src/security/render.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,MAAM,UAAU,cAAc,CAAC,QAA0B;IACvD,MAAM,KAAK,GAAG,CAAC,aAAa,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC;IAC/C,KAAK,MAAM,KAAK,IAAI,QAAQ,CAAC,QAAQ;QAAE,KAAK,CAAC,IAAI,CAAC,iBAAiB,KAAK,EAAE,CAAC,CAAC;IAC5E,KAAK,MAAM,KAAK,IAAI,QAAQ,CAAC,UAAU;QAAE,KAAK,CAAC,IAAI,CAAC,iBAAiB,KAAK,EAAE,CAAC,CAAC;IAC9E,KAAK,MAAM,IAAI,IAAI,QAAQ,CAAC,KAAK;QAAE,KAAK,CAAC,IAAI,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC;IAC7D,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC;AAED,yDAAyD;AACzD,MAAM,UAAU,kBAAkB,CAAC,IAAwB;IACzD,MAAM,MAAM,GAAG,IAAI,CAAC,SAAS,KAAK,MAAM,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC;IACtF,OAAO,SAAS,MAAM,MAAM,IAAI,CAAC,IAAI,yBAAyB,IAAI,CAAC,SAAS,EAAE,CAAC;AACjF,CAAC"}
@@ -0,0 +1,12 @@
1
+ import type { RemediationFinding } from '../remediation/sarif.js';
2
+ import type { DvalinScanSuiteResult } from '../remediation/scannerSuite.js';
3
+ import type { SecuritySuppression } from './config.js';
4
+ export type SuppressionResult = {
5
+ result: DvalinScanSuiteResult;
6
+ suppressed: Array<{
7
+ finding: RemediationFinding;
8
+ suppression: SecuritySuppression;
9
+ }>;
10
+ expired: SecuritySuppression[];
11
+ };
12
+ export declare function applySecuritySuppressions(result: DvalinScanSuiteResult, suppressions: SecuritySuppression[], now?: Date): SuppressionResult;
@@ -0,0 +1,60 @@
1
+ import { findingFingerprint } from './contracts.js';
2
+ export function applySecuritySuppressions(result, suppressions, now = new Date()) {
3
+ const expired = suppressions.filter(suppression => suppression.expiresAt && Date.parse(suppression.expiresAt) <= now.getTime());
4
+ const active = suppressions.filter(suppression => !expired.includes(suppression));
5
+ const suppressed = [];
6
+ const findings = result.findings.filter(finding => {
7
+ const fingerprint = findingFingerprint(finding);
8
+ const match = active.find(suppression => (suppression.fingerprint === fingerprint || (!suppression.fingerprint && suppression.ruleId === finding.ruleId))
9
+ && (!suppression.path || normalizePath(suppression.path) === normalizePath(finding.path)));
10
+ if (!match)
11
+ return true;
12
+ suppressed.push({ finding, suppression: match });
13
+ return false;
14
+ });
15
+ return {
16
+ result: { ...result, findings, metrics: metricsFor(findings), score: scoreFor(findings), grade: gradeFor(scoreFor(findings)) },
17
+ suppressed,
18
+ expired,
19
+ };
20
+ }
21
+ function metricsFor(findings) {
22
+ const metrics = { critical: 0, high: 0, medium: 0, low: 0, files: 0, rules: 0 };
23
+ const files = new Set();
24
+ const rules = new Set();
25
+ for (const finding of findings) {
26
+ const score = Number.parseFloat(finding.securitySeverity ?? '');
27
+ if (score >= 9)
28
+ metrics.critical++;
29
+ else if (finding.severity === 'error' || score >= 7)
30
+ metrics.high++;
31
+ else if (finding.severity === 'warning' || score >= 4)
32
+ metrics.medium++;
33
+ else
34
+ metrics.low++;
35
+ files.add(finding.path);
36
+ rules.add(`${finding.source}:${finding.ruleId}`);
37
+ }
38
+ metrics.files = files.size;
39
+ metrics.rules = rules.size;
40
+ return metrics;
41
+ }
42
+ function scoreFor(findings) {
43
+ const metrics = metricsFor(findings);
44
+ return Math.max(0, 100 - metrics.critical * 22 - metrics.high * 12 - metrics.medium * 5 - metrics.low);
45
+ }
46
+ function gradeFor(score) {
47
+ if (score >= 90)
48
+ return 'A';
49
+ if (score >= 80)
50
+ return 'B';
51
+ if (score >= 70)
52
+ return 'C';
53
+ if (score >= 60)
54
+ return 'D';
55
+ return 'F';
56
+ }
57
+ function normalizePath(filePath) {
58
+ return filePath.replace(/\\/g, '/').replace(/^\.\//, '');
59
+ }
60
+ //# sourceMappingURL=suppressions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"suppressions.js","sourceRoot":"","sources":["../../src/security/suppressions.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAQpD,MAAM,UAAU,yBAAyB,CACvC,MAA6B,EAC7B,YAAmC,EACnC,GAAG,GAAG,IAAI,IAAI,EAAE;I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AC,GAAG,CAAC,CAAC,EAAE,GAAG,GAAG,OAAO,CAAC,QAAQ,GAAG,EAAE,GAAG,OAAO,CAAC,IAAI,GAAG,EAAE,GAAG,OAAO,CAAC,MAAM,GAAG,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;AACzG,CAAC;AAED,SAAS,QAAQ,CAAC,KAAa;IAC7B,IAAI,KAAK,IAAI,EAAE;QAAE,OAAO,GAAG,CAAC;IAC5B,IAAI,KAAK,IAAI,EAAE;QAAE,OAAO,GAAG,CAAC;IAC5B,IAAI,KAAK,IAAI,EAAE;QAAE,OAAO,GAAG,CAAC;IAC5B,IAAI,KAAK,IAAI,EAAE;QAAE,OAAO,GAAG,CAAC;IAC5B,OAAO,GAAG,CAAC;AACb,CAAC;AAED,SAAS,aAAa,CAAC,QAAgB;IACrC,OAAO,QAAQ,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;AAC3D,CAAC"}
@@ -0,0 +1,21 @@
1
+ import { runDvalinScanSuite } from '../remediation/scannerSuite.js';
2
+ import type { DvalinSecurityConfig } from './config.js';
3
+ import type { FixExecutor } from './fixRecord.js';
4
+ import { type SecurityWorkflow } from './workflow.js';
5
+ /**
6
+ * The one verification path.
7
+ *
8
+ * Every surface that verifies a repair — this command, the `--fix --verify`
9
+ * pipeline, and the MCP server — comes through here, so "verified" means the
10
+ * same thing regardless of who asked. Dvalin re-scans, Dvalin runs the checks,
11
+ * and the record is issued from what Dvalin observed.
12
+ */
13
+ export declare function runWorkflowVerification(input: {
14
+ workflow: SecurityWorkflow;
15
+ checks: DvalinSecurityConfig['checks'];
16
+ timeoutMs?: number;
17
+ executor?: FixExecutor;
18
+ verifyCommands?: string[];
19
+ /** Dependency seam used by MCP hosts and deterministic contract tests. */
20
+ runScan?: (cwd: string, options: NonNullable<Parameters<typeof runDvalinScanSuite>[1]>) => ReturnType<typeof runDvalinScanSuite>;
21
+ }): Promise<SecurityWorkflow>;