hex-audit 0.4.4 → 0.5.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.
- package/DEMO.md +14 -12
- package/README.md +66 -61
- package/dashboard/.next/BUILD_ID +1 -1
- package/dashboard/.next/app-build-manifest.json +18 -11
- package/dashboard/.next/app-path-routes-manifest.json +1 -1
- package/dashboard/.next/build-manifest.json +4 -4
- package/dashboard/.next/next-server.js.nft.json +1 -1
- package/dashboard/.next/prerender-manifest.js +1 -1
- package/dashboard/.next/prerender-manifest.json +1 -1
- package/dashboard/.next/required-server-files.json +1 -1
- package/dashboard/.next/routes-manifest.json +1 -1
- package/dashboard/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/dashboard/.next/server/app/_not-found.html +1 -1
- package/dashboard/.next/server/app/_not-found.rsc +4 -4
- package/dashboard/.next/server/app/access/page_client-reference-manifest.js +1 -1
- package/dashboard/.next/server/app/api/flows/route.js +1 -1
- package/dashboard/.next/server/app/api/issues/[id]/move/route.js +1 -1
- package/dashboard/.next/server/app/api/issues/[id]/route.js +1 -1
- package/dashboard/.next/server/app/calls/page_client-reference-manifest.js +1 -1
- package/dashboard/.next/server/app/conformance/page_client-reference-manifest.js +1 -1
- package/dashboard/.next/server/app/diagram/page_client-reference-manifest.js +1 -1
- package/dashboard/.next/server/app/diagram.html +1 -1
- package/dashboard/.next/server/app/diagram.rsc +4 -4
- package/dashboard/.next/server/app/flows/page_client-reference-manifest.js +1 -1
- package/dashboard/.next/server/app/flows.html +1 -1
- package/dashboard/.next/server/app/flows.rsc +4 -4
- package/dashboard/.next/server/app/functions/page_client-reference-manifest.js +1 -1
- package/dashboard/.next/server/app/issues/page.js +12 -1
- package/dashboard/.next/server/app/issues/page_client-reference-manifest.js +1 -1
- package/dashboard/.next/server/app/overleaf/page.js +1 -0
- package/dashboard/.next/server/app/overleaf/page.js.nft.json +1 -0
- package/dashboard/.next/server/app/overleaf/page_client-reference-manifest.js +1 -0
- package/dashboard/.next/server/app/page_client-reference-manifest.js +1 -1
- package/dashboard/.next/server/app/progress/page_client-reference-manifest.js +1 -1
- package/dashboard/.next/server/app/stats/page_client-reference-manifest.js +1 -1
- package/dashboard/.next/server/app-paths-manifest.json +9 -8
- package/dashboard/.next/server/chunks/431.js +1 -1
- package/dashboard/.next/server/functions-config-manifest.json +1 -1
- package/dashboard/.next/server/middleware-build-manifest.js +1 -1
- package/dashboard/.next/server/pages/404.html +1 -1
- package/dashboard/.next/server/pages/500.html +1 -1
- package/dashboard/.next/server/server-reference-manifest.js +1 -1
- package/dashboard/.next/server/server-reference-manifest.json +1 -1
- package/dashboard/.next/static/chunks/app/issues/page-2bb52a36f20497fe.js +1 -0
- package/dashboard/.next/static/chunks/app/{layout-527d8aa86e483fbd.js → layout-9c3c84993dd895f6.js} +1 -1
- package/dashboard/.next/static/chunks/app/overleaf/page-bcea12a80c97b92f.js +1 -0
- package/dashboard/.next/static/chunks/{main-70c6d841ad572657.js → main-8f1e837090aef5cf.js} +1 -1
- package/dashboard/.next/static/css/9c84313d0484b74f.css +3 -0
- package/dashboard/app/api/flows/route.ts +4 -0
- package/dashboard/app/api/issues/[id]/move/route.ts +29 -58
- package/dashboard/app/api/issues/[id]/route.ts +11 -102
- package/dashboard/app/issues/IssuesBoardClient.tsx +155 -50
- package/dashboard/app/issues/page.tsx +40 -3
- package/dashboard/app/overleaf/OverleafClient.tsx +97 -0
- package/dashboard/app/overleaf/page.tsx +32 -0
- package/dashboard/components/DashboardLayout.tsx +8 -2
- package/dashboard/lib/finding-markdown.ts +110 -0
- package/dashboard/next.config.mjs +4 -0
- package/dist/analysis/external-calls.d.ts +8 -1
- package/dist/analysis/external-calls.d.ts.map +1 -1
- package/dist/analysis/external-calls.js +57 -13
- package/dist/analysis/external-calls.js.map +1 -1
- package/dist/commands/calls.d.ts.map +1 -1
- package/dist/commands/calls.js +15 -6
- package/dist/commands/calls.js.map +1 -1
- package/dist/commands/dashboard.d.ts.map +1 -1
- package/dist/commands/dashboard.js +12 -3
- package/dist/commands/dashboard.js.map +1 -1
- package/dist/commands/init.js +19 -19
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/issue.d.ts +3 -0
- package/dist/commands/issue.d.ts.map +1 -0
- package/dist/commands/issue.js +195 -0
- package/dist/commands/issue.js.map +1 -0
- package/dist/core/config.d.ts +1 -0
- package/dist/core/config.d.ts.map +1 -1
- package/dist/core/config.js +10 -0
- package/dist/core/config.js.map +1 -1
- package/dist/core/issues.d.ts +116 -0
- package/dist/core/issues.d.ts.map +1 -0
- package/dist/core/issues.js +403 -0
- package/dist/core/issues.js.map +1 -0
- package/dist/core/schema.d.ts +24 -8
- package/dist/core/schema.d.ts.map +1 -1
- package/dist/core/schema.js +12 -1
- package/dist/core/schema.js.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/skills/generate-overleaf.md +18 -10
- package/dist/skills/ingest-aa-report.md +15 -19
- package/dist/skills/init-audit.md +13 -18
- package/dist/skills/sync-issues.md +86 -195
- package/dist/skills/validate-all-findings.md +50 -0
- package/dist/skills/validate-issue.md +20 -10
- package/dist/skills/write-finding.md +23 -28
- package/package.json +1 -1
- package/dashboard/.next/server/app/api/flows.body +0 -1
- package/dashboard/.next/server/app/api/flows.meta +0 -1
- package/dashboard/.next/static/chunks/app/issues/page-dc110d4cc0a5c398.js +0 -1
- package/dashboard/.next/static/css/7a38e5062ba6d403.css +0 -3
- /package/dashboard/.next/static/{ePObaFrrwft0BlvlllUMo → NrFPHIFHWQ5jNF62Px_X8}/_buildManifest.js +0 -0
- /package/dashboard/.next/static/{ePObaFrrwft0BlvlllUMo → NrFPHIFHWQ5jNF62Px_X8}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,403 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Canonical issue-mutation logic, shared by the `hex issue` CLI command and the
|
|
3
|
+
* dashboard's PATCH/move API routes. Pure: depends only on node:fs / node:path
|
|
4
|
+
* and is parameterized by `outputDir` (the project's `.hex/` directory) so it
|
|
5
|
+
* can run from the CLI (resolves outputDir via config) or from the dashboard
|
|
6
|
+
* server runtime (resolves outputDir via process.cwd()).
|
|
7
|
+
*
|
|
8
|
+
* The single source of truth for: materializing a findings.json entry from a
|
|
9
|
+
* source-specific record (conformance / auditagent / github), routing edits
|
|
10
|
+
* between findings.json and tracking.json, and column→status mapping.
|
|
11
|
+
*
|
|
12
|
+
* Deliberately NOT imported across the src/ <-> dashboard/ tree boundary as a
|
|
13
|
+
* dependency chain: it pulls in nothing beyond node builtins, so the dashboard
|
|
14
|
+
* can import it via `experimental.externalDir` without dragging CLI deps
|
|
15
|
+
* (chalk/ora/zod) into the Next.js bundle.
|
|
16
|
+
*/
|
|
17
|
+
import fs from 'node:fs';
|
|
18
|
+
import path from 'node:path';
|
|
19
|
+
export const SEVERITY_VALUES = ['Critical', 'High', 'Medium', 'Low', 'Info'];
|
|
20
|
+
export const RESOLUTION_VALUES = [
|
|
21
|
+
'Fixed',
|
|
22
|
+
'Mitigated',
|
|
23
|
+
'Acknowledged',
|
|
24
|
+
'Not Fixed',
|
|
25
|
+
'Unresolved',
|
|
26
|
+
];
|
|
27
|
+
export const COLUMN_TO_STATUS = {
|
|
28
|
+
potential: 'pending_validation',
|
|
29
|
+
verified: 'verified',
|
|
30
|
+
invalid: 'rejected',
|
|
31
|
+
duplicate: 'duplicate',
|
|
32
|
+
};
|
|
33
|
+
/** Fields a user may edit through the board modal or `hex issue patch`. */
|
|
34
|
+
export const EDITABLE_FIELDS = [
|
|
35
|
+
'title',
|
|
36
|
+
'severity',
|
|
37
|
+
'description',
|
|
38
|
+
'recommendation',
|
|
39
|
+
'resolution',
|
|
40
|
+
'update_from_client',
|
|
41
|
+
'notes',
|
|
42
|
+
];
|
|
43
|
+
// ─── Low-level IO (atomic, JSON) ────────────────────────────────────
|
|
44
|
+
function readJson(file) {
|
|
45
|
+
try {
|
|
46
|
+
return JSON.parse(fs.readFileSync(file, 'utf-8'));
|
|
47
|
+
}
|
|
48
|
+
catch {
|
|
49
|
+
return null;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
function writeJson(file, data) {
|
|
53
|
+
const dir = path.dirname(file);
|
|
54
|
+
if (!fs.existsSync(dir))
|
|
55
|
+
fs.mkdirSync(dir, { recursive: true });
|
|
56
|
+
const tmp = file + '.tmp';
|
|
57
|
+
fs.writeFileSync(tmp, JSON.stringify(data, null, 2) + '\n', 'utf-8');
|
|
58
|
+
fs.renameSync(tmp, file);
|
|
59
|
+
}
|
|
60
|
+
function loadFindings(outputDir) {
|
|
61
|
+
return readJson(path.join(outputDir, 'findings.json')) ?? { findings: [] };
|
|
62
|
+
}
|
|
63
|
+
function loadTracking(outputDir) {
|
|
64
|
+
return readJson(path.join(outputDir, 'tracking.json')) ?? { findings: [] };
|
|
65
|
+
}
|
|
66
|
+
// ─── Validation ─────────────────────────────────────────────────────
|
|
67
|
+
export function isValidSeverity(v) {
|
|
68
|
+
return typeof v === 'string' && SEVERITY_VALUES.includes(v);
|
|
69
|
+
}
|
|
70
|
+
export function isValidResolution(v) {
|
|
71
|
+
return typeof v === 'string' && RESOLUTION_VALUES.includes(v);
|
|
72
|
+
}
|
|
73
|
+
// ─── ID allocation ──────────────────────────────────────────────────
|
|
74
|
+
/**
|
|
75
|
+
* Allocate the next uniform issue id (`H-001`, `H-002`, ...). Scans both
|
|
76
|
+
* findings.json and tracking.json for the highest `H-<n>` so every creator
|
|
77
|
+
* (init-audit conformance materialization, write-finding, ingest-aa-report,
|
|
78
|
+
* sync-issues pull) agrees on a single sequential namespace.
|
|
79
|
+
*/
|
|
80
|
+
export function allocateId(outputDir) {
|
|
81
|
+
let max = 0;
|
|
82
|
+
const scan = (id) => {
|
|
83
|
+
const m = /^H-(\d+)$/.exec(id);
|
|
84
|
+
if (m)
|
|
85
|
+
max = Math.max(max, parseInt(m[1], 10));
|
|
86
|
+
};
|
|
87
|
+
for (const f of loadFindings(outputDir).findings)
|
|
88
|
+
scan(f.id);
|
|
89
|
+
for (const t of loadTracking(outputDir).findings)
|
|
90
|
+
scan(t.id);
|
|
91
|
+
return `H-${String(max + 1).padStart(3, '0')}`;
|
|
92
|
+
}
|
|
93
|
+
// ─── Source-specific materialization ────────────────────────────────
|
|
94
|
+
function newEmptyFinding(id, severity) {
|
|
95
|
+
return {
|
|
96
|
+
id,
|
|
97
|
+
title: id,
|
|
98
|
+
severity,
|
|
99
|
+
category: '',
|
|
100
|
+
description: '',
|
|
101
|
+
root_cause: { locations: [] },
|
|
102
|
+
poc: { status: 'not_started', file: null, validation_memo: null },
|
|
103
|
+
recommendation: '',
|
|
104
|
+
references: { external_links: [] },
|
|
105
|
+
created_at: new Date().toISOString(),
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
/** Build a findings.json record from a conformance item, keyed by source_ref. */
|
|
109
|
+
function findingFromConformance(outputDir, id, ref, tracking) {
|
|
110
|
+
const spec = readJson(path.join(outputDir, 'spec-conformance.json'));
|
|
111
|
+
const item = spec?.items?.find((i) => i.id === ref);
|
|
112
|
+
if (!item)
|
|
113
|
+
return null;
|
|
114
|
+
const f = newEmptyFinding(id, (tracking?.severity ?? item.severity_hint ?? 'Info'));
|
|
115
|
+
f.title = tracking?.title ?? String(item.spec_text ?? id);
|
|
116
|
+
f.category = 'Spec Conformance';
|
|
117
|
+
f.description = String(item.finding ?? item.spec_text ?? '');
|
|
118
|
+
const loc = item.code_location;
|
|
119
|
+
if (loc?.file)
|
|
120
|
+
f.root_cause.locations = [{ file: loc.file }];
|
|
121
|
+
f.source_ref = ref;
|
|
122
|
+
return f;
|
|
123
|
+
}
|
|
124
|
+
/** Build a findings.json record from an ai-results or external/github record, keyed by source_ref. */
|
|
125
|
+
function findingFromAiOrGithub(outputDir, id, kind, ref, tracking) {
|
|
126
|
+
const nested = kind === 'auditagent'
|
|
127
|
+
? path.join(outputDir, 'ai-results', 'auditagent', 'findings.json')
|
|
128
|
+
: path.join(outputDir, 'external', 'github', 'findings.json');
|
|
129
|
+
const file = readJson(nested);
|
|
130
|
+
const rec = file?.findings?.find((r) => r.id === ref || String(r.issue_number ?? '') === ref || r.id === `github-${ref}`);
|
|
131
|
+
if (!rec)
|
|
132
|
+
return null;
|
|
133
|
+
const f = newEmptyFinding(id, rec.severity ?? tracking?.severity ?? 'Info');
|
|
134
|
+
f.title = String(rec.title ?? tracking?.title ?? id);
|
|
135
|
+
f.category = String(rec.category ?? '');
|
|
136
|
+
f.description = String(rec.description ?? '');
|
|
137
|
+
const affected = rec.affected_code ?? [];
|
|
138
|
+
f.root_cause.locations = affected.map((a) => ({ file: a.file, snippet: a.snippet }));
|
|
139
|
+
f.source_ref = ref;
|
|
140
|
+
return f;
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* Ensure a findings.json entry exists for `id`, materializing one from the
|
|
144
|
+
* source-specific record if needed. Idempotent: returns the existing entry
|
|
145
|
+
* untouched when present. Dispatches on the tracking entry's `source` +
|
|
146
|
+
* `source_ref` (not the id, which is now a uniform `H-NNN`).
|
|
147
|
+
*/
|
|
148
|
+
export function ensureFindingExists(outputDir, id) {
|
|
149
|
+
const findings = loadFindings(outputDir);
|
|
150
|
+
const existing = findings.findings.find((f) => f.id === id);
|
|
151
|
+
if (existing)
|
|
152
|
+
return existing;
|
|
153
|
+
const tracking = loadTracking(outputDir).findings.find((t) => t.id === id);
|
|
154
|
+
const ref = tracking?.source_ref ?? '';
|
|
155
|
+
let materialized = null;
|
|
156
|
+
if (tracking?.source === 'conformance' && ref) {
|
|
157
|
+
materialized = findingFromConformance(outputDir, id, ref, tracking);
|
|
158
|
+
}
|
|
159
|
+
else if (tracking?.source === 'auditagent' && ref) {
|
|
160
|
+
materialized = findingFromAiOrGithub(outputDir, id, 'auditagent', ref, tracking);
|
|
161
|
+
}
|
|
162
|
+
else if (tracking?.source === 'github' && ref) {
|
|
163
|
+
materialized = findingFromAiOrGithub(outputDir, id, 'github', ref, tracking);
|
|
164
|
+
}
|
|
165
|
+
// Fallback: synthesize a minimal record from the tracking entry (manual
|
|
166
|
+
// findings, or any source record we couldn't read).
|
|
167
|
+
if (!materialized) {
|
|
168
|
+
materialized = newEmptyFinding(id, tracking?.severity ?? 'Info');
|
|
169
|
+
if (tracking?.title)
|
|
170
|
+
materialized.title = tracking.title;
|
|
171
|
+
if (tracking?.source_ref)
|
|
172
|
+
materialized.source_ref = tracking.source_ref;
|
|
173
|
+
}
|
|
174
|
+
findings.findings.push(materialized);
|
|
175
|
+
writeJson(path.join(outputDir, 'findings.json'), findings);
|
|
176
|
+
return materialized;
|
|
177
|
+
}
|
|
178
|
+
// ─── Mutations ──────────────────────────────────────────────────────
|
|
179
|
+
/**
|
|
180
|
+
* Move an issue between board columns. Materializes a findings.json entry first
|
|
181
|
+
* (so non-manual cards become reportable when promoted to Verified), then flips
|
|
182
|
+
* the tracking status.
|
|
183
|
+
*
|
|
184
|
+
* Note: this does NOT edit the user's source files. Source annotation
|
|
185
|
+
* (`// @audit-issue-verified ...`) remains the responsibility of the
|
|
186
|
+
* /validate-issue skill, which the auditor invokes deliberately — a drag-drop
|
|
187
|
+
* on the board should never silently rewrite .sol files.
|
|
188
|
+
*/
|
|
189
|
+
const SYNCED_LOCK_MSG = 'Issue is synced to GitHub and is read-only in Hex. Edit it on GitHub, then run /sync-issues to pull the changes.';
|
|
190
|
+
export function moveIssue(outputDir, id, column, duplicateOf) {
|
|
191
|
+
const nextStatus = COLUMN_TO_STATUS[column];
|
|
192
|
+
// `synced` is reachable only via markSynced (the /sync-issues path), never drag/move.
|
|
193
|
+
if (!nextStatus) {
|
|
194
|
+
throw new Error(`Invalid column: ${column}. The "synced" column is reached only via /sync-issues.`);
|
|
195
|
+
}
|
|
196
|
+
const current = loadTracking(outputDir).findings.find((t) => t.id === id);
|
|
197
|
+
if (current?.status === 'synced')
|
|
198
|
+
throw new Error(SYNCED_LOCK_MSG);
|
|
199
|
+
// Promoting to Verified should make the issue reportable.
|
|
200
|
+
if (column === 'verified')
|
|
201
|
+
ensureFindingExists(outputDir, id);
|
|
202
|
+
const tracking = loadTracking(outputDir);
|
|
203
|
+
let entry = tracking.findings.find((t) => t.id === id);
|
|
204
|
+
if (!entry) {
|
|
205
|
+
// The board only surfaces tracking entries, but be defensive: synthesize one
|
|
206
|
+
// from the (now-ensured) finding so a move never 404s on a real card.
|
|
207
|
+
const finding = ensureFindingExists(outputDir, id);
|
|
208
|
+
entry = {
|
|
209
|
+
id,
|
|
210
|
+
title: finding.title,
|
|
211
|
+
severity: finding.severity,
|
|
212
|
+
source: 'manual',
|
|
213
|
+
status: nextStatus,
|
|
214
|
+
poc_status: finding.poc?.status ?? 'not_started',
|
|
215
|
+
poc_file: finding.poc?.file ?? null,
|
|
216
|
+
duplicates: [],
|
|
217
|
+
duplicate_of: column === 'duplicate' ? (duplicateOf ?? null) : null,
|
|
218
|
+
notes: '',
|
|
219
|
+
};
|
|
220
|
+
tracking.findings.push(entry);
|
|
221
|
+
}
|
|
222
|
+
else {
|
|
223
|
+
entry.status = nextStatus;
|
|
224
|
+
}
|
|
225
|
+
if (column === 'duplicate') {
|
|
226
|
+
// Record the canonical issue this duplicates, if given.
|
|
227
|
+
if (duplicateOf)
|
|
228
|
+
entry.duplicate_of = duplicateOf;
|
|
229
|
+
}
|
|
230
|
+
else if (entry.duplicate_of) {
|
|
231
|
+
// Clear a stale duplicate pointer when the card leaves the Duplicate column.
|
|
232
|
+
entry.duplicate_of = null;
|
|
233
|
+
}
|
|
234
|
+
writeJson(path.join(outputDir, 'tracking.json'), tracking);
|
|
235
|
+
return entry;
|
|
236
|
+
}
|
|
237
|
+
/**
|
|
238
|
+
* Patch editable fields on an issue. Materializes a findings.json entry first so
|
|
239
|
+
* description / recommendation / resolution / update_from_client always land on
|
|
240
|
+
* a real record (not just non-manual cards' tracking rows). Title / severity /
|
|
241
|
+
* notes are mirrored on the tracking entry so the board reads current values
|
|
242
|
+
* without re-reading findings.json.
|
|
243
|
+
*/
|
|
244
|
+
export function patchIssue(outputDir, id, updates) {
|
|
245
|
+
const clean = {};
|
|
246
|
+
for (const key of EDITABLE_FIELDS) {
|
|
247
|
+
if (!(key in updates))
|
|
248
|
+
continue;
|
|
249
|
+
const value = updates[key];
|
|
250
|
+
if (key === 'severity' && value != null && !isValidSeverity(value)) {
|
|
251
|
+
throw new Error(`Invalid severity: ${String(value)}`);
|
|
252
|
+
}
|
|
253
|
+
if (key === 'resolution' && value != null && value !== '' && !isValidResolution(value)) {
|
|
254
|
+
throw new Error(`Invalid resolution: ${String(value)}`);
|
|
255
|
+
}
|
|
256
|
+
clean[key] = value;
|
|
257
|
+
}
|
|
258
|
+
if (Object.keys(clean).length === 0) {
|
|
259
|
+
throw new Error('No editable fields supplied');
|
|
260
|
+
}
|
|
261
|
+
const current = loadTracking(outputDir).findings.find((t) => t.id === id);
|
|
262
|
+
if (current?.status === 'synced')
|
|
263
|
+
throw new Error(SYNCED_LOCK_MSG);
|
|
264
|
+
const finding = ensureFindingExists(outputDir, id);
|
|
265
|
+
const findings = loadFindings(outputDir);
|
|
266
|
+
const target = findings.findings.find((f) => f.id === id) ?? finding;
|
|
267
|
+
for (const [key, value] of Object.entries(clean)) {
|
|
268
|
+
if (key === 'notes')
|
|
269
|
+
continue; // notes lives on tracking, not findings
|
|
270
|
+
if (key === 'resolution' && (value === '' || value == null)) {
|
|
271
|
+
delete target.resolution;
|
|
272
|
+
continue;
|
|
273
|
+
}
|
|
274
|
+
target[key] = value;
|
|
275
|
+
}
|
|
276
|
+
writeJson(path.join(outputDir, 'findings.json'), findings);
|
|
277
|
+
// Mirror title / severity / notes onto tracking.
|
|
278
|
+
const tracking = loadTracking(outputDir);
|
|
279
|
+
const entry = tracking.findings.find((t) => t.id === id);
|
|
280
|
+
if (entry) {
|
|
281
|
+
if ('title' in clean)
|
|
282
|
+
entry.title = clean.title;
|
|
283
|
+
if ('severity' in clean)
|
|
284
|
+
entry.severity = clean.severity;
|
|
285
|
+
if ('notes' in clean)
|
|
286
|
+
entry.notes = clean.notes;
|
|
287
|
+
writeJson(path.join(outputDir, 'tracking.json'), tracking);
|
|
288
|
+
}
|
|
289
|
+
return target;
|
|
290
|
+
}
|
|
291
|
+
/**
|
|
292
|
+
* Allocate a uniform `H-NNN` id and write a tracking entry + findings.json
|
|
293
|
+
* skeleton. Returns the new id. Conformance/manual start in the Potential
|
|
294
|
+
* column (`pending_validation`); auditagent starts `unverified`. Skills call
|
|
295
|
+
* this (via `hex issue new`) instead of hand-writing JSON.
|
|
296
|
+
*/
|
|
297
|
+
export function createIssue(outputDir, input) {
|
|
298
|
+
const id = allocateId(outputDir);
|
|
299
|
+
const status = input.source === 'auditagent' ? 'unverified' : 'pending_validation';
|
|
300
|
+
// Materialize the full finding from the source record when source_ref
|
|
301
|
+
// resolves (conformance / auditagent / github), so the board shows the real
|
|
302
|
+
// description immediately. Fall back to a titled skeleton otherwise.
|
|
303
|
+
const ref = input.source_ref ?? '';
|
|
304
|
+
let f = null;
|
|
305
|
+
if (input.source === 'conformance' && ref) {
|
|
306
|
+
f = findingFromConformance(outputDir, id, ref);
|
|
307
|
+
}
|
|
308
|
+
else if (input.source === 'auditagent' && ref) {
|
|
309
|
+
f = findingFromAiOrGithub(outputDir, id, 'auditagent', ref);
|
|
310
|
+
}
|
|
311
|
+
else if (input.source === 'github' && ref) {
|
|
312
|
+
f = findingFromAiOrGithub(outputDir, id, 'github', ref);
|
|
313
|
+
}
|
|
314
|
+
if (!f) {
|
|
315
|
+
f = newEmptyFinding(id, input.severity ?? 'Info');
|
|
316
|
+
f.title = input.title;
|
|
317
|
+
if (input.source_ref)
|
|
318
|
+
f.source_ref = input.source_ref;
|
|
319
|
+
}
|
|
320
|
+
// An explicit --severity / --title from the caller wins over the source record.
|
|
321
|
+
if (input.severity)
|
|
322
|
+
f.severity = input.severity;
|
|
323
|
+
if (input.title)
|
|
324
|
+
f.title = input.title;
|
|
325
|
+
const severity = f.severity;
|
|
326
|
+
const findings = loadFindings(outputDir);
|
|
327
|
+
findings.findings.push(f);
|
|
328
|
+
writeJson(path.join(outputDir, 'findings.json'), findings);
|
|
329
|
+
const tracking = loadTracking(outputDir);
|
|
330
|
+
tracking.findings.push({
|
|
331
|
+
id,
|
|
332
|
+
title: input.title,
|
|
333
|
+
severity,
|
|
334
|
+
source: input.source,
|
|
335
|
+
status,
|
|
336
|
+
poc_status: 'not_started',
|
|
337
|
+
poc_file: null,
|
|
338
|
+
duplicates: [],
|
|
339
|
+
duplicate_of: null,
|
|
340
|
+
source_ref: input.source_ref ?? null,
|
|
341
|
+
notes: '',
|
|
342
|
+
});
|
|
343
|
+
writeJson(path.join(outputDir, 'tracking.json'), tracking);
|
|
344
|
+
return id;
|
|
345
|
+
}
|
|
346
|
+
/**
|
|
347
|
+
* Mark an issue as synced to GitHub: set status to `synced`, write the github
|
|
348
|
+
* block, and overwrite finding fields from GitHub (GitHub is the source of
|
|
349
|
+
* truth once synced). Used by /sync-issues for both push-confirm (after
|
|
350
|
+
* `gh issue create`) and pull-update (GitHub edits → local). This is the only
|
|
351
|
+
* function that produces `status: 'synced'`.
|
|
352
|
+
*/
|
|
353
|
+
export function markSynced(outputDir, id, github, fields = {}) {
|
|
354
|
+
const finding = ensureFindingExists(outputDir, id);
|
|
355
|
+
const findings = loadFindings(outputDir);
|
|
356
|
+
const target = findings.findings.find((f) => f.id === id) ?? finding;
|
|
357
|
+
if (fields.title != null)
|
|
358
|
+
target.title = fields.title;
|
|
359
|
+
if (fields.severity != null && isValidSeverity(fields.severity))
|
|
360
|
+
target.severity = fields.severity;
|
|
361
|
+
if (fields.description != null)
|
|
362
|
+
target.description = fields.description;
|
|
363
|
+
if (fields.recommendation != null)
|
|
364
|
+
target.recommendation = fields.recommendation;
|
|
365
|
+
if (fields.update_from_client != null)
|
|
366
|
+
target.update_from_client = fields.update_from_client;
|
|
367
|
+
if (fields.resolution != null) {
|
|
368
|
+
if (fields.resolution === '')
|
|
369
|
+
delete target.resolution;
|
|
370
|
+
else if (isValidResolution(fields.resolution))
|
|
371
|
+
target.resolution = fields.resolution;
|
|
372
|
+
}
|
|
373
|
+
target.github = { ...github };
|
|
374
|
+
writeJson(path.join(outputDir, 'findings.json'), findings);
|
|
375
|
+
const tracking = loadTracking(outputDir);
|
|
376
|
+
let entry = tracking.findings.find((t) => t.id === id);
|
|
377
|
+
if (!entry) {
|
|
378
|
+
entry = {
|
|
379
|
+
id,
|
|
380
|
+
title: target.title,
|
|
381
|
+
severity: target.severity,
|
|
382
|
+
source: 'github',
|
|
383
|
+
status: 'synced',
|
|
384
|
+
poc_status: target.poc?.status ?? 'not_started',
|
|
385
|
+
poc_file: target.poc?.file ?? null,
|
|
386
|
+
duplicates: [],
|
|
387
|
+
duplicate_of: null,
|
|
388
|
+
source_ref: String(github.issue_number),
|
|
389
|
+
notes: '',
|
|
390
|
+
};
|
|
391
|
+
tracking.findings.push(entry);
|
|
392
|
+
}
|
|
393
|
+
else {
|
|
394
|
+
entry.status = 'synced';
|
|
395
|
+
entry.title = target.title;
|
|
396
|
+
entry.severity = target.severity;
|
|
397
|
+
if (entry.source_ref == null)
|
|
398
|
+
entry.source_ref = String(github.issue_number);
|
|
399
|
+
}
|
|
400
|
+
writeJson(path.join(outputDir, 'tracking.json'), tracking);
|
|
401
|
+
return target;
|
|
402
|
+
}
|
|
403
|
+
//# sourceMappingURL=issues.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"issues.js","sourceRoot":"","sources":["../../src/core/issues.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAM7B,MAAM,CAAC,MAAM,eAAe,GAAwB,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;AAClG,MAAM,CAAC,MAAM,iBAAiB,GAA0B;IACtD,OAAO;IACP,WAAW;IACX,cAAc;IACd,WAAW;IACX,YAAY;CACb,CAAC;AAEF,MAAM,CAAC,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
2068
|
update_from_client: z.ZodOptional<z.ZodString>;
|
|
2069
2069
|
resolution: z.ZodOptional<z.ZodEnum<["Fixed", "Mitigated", "Acknowledged", "Not Fixed", "Unresolved"]>>;
|
|
2070
|
+
source_ref: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2070
2071
|
}, "strip", z.ZodTypeAny, {
|
|
2071
2072
|
id: string;
|
|
2072
2073
|
description: string;
|
|
@@ -2105,6 +2106,7 @@ export declare const FindingSchema: z.ZodObject<{
|
|
|
2105
2106
|
} | undefined;
|
|
2106
2107
|
update_from_client?: string | undefined;
|
|
2107
2108
|
resolution?: "Fixed" | "Mitigated" | "Acknowledged" | "Not Fixed" | "Unresolved" | undefined;
|
|
2109
|
+
source_ref?: string | null | undefined;
|
|
2108
2110
|
}, {
|
|
2109
2111
|
id: string;
|
|
2110
2112
|
description: string;
|
|
@@ -2143,6 +2145,7 @@ export declare const FindingSchema: z.ZodObject<{
|
|
|
2143
2145
|
} | undefined;
|
|
2144
2146
|
update_from_client?: string | undefined;
|
|
2145
2147
|
resolution?: "Fixed" | "Mitigated" | "Acknowledged" | "Not Fixed" | "Unresolved" | undefined;
|
|
2148
|
+
source_ref?: string | null | undefined;
|
|
2146
2149
|
}>;
|
|
2147
2150
|
export declare const FindingsSchema: z.ZodObject<{
|
|
2148
2151
|
findings: z.ZodArray<z.ZodObject<{
|
|
@@ -2249,6 +2252,7 @@ export declare const FindingsSchema: z.ZodObject<{
|
|
|
2249
2252
|
}>>;
|
|
2250
2253
|
update_from_client: z.ZodOptional<z.ZodString>;
|
|
2251
2254
|
resolution: z.ZodOptional<z.ZodEnum<["Fixed", "Mitigated", "Acknowledged", "Not Fixed", "Unresolved"]>>;
|
|
2255
|
+
source_ref: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2252
2256
|
}, "strip", z.ZodTypeAny, {
|
|
2253
2257
|
id: string;
|
|
2254
2258
|
description: string;
|
|
@@ -2287,6 +2291,7 @@ export declare const FindingsSchema: z.ZodObject<{
|
|
|
2287
2291
|
} | undefined;
|
|
2288
2292
|
update_from_client?: string | undefined;
|
|
2289
2293
|
resolution?: "Fixed" | "Mitigated" | "Acknowledged" | "Not Fixed" | "Unresolved" | undefined;
|
|
2294
|
+
source_ref?: string | null | undefined;
|
|
2290
2295
|
}, {
|
|
2291
2296
|
id: string;
|
|
2292
2297
|
description: string;
|
|
@@ -2325,6 +2330,7 @@ export declare const FindingsSchema: z.ZodObject<{
|
|
|
2325
2330
|
} | undefined;
|
|
2326
2331
|
update_from_client?: string | undefined;
|
|
2327
2332
|
resolution?: "Fixed" | "Mitigated" | "Acknowledged" | "Not Fixed" | "Unresolved" | undefined;
|
|
2333
|
+
source_ref?: string | null | undefined;
|
|
2328
2334
|
}>, "many">;
|
|
2329
2335
|
}, "strip", z.ZodTypeAny, {
|
|
2330
2336
|
findings: {
|
|
@@ -2365,6 +2371,7 @@ export declare const FindingsSchema: z.ZodObject<{
|
|
|
2365
2371
|
} | undefined;
|
|
2366
2372
|
update_from_client?: string | undefined;
|
|
2367
2373
|
resolution?: "Fixed" | "Mitigated" | "Acknowledged" | "Not Fixed" | "Unresolved" | undefined;
|
|
2374
|
+
source_ref?: string | null | undefined;
|
|
2368
2375
|
}[];
|
|
2369
2376
|
}, {
|
|
2370
2377
|
findings: {
|
|
@@ -2405,6 +2412,7 @@ export declare const FindingsSchema: z.ZodObject<{
|
|
|
2405
2412
|
} | undefined;
|
|
2406
2413
|
update_from_client?: string | undefined;
|
|
2407
2414
|
resolution?: "Fixed" | "Mitigated" | "Acknowledged" | "Not Fixed" | "Unresolved" | undefined;
|
|
2415
|
+
source_ref?: string | null | undefined;
|
|
2408
2416
|
}[];
|
|
2409
2417
|
}>;
|
|
2410
2418
|
export declare const TrackingSourceSchema: z.ZodEnum<["manual", "auditagent", "conformance", "github"]>;
|
|
@@ -2413,14 +2421,15 @@ export declare const TrackingEntrySchema: z.ZodObject<{
|
|
|
2413
2421
|
title: z.ZodString;
|
|
2414
2422
|
severity: z.ZodEnum<["Critical", "High", "Medium", "Low", "Info"]>;
|
|
2415
2423
|
source: z.ZodEnum<["manual", "auditagent", "conformance", "github"]>;
|
|
2416
|
-
status: z.ZodEnum<["verified", "pending_validation", "rejected", "duplicate", "unverified"]>;
|
|
2424
|
+
status: z.ZodEnum<["verified", "pending_validation", "rejected", "duplicate", "unverified", "synced"]>;
|
|
2417
2425
|
poc_status: z.ZodEnum<["passing", "failing", "not_started"]>;
|
|
2418
2426
|
poc_file: z.ZodNullable<z.ZodString>;
|
|
2419
2427
|
duplicates: z.ZodArray<z.ZodString, "many">;
|
|
2420
2428
|
duplicate_of: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2429
|
+
source_ref: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2421
2430
|
notes: z.ZodString;
|
|
2422
2431
|
}, "strip", z.ZodTypeAny, {
|
|
2423
|
-
status: "verified" | "pending_validation" | "rejected" | "duplicate" | "unverified";
|
|
2432
|
+
status: "verified" | "pending_validation" | "rejected" | "duplicate" | "unverified" | "synced";
|
|
2424
2433
|
id: string;
|
|
2425
2434
|
severity: "Critical" | "High" | "Medium" | "Low" | "Info";
|
|
2426
2435
|
title: string;
|
|
@@ -2429,9 +2438,10 @@ export declare const TrackingEntrySchema: z.ZodObject<{
|
|
|
2429
2438
|
poc_file: string | null;
|
|
2430
2439
|
duplicates: string[];
|
|
2431
2440
|
notes: string;
|
|
2441
|
+
source_ref?: string | null | undefined;
|
|
2432
2442
|
duplicate_of?: string | null | undefined;
|
|
2433
2443
|
}, {
|
|
2434
|
-
status: "verified" | "pending_validation" | "rejected" | "duplicate" | "unverified";
|
|
2444
|
+
status: "verified" | "pending_validation" | "rejected" | "duplicate" | "unverified" | "synced";
|
|
2435
2445
|
id: string;
|
|
2436
2446
|
severity: "Critical" | "High" | "Medium" | "Low" | "Info";
|
|
2437
2447
|
title: string;
|
|
@@ -2440,6 +2450,7 @@ export declare const TrackingEntrySchema: z.ZodObject<{
|
|
|
2440
2450
|
poc_file: string | null;
|
|
2441
2451
|
duplicates: string[];
|
|
2442
2452
|
notes: string;
|
|
2453
|
+
source_ref?: string | null | undefined;
|
|
2443
2454
|
duplicate_of?: string | null | undefined;
|
|
2444
2455
|
}>;
|
|
2445
2456
|
export declare const TrackingSchema: z.ZodObject<{
|
|
@@ -2448,14 +2459,15 @@ export declare const TrackingSchema: z.ZodObject<{
|
|
|
2448
2459
|
title: z.ZodString;
|
|
2449
2460
|
severity: z.ZodEnum<["Critical", "High", "Medium", "Low", "Info"]>;
|
|
2450
2461
|
source: z.ZodEnum<["manual", "auditagent", "conformance", "github"]>;
|
|
2451
|
-
status: z.ZodEnum<["verified", "pending_validation", "rejected", "duplicate", "unverified"]>;
|
|
2462
|
+
status: z.ZodEnum<["verified", "pending_validation", "rejected", "duplicate", "unverified", "synced"]>;
|
|
2452
2463
|
poc_status: z.ZodEnum<["passing", "failing", "not_started"]>;
|
|
2453
2464
|
poc_file: z.ZodNullable<z.ZodString>;
|
|
2454
2465
|
duplicates: z.ZodArray<z.ZodString, "many">;
|
|
2455
2466
|
duplicate_of: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2467
|
+
source_ref: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2456
2468
|
notes: z.ZodString;
|
|
2457
2469
|
}, "strip", z.ZodTypeAny, {
|
|
2458
|
-
status: "verified" | "pending_validation" | "rejected" | "duplicate" | "unverified";
|
|
2470
|
+
status: "verified" | "pending_validation" | "rejected" | "duplicate" | "unverified" | "synced";
|
|
2459
2471
|
id: string;
|
|
2460
2472
|
severity: "Critical" | "High" | "Medium" | "Low" | "Info";
|
|
2461
2473
|
title: string;
|
|
@@ -2464,9 +2476,10 @@ export declare const TrackingSchema: z.ZodObject<{
|
|
|
2464
2476
|
poc_file: string | null;
|
|
2465
2477
|
duplicates: string[];
|
|
2466
2478
|
notes: string;
|
|
2479
|
+
source_ref?: string | null | undefined;
|
|
2467
2480
|
duplicate_of?: string | null | undefined;
|
|
2468
2481
|
}, {
|
|
2469
|
-
status: "verified" | "pending_validation" | "rejected" | "duplicate" | "unverified";
|
|
2482
|
+
status: "verified" | "pending_validation" | "rejected" | "duplicate" | "unverified" | "synced";
|
|
2470
2483
|
id: string;
|
|
2471
2484
|
severity: "Critical" | "High" | "Medium" | "Low" | "Info";
|
|
2472
2485
|
title: string;
|
|
@@ -2475,11 +2488,12 @@ export declare const TrackingSchema: z.ZodObject<{
|
|
|
2475
2488
|
poc_file: string | null;
|
|
2476
2489
|
duplicates: string[];
|
|
2477
2490
|
notes: string;
|
|
2491
|
+
source_ref?: string | null | undefined;
|
|
2478
2492
|
duplicate_of?: string | null | undefined;
|
|
2479
2493
|
}>, "many">;
|
|
2480
2494
|
}, "strip", z.ZodTypeAny, {
|
|
2481
2495
|
findings: {
|
|
2482
|
-
status: "verified" | "pending_validation" | "rejected" | "duplicate" | "unverified";
|
|
2496
|
+
status: "verified" | "pending_validation" | "rejected" | "duplicate" | "unverified" | "synced";
|
|
2483
2497
|
id: string;
|
|
2484
2498
|
severity: "Critical" | "High" | "Medium" | "Low" | "Info";
|
|
2485
2499
|
title: string;
|
|
@@ -2488,11 +2502,12 @@ export declare const TrackingSchema: z.ZodObject<{
|
|
|
2488
2502
|
poc_file: string | null;
|
|
2489
2503
|
duplicates: string[];
|
|
2490
2504
|
notes: string;
|
|
2505
|
+
source_ref?: string | null | undefined;
|
|
2491
2506
|
duplicate_of?: string | null | undefined;
|
|
2492
2507
|
}[];
|
|
2493
2508
|
}, {
|
|
2494
2509
|
findings: {
|
|
2495
|
-
status: "verified" | "pending_validation" | "rejected" | "duplicate" | "unverified";
|
|
2510
|
+
status: "verified" | "pending_validation" | "rejected" | "duplicate" | "unverified" | "synced";
|
|
2496
2511
|
id: string;
|
|
2497
2512
|
severity: "Critical" | "High" | "Medium" | "Low" | "Info";
|
|
2498
2513
|
title: string;
|
|
@@ -2501,6 +2516,7 @@ export declare const TrackingSchema: z.ZodObject<{
|
|
|
2501
2516
|
poc_file: string | null;
|
|
2502
2517
|
duplicates: string[];
|
|
2503
2518
|
notes: string;
|
|
2519
|
+
source_ref?: string | null | undefined;
|
|
2504
2520
|
duplicate_of?: string | null | undefined;
|
|
2505
2521
|
}[];
|
|
2506
2522
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/core/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;EAKzB,CAAC;AAEH,eAAO,MAAM,gBAAgB,sCAAoC,CAAC;AAElE,eAAO,MAAM,cAAc,0DAAwD,CAAC;AAEpF,eAAO,MAAM,iBAAiB,gGAQ5B,CAAC;AAIH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0CvB,CAAC;AAIH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;EAMpC,CAAC;AAEH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAM7B,CAAC;AAEH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsBjC,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;EAIhC,CAAC;AAEH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAI3B,CAAC;AAIH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAUzB,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiBhC,CAAC;AAIH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgBhC,CAAC;AAEH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAM7B,CAAC;AAIH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;EAQ7B,CAAC;AAEH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAEzB,CAAC;AAIH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;EASjC,CAAC"}
|
package/dist/core/schema.js
CHANGED
|
@@ -286,6 +286,9 @@ export const FindingSchema = z.object({
|
|
|
286
286
|
github: GithubLinkSchema.optional(),
|
|
287
287
|
update_from_client: z.string().optional(),
|
|
288
288
|
resolution: ResolutionSchema.optional(),
|
|
289
|
+
// Maps a uniform H-NNN id back to its origin record (conformance item id,
|
|
290
|
+
// auditagent finding id, or GitHub issue number) for materialization/dedup.
|
|
291
|
+
source_ref: z.string().nullable().optional(),
|
|
289
292
|
});
|
|
290
293
|
export const FindingsSchema = z.object({
|
|
291
294
|
findings: z.array(FindingSchema),
|
|
@@ -297,11 +300,19 @@ export const TrackingEntrySchema = z.object({
|
|
|
297
300
|
title: z.string(),
|
|
298
301
|
severity: SeveritySchema,
|
|
299
302
|
source: TrackingSourceSchema,
|
|
300
|
-
status: z.enum([
|
|
303
|
+
status: z.enum([
|
|
304
|
+
'verified',
|
|
305
|
+
'pending_validation',
|
|
306
|
+
'rejected',
|
|
307
|
+
'duplicate',
|
|
308
|
+
'unverified',
|
|
309
|
+
'synced',
|
|
310
|
+
]),
|
|
301
311
|
poc_status: z.enum(['passing', 'failing', 'not_started']),
|
|
302
312
|
poc_file: z.string().nullable(),
|
|
303
313
|
duplicates: z.array(z.string()),
|
|
304
314
|
duplicate_of: z.string().nullable().optional(),
|
|
315
|
+
source_ref: z.string().nullable().optional(),
|
|
305
316
|
notes: z.string(),
|
|
306
317
|
});
|
|
307
318
|
export const TrackingSchema = z.object({
|