pruneguard 0.3.0 → 0.4.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/README.md +0 -18
- package/configuration_schema.json +280 -3
- package/daemon_status_report_schema.json +183 -0
- package/dist/index.d.mts +148 -2
- package/dist/index.mjs +18 -1
- package/package.json +11 -9
- package/report_schema.json +148 -10
- package/review_report_schema.json +346 -0
- package/safe_delete_report_schema.json +71 -2
- package/suggest_rules_report_schema.json +350 -0
|
@@ -39,6 +39,33 @@
|
|
|
39
39
|
"type": "string"
|
|
40
40
|
}
|
|
41
41
|
},
|
|
42
|
+
"compatibilityWarnings": {
|
|
43
|
+
"description": "Compatibility warnings from framework detection.",
|
|
44
|
+
"type": "array",
|
|
45
|
+
"items": {
|
|
46
|
+
"type": "string"
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"executionMode": {
|
|
50
|
+
"description": "Execution mode used for this review.",
|
|
51
|
+
"anyOf": [
|
|
52
|
+
{
|
|
53
|
+
"$ref": "#/definitions/ExecutionMode"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"type": "null"
|
|
57
|
+
}
|
|
58
|
+
]
|
|
59
|
+
},
|
|
60
|
+
"latencyMs": {
|
|
61
|
+
"description": "Wall-clock latency in milliseconds.",
|
|
62
|
+
"type": [
|
|
63
|
+
"integer",
|
|
64
|
+
"null"
|
|
65
|
+
],
|
|
66
|
+
"format": "uint64",
|
|
67
|
+
"minimum": 0.0
|
|
68
|
+
},
|
|
42
69
|
"newFindings": {
|
|
43
70
|
"description": "All new findings introduced on this branch.",
|
|
44
71
|
"type": "array",
|
|
@@ -46,6 +73,13 @@
|
|
|
46
73
|
"$ref": "#/definitions/Finding"
|
|
47
74
|
}
|
|
48
75
|
},
|
|
76
|
+
"proposedActions": {
|
|
77
|
+
"description": "Proposed remediation actions for blocking findings.",
|
|
78
|
+
"type": "array",
|
|
79
|
+
"items": {
|
|
80
|
+
"$ref": "#/definitions/RemediationAction"
|
|
81
|
+
}
|
|
82
|
+
},
|
|
49
83
|
"recommendations": {
|
|
50
84
|
"description": "Concise recommendations for the branch author.",
|
|
51
85
|
"type": "array",
|
|
@@ -53,6 +87,18 @@
|
|
|
53
87
|
"type": "string"
|
|
54
88
|
}
|
|
55
89
|
},
|
|
90
|
+
"recommendedActions": {
|
|
91
|
+
"description": "Machine-readable recommended next actions for agents.",
|
|
92
|
+
"type": "array",
|
|
93
|
+
"items": {
|
|
94
|
+
"$ref": "#/definitions/RecommendedAction"
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
"strictTrustApplied": {
|
|
98
|
+
"description": "Whether strict trust mode was applied.",
|
|
99
|
+
"default": false,
|
|
100
|
+
"type": "boolean"
|
|
101
|
+
},
|
|
56
102
|
"trust": {
|
|
57
103
|
"description": "Trust summary for this review.",
|
|
58
104
|
"allOf": [
|
|
@@ -122,6 +168,14 @@
|
|
|
122
168
|
}
|
|
123
169
|
}
|
|
124
170
|
},
|
|
171
|
+
"ExecutionMode": {
|
|
172
|
+
"description": "Execution mode for daemon/oneshot distinction.",
|
|
173
|
+
"type": "string",
|
|
174
|
+
"enum": [
|
|
175
|
+
"oneshot",
|
|
176
|
+
"daemon"
|
|
177
|
+
]
|
|
178
|
+
},
|
|
125
179
|
"Finding": {
|
|
126
180
|
"description": "A single finding from analysis.",
|
|
127
181
|
"type": "object",
|
|
@@ -135,6 +189,13 @@
|
|
|
135
189
|
"subject"
|
|
136
190
|
],
|
|
137
191
|
"properties": {
|
|
192
|
+
"actionKinds": {
|
|
193
|
+
"description": "All applicable remediation action kinds.",
|
|
194
|
+
"type": "array",
|
|
195
|
+
"items": {
|
|
196
|
+
"$ref": "#/definitions/RemediationActionKind"
|
|
197
|
+
}
|
|
198
|
+
},
|
|
138
199
|
"category": {
|
|
139
200
|
"description": "Category of the finding.",
|
|
140
201
|
"allOf": [
|
|
@@ -162,6 +223,16 @@
|
|
|
162
223
|
"$ref": "#/definitions/Evidence"
|
|
163
224
|
}
|
|
164
225
|
},
|
|
226
|
+
"frameworkContext": {
|
|
227
|
+
"description": "Framework context relevant to this finding.",
|
|
228
|
+
"type": [
|
|
229
|
+
"array",
|
|
230
|
+
"null"
|
|
231
|
+
],
|
|
232
|
+
"items": {
|
|
233
|
+
"type": "string"
|
|
234
|
+
}
|
|
235
|
+
},
|
|
165
236
|
"id": {
|
|
166
237
|
"description": "Stable deterministic ID for this finding.",
|
|
167
238
|
"type": "string"
|
|
@@ -177,6 +248,17 @@
|
|
|
177
248
|
"null"
|
|
178
249
|
]
|
|
179
250
|
},
|
|
251
|
+
"primaryActionKind": {
|
|
252
|
+
"description": "Primary remediation action kind for this finding.",
|
|
253
|
+
"anyOf": [
|
|
254
|
+
{
|
|
255
|
+
"$ref": "#/definitions/RemediationActionKind"
|
|
256
|
+
},
|
|
257
|
+
{
|
|
258
|
+
"type": "null"
|
|
259
|
+
}
|
|
260
|
+
]
|
|
261
|
+
},
|
|
180
262
|
"ruleName": {
|
|
181
263
|
"description": "Name of the rule that produced this finding, if any.",
|
|
182
264
|
"type": [
|
|
@@ -203,6 +285,16 @@
|
|
|
203
285
|
"null"
|
|
204
286
|
]
|
|
205
287
|
},
|
|
288
|
+
"trustNotes": {
|
|
289
|
+
"description": "Trust-related notes for this finding.",
|
|
290
|
+
"type": [
|
|
291
|
+
"array",
|
|
292
|
+
"null"
|
|
293
|
+
],
|
|
294
|
+
"items": {
|
|
295
|
+
"type": "string"
|
|
296
|
+
}
|
|
297
|
+
},
|
|
206
298
|
"workspace": {
|
|
207
299
|
"description": "Workspace this finding belongs to, if applicable.",
|
|
208
300
|
"type": [
|
|
@@ -241,6 +333,240 @@
|
|
|
241
333
|
"info"
|
|
242
334
|
]
|
|
243
335
|
},
|
|
336
|
+
"RecommendedAction": {
|
|
337
|
+
"description": "A machine-readable recommended next action for an AI agent or CI system.",
|
|
338
|
+
"type": "object",
|
|
339
|
+
"required": [
|
|
340
|
+
"description",
|
|
341
|
+
"kind",
|
|
342
|
+
"priority"
|
|
343
|
+
],
|
|
344
|
+
"properties": {
|
|
345
|
+
"command": {
|
|
346
|
+
"description": "The pruneguard command to run, if applicable.",
|
|
347
|
+
"type": [
|
|
348
|
+
"string",
|
|
349
|
+
"null"
|
|
350
|
+
]
|
|
351
|
+
},
|
|
352
|
+
"description": {
|
|
353
|
+
"description": "Human-readable description of what to do.",
|
|
354
|
+
"type": "string"
|
|
355
|
+
},
|
|
356
|
+
"kind": {
|
|
357
|
+
"description": "Machine-readable action kind.",
|
|
358
|
+
"allOf": [
|
|
359
|
+
{
|
|
360
|
+
"$ref": "#/definitions/RecommendedActionKind"
|
|
361
|
+
}
|
|
362
|
+
]
|
|
363
|
+
},
|
|
364
|
+
"priority": {
|
|
365
|
+
"description": "Priority rank (1 = most important).",
|
|
366
|
+
"type": "integer",
|
|
367
|
+
"format": "uint",
|
|
368
|
+
"minimum": 0.0
|
|
369
|
+
},
|
|
370
|
+
"targets": {
|
|
371
|
+
"description": "Targets this action applies to.",
|
|
372
|
+
"type": "array",
|
|
373
|
+
"items": {
|
|
374
|
+
"type": "string"
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
},
|
|
379
|
+
"RecommendedActionKind": {
|
|
380
|
+
"description": "Kind of recommended next action.",
|
|
381
|
+
"oneOf": [
|
|
382
|
+
{
|
|
383
|
+
"description": "Run safe-delete on identified targets.",
|
|
384
|
+
"type": "string",
|
|
385
|
+
"enum": [
|
|
386
|
+
"run-safe-delete"
|
|
387
|
+
]
|
|
388
|
+
},
|
|
389
|
+
{
|
|
390
|
+
"description": "Run fix-plan for specific findings.",
|
|
391
|
+
"type": "string",
|
|
392
|
+
"enum": [
|
|
393
|
+
"run-fix-plan"
|
|
394
|
+
]
|
|
395
|
+
},
|
|
396
|
+
{
|
|
397
|
+
"description": "Resolve blocking findings before merge.",
|
|
398
|
+
"type": "string",
|
|
399
|
+
"enum": [
|
|
400
|
+
"resolve-blocking"
|
|
401
|
+
]
|
|
402
|
+
},
|
|
403
|
+
{
|
|
404
|
+
"description": "Investigate unresolved specifier pressure.",
|
|
405
|
+
"type": "string",
|
|
406
|
+
"enum": [
|
|
407
|
+
"fix-resolver-config"
|
|
408
|
+
]
|
|
409
|
+
},
|
|
410
|
+
{
|
|
411
|
+
"description": "Review advisory findings.",
|
|
412
|
+
"type": "string",
|
|
413
|
+
"enum": [
|
|
414
|
+
"review-advisory"
|
|
415
|
+
]
|
|
416
|
+
},
|
|
417
|
+
{
|
|
418
|
+
"description": "Run a full-scope scan for higher confidence.",
|
|
419
|
+
"type": "string",
|
|
420
|
+
"enum": [
|
|
421
|
+
"run-full-scope"
|
|
422
|
+
]
|
|
423
|
+
},
|
|
424
|
+
{
|
|
425
|
+
"description": "Branch is clean; no action required.",
|
|
426
|
+
"type": "string",
|
|
427
|
+
"enum": [
|
|
428
|
+
"none"
|
|
429
|
+
]
|
|
430
|
+
}
|
|
431
|
+
]
|
|
432
|
+
},
|
|
433
|
+
"RemediationAction": {
|
|
434
|
+
"description": "A remediation action describing how to fix one or more findings.",
|
|
435
|
+
"type": "object",
|
|
436
|
+
"required": [
|
|
437
|
+
"confidence",
|
|
438
|
+
"id",
|
|
439
|
+
"kind",
|
|
440
|
+
"risk",
|
|
441
|
+
"targets",
|
|
442
|
+
"why"
|
|
443
|
+
],
|
|
444
|
+
"properties": {
|
|
445
|
+
"confidence": {
|
|
446
|
+
"description": "Confidence in this action's correctness.",
|
|
447
|
+
"allOf": [
|
|
448
|
+
{
|
|
449
|
+
"$ref": "#/definitions/FindingConfidence"
|
|
450
|
+
}
|
|
451
|
+
]
|
|
452
|
+
},
|
|
453
|
+
"findingIds": {
|
|
454
|
+
"description": "IDs of findings this action addresses.",
|
|
455
|
+
"type": "array",
|
|
456
|
+
"items": {
|
|
457
|
+
"type": "string"
|
|
458
|
+
}
|
|
459
|
+
},
|
|
460
|
+
"id": {
|
|
461
|
+
"description": "Unique identifier for this action.",
|
|
462
|
+
"type": "string"
|
|
463
|
+
},
|
|
464
|
+
"kind": {
|
|
465
|
+
"description": "The kind of remediation to perform.",
|
|
466
|
+
"allOf": [
|
|
467
|
+
{
|
|
468
|
+
"$ref": "#/definitions/RemediationActionKind"
|
|
469
|
+
}
|
|
470
|
+
]
|
|
471
|
+
},
|
|
472
|
+
"phase": {
|
|
473
|
+
"description": "Phase this action belongs to (dead-code, architecture, governance).",
|
|
474
|
+
"type": [
|
|
475
|
+
"string",
|
|
476
|
+
"null"
|
|
477
|
+
]
|
|
478
|
+
},
|
|
479
|
+
"preconditions": {
|
|
480
|
+
"description": "Conditions that must be true before this action can be applied.",
|
|
481
|
+
"type": "array",
|
|
482
|
+
"items": {
|
|
483
|
+
"type": "string"
|
|
484
|
+
}
|
|
485
|
+
},
|
|
486
|
+
"rank": {
|
|
487
|
+
"description": "Ranking position within the plan (1-based, lower = do first).",
|
|
488
|
+
"type": [
|
|
489
|
+
"integer",
|
|
490
|
+
"null"
|
|
491
|
+
],
|
|
492
|
+
"format": "uint",
|
|
493
|
+
"minimum": 0.0
|
|
494
|
+
},
|
|
495
|
+
"risk": {
|
|
496
|
+
"description": "Risk level of this action.",
|
|
497
|
+
"allOf": [
|
|
498
|
+
{
|
|
499
|
+
"$ref": "#/definitions/RiskLevel"
|
|
500
|
+
}
|
|
501
|
+
]
|
|
502
|
+
},
|
|
503
|
+
"steps": {
|
|
504
|
+
"description": "Ordered steps to execute.",
|
|
505
|
+
"type": "array",
|
|
506
|
+
"items": {
|
|
507
|
+
"$ref": "#/definitions/RemediationStep"
|
|
508
|
+
}
|
|
509
|
+
},
|
|
510
|
+
"targets": {
|
|
511
|
+
"description": "Files or exports this action targets.",
|
|
512
|
+
"type": "array",
|
|
513
|
+
"items": {
|
|
514
|
+
"type": "string"
|
|
515
|
+
}
|
|
516
|
+
},
|
|
517
|
+
"verification": {
|
|
518
|
+
"description": "Verification commands to run after applying the action.",
|
|
519
|
+
"type": "array",
|
|
520
|
+
"items": {
|
|
521
|
+
"type": "string"
|
|
522
|
+
}
|
|
523
|
+
},
|
|
524
|
+
"why": {
|
|
525
|
+
"description": "Human-readable rationale explaining why this action is needed.",
|
|
526
|
+
"type": "string"
|
|
527
|
+
}
|
|
528
|
+
}
|
|
529
|
+
},
|
|
530
|
+
"RemediationActionKind": {
|
|
531
|
+
"description": "The kind of remediation action to take.",
|
|
532
|
+
"type": "string",
|
|
533
|
+
"enum": [
|
|
534
|
+
"delete-file",
|
|
535
|
+
"delete-export",
|
|
536
|
+
"remove-dependency",
|
|
537
|
+
"break-cycle",
|
|
538
|
+
"move-import",
|
|
539
|
+
"tighten-entrypoint",
|
|
540
|
+
"update-boundary-rule",
|
|
541
|
+
"assign-owner",
|
|
542
|
+
"split-package",
|
|
543
|
+
"acknowledge-baseline"
|
|
544
|
+
]
|
|
545
|
+
},
|
|
546
|
+
"RemediationStep": {
|
|
547
|
+
"description": "A single step in a remediation action.",
|
|
548
|
+
"type": "object",
|
|
549
|
+
"required": [
|
|
550
|
+
"description"
|
|
551
|
+
],
|
|
552
|
+
"properties": {
|
|
553
|
+
"action": {
|
|
554
|
+
"type": [
|
|
555
|
+
"string",
|
|
556
|
+
"null"
|
|
557
|
+
]
|
|
558
|
+
},
|
|
559
|
+
"description": {
|
|
560
|
+
"type": "string"
|
|
561
|
+
},
|
|
562
|
+
"file": {
|
|
563
|
+
"type": [
|
|
564
|
+
"string",
|
|
565
|
+
"null"
|
|
566
|
+
]
|
|
567
|
+
}
|
|
568
|
+
}
|
|
569
|
+
},
|
|
244
570
|
"ReviewTrust": {
|
|
245
571
|
"description": "Trust summary within a review report.",
|
|
246
572
|
"type": "object",
|
|
@@ -263,6 +589,17 @@
|
|
|
263
589
|
}
|
|
264
590
|
]
|
|
265
591
|
},
|
|
592
|
+
"executionMode": {
|
|
593
|
+
"description": "Execution mode used for this analysis.",
|
|
594
|
+
"anyOf": [
|
|
595
|
+
{
|
|
596
|
+
"$ref": "#/definitions/ExecutionMode"
|
|
597
|
+
},
|
|
598
|
+
{
|
|
599
|
+
"type": "null"
|
|
600
|
+
}
|
|
601
|
+
]
|
|
602
|
+
},
|
|
266
603
|
"fullScope": {
|
|
267
604
|
"description": "Whether full-scope analysis was performed.",
|
|
268
605
|
"type": "boolean"
|
|
@@ -273,6 +610,15 @@
|
|
|
273
610
|
"format": "double"
|
|
274
611
|
}
|
|
275
612
|
}
|
|
613
|
+
},
|
|
614
|
+
"RiskLevel": {
|
|
615
|
+
"description": "Risk level for a remediation action or fix plan.",
|
|
616
|
+
"type": "string",
|
|
617
|
+
"enum": [
|
|
618
|
+
"low",
|
|
619
|
+
"medium",
|
|
620
|
+
"high"
|
|
621
|
+
]
|
|
276
622
|
}
|
|
277
623
|
}
|
|
278
624
|
}
|
|
@@ -18,10 +18,10 @@
|
|
|
18
18
|
}
|
|
19
19
|
},
|
|
20
20
|
"deletionOrder": {
|
|
21
|
-
"description": "Recommended deletion order (safe targets only).",
|
|
21
|
+
"description": "Recommended deletion order (safe targets only, dependency-aware).",
|
|
22
22
|
"type": "array",
|
|
23
23
|
"items": {
|
|
24
|
-
"
|
|
24
|
+
"$ref": "#/definitions/DeletionOrderEntry"
|
|
25
25
|
}
|
|
26
26
|
},
|
|
27
27
|
"evidence": {
|
|
@@ -54,6 +54,33 @@
|
|
|
54
54
|
}
|
|
55
55
|
},
|
|
56
56
|
"definitions": {
|
|
57
|
+
"DeletionOrderEntry": {
|
|
58
|
+
"description": "An entry in the dependency-aware deletion order.",
|
|
59
|
+
"type": "object",
|
|
60
|
+
"required": [
|
|
61
|
+
"step",
|
|
62
|
+
"target"
|
|
63
|
+
],
|
|
64
|
+
"properties": {
|
|
65
|
+
"reason": {
|
|
66
|
+
"description": "Why this target is at this position in the order.",
|
|
67
|
+
"type": [
|
|
68
|
+
"string",
|
|
69
|
+
"null"
|
|
70
|
+
]
|
|
71
|
+
},
|
|
72
|
+
"step": {
|
|
73
|
+
"description": "Position in the deletion sequence (1-based).",
|
|
74
|
+
"type": "integer",
|
|
75
|
+
"format": "uint",
|
|
76
|
+
"minimum": 0.0
|
|
77
|
+
},
|
|
78
|
+
"target": {
|
|
79
|
+
"description": "The target to delete.",
|
|
80
|
+
"type": "string"
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
},
|
|
57
84
|
"Evidence": {
|
|
58
85
|
"description": "Evidence supporting a finding.",
|
|
59
86
|
"type": "object",
|
|
@@ -100,9 +127,18 @@
|
|
|
100
127
|
"description": "A candidate in a safe-delete evaluation.",
|
|
101
128
|
"type": "object",
|
|
102
129
|
"required": [
|
|
130
|
+
"classification",
|
|
103
131
|
"target"
|
|
104
132
|
],
|
|
105
133
|
"properties": {
|
|
134
|
+
"classification": {
|
|
135
|
+
"description": "Explicit classification for this candidate.",
|
|
136
|
+
"allOf": [
|
|
137
|
+
{
|
|
138
|
+
"$ref": "#/definitions/SafeDeleteClassification"
|
|
139
|
+
}
|
|
140
|
+
]
|
|
141
|
+
},
|
|
106
142
|
"confidence": {
|
|
107
143
|
"description": "Confidence in the safety assessment.",
|
|
108
144
|
"anyOf": [
|
|
@@ -114,6 +150,13 @@
|
|
|
114
150
|
}
|
|
115
151
|
]
|
|
116
152
|
},
|
|
153
|
+
"evidence": {
|
|
154
|
+
"description": "Per-candidate evidence supporting the classification.",
|
|
155
|
+
"type": "array",
|
|
156
|
+
"items": {
|
|
157
|
+
"$ref": "#/definitions/Evidence"
|
|
158
|
+
}
|
|
159
|
+
},
|
|
117
160
|
"reasons": {
|
|
118
161
|
"description": "Reasons for the classification.",
|
|
119
162
|
"type": "array",
|
|
@@ -126,6 +169,32 @@
|
|
|
126
169
|
"type": "string"
|
|
127
170
|
}
|
|
128
171
|
}
|
|
172
|
+
},
|
|
173
|
+
"SafeDeleteClassification": {
|
|
174
|
+
"description": "Explicit classification for a safe-delete candidate.",
|
|
175
|
+
"oneOf": [
|
|
176
|
+
{
|
|
177
|
+
"description": "Target is safe to delete without further review.",
|
|
178
|
+
"type": "string",
|
|
179
|
+
"enum": [
|
|
180
|
+
"safe"
|
|
181
|
+
]
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
"description": "Target needs manual review before deletion.",
|
|
185
|
+
"type": "string",
|
|
186
|
+
"enum": [
|
|
187
|
+
"needs-review"
|
|
188
|
+
]
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
"description": "Target must not be deleted.",
|
|
192
|
+
"type": "string",
|
|
193
|
+
"enum": [
|
|
194
|
+
"blocked"
|
|
195
|
+
]
|
|
196
|
+
}
|
|
197
|
+
]
|
|
129
198
|
}
|
|
130
199
|
}
|
|
131
200
|
}
|