pruneguard 0.3.0 → 0.3.1
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 +110 -0
- package/package.json +9 -9
- package/report_schema.json +120 -0
- package/review_report_schema.json +346 -0
- package/safe_delete_report_schema.json +71 -2
package/README.md
CHANGED
|
@@ -60,9 +60,6 @@ Commands:
|
|
|
60
60
|
debug entrypoints List detected entrypoints
|
|
61
61
|
debug runtime Print runtime diagnostics
|
|
62
62
|
daemon start|stop|status Manage the background daemon
|
|
63
|
-
migrate knip Convert knip config to pruneguard
|
|
64
|
-
migrate depcruise Convert dependency-cruiser config to pruneguard
|
|
65
|
-
|
|
66
63
|
Options:
|
|
67
64
|
-c, --config <FILE> Config file path [default: pruneguard.json]
|
|
68
65
|
--format <FORMAT> Output format: text, json, sarif, dot
|
|
@@ -127,8 +124,6 @@ import {
|
|
|
127
124
|
loadConfig,
|
|
128
125
|
schemaPath,
|
|
129
126
|
scanDot,
|
|
130
|
-
migrateKnip,
|
|
131
|
-
migrateDepcruise,
|
|
132
127
|
} from "pruneguard";
|
|
133
128
|
```
|
|
134
129
|
|
|
@@ -204,8 +199,6 @@ const config = await loadConfig();
|
|
|
204
199
|
const schema = schemaPath();
|
|
205
200
|
const dot = await scanDot();
|
|
206
201
|
const rules = await suggestRules();
|
|
207
|
-
const knip = await migrateKnip();
|
|
208
|
-
const dc = await migrateDepcruise();
|
|
209
202
|
```
|
|
210
203
|
|
|
211
204
|
### Error handling
|
|
@@ -374,17 +367,6 @@ jobs:
|
|
|
374
367
|
|
|
375
368
|
---
|
|
376
369
|
|
|
377
|
-
## Migrating from other tools
|
|
378
|
-
|
|
379
|
-
```sh
|
|
380
|
-
pruneguard migrate knip # reads knip.json or package.json#knip
|
|
381
|
-
pruneguard migrate depcruise # reads .dependency-cruiser.* files
|
|
382
|
-
```
|
|
383
|
-
|
|
384
|
-
Both commands emit an equivalent `pruneguard.json` with migration notes.
|
|
385
|
-
|
|
386
|
-
---
|
|
387
|
-
|
|
388
370
|
## Framework detection
|
|
389
371
|
|
|
390
372
|
| Framework | Auto-detected via | Entrypoints added |
|
|
@@ -259,6 +259,46 @@
|
|
|
259
259
|
"FrameworksConfig": {
|
|
260
260
|
"type": "object",
|
|
261
261
|
"properties": {
|
|
262
|
+
"angular": {
|
|
263
|
+
"anyOf": [
|
|
264
|
+
{
|
|
265
|
+
"$ref": "#/definitions/FrameworkToggle"
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
"type": "null"
|
|
269
|
+
}
|
|
270
|
+
]
|
|
271
|
+
},
|
|
272
|
+
"astro": {
|
|
273
|
+
"anyOf": [
|
|
274
|
+
{
|
|
275
|
+
"$ref": "#/definitions/FrameworkToggle"
|
|
276
|
+
},
|
|
277
|
+
{
|
|
278
|
+
"type": "null"
|
|
279
|
+
}
|
|
280
|
+
]
|
|
281
|
+
},
|
|
282
|
+
"cypress": {
|
|
283
|
+
"anyOf": [
|
|
284
|
+
{
|
|
285
|
+
"$ref": "#/definitions/FrameworkToggle"
|
|
286
|
+
},
|
|
287
|
+
{
|
|
288
|
+
"type": "null"
|
|
289
|
+
}
|
|
290
|
+
]
|
|
291
|
+
},
|
|
292
|
+
"docusaurus": {
|
|
293
|
+
"anyOf": [
|
|
294
|
+
{
|
|
295
|
+
"$ref": "#/definitions/FrameworkToggle"
|
|
296
|
+
},
|
|
297
|
+
{
|
|
298
|
+
"type": "null"
|
|
299
|
+
}
|
|
300
|
+
]
|
|
301
|
+
},
|
|
262
302
|
"jest": {
|
|
263
303
|
"anyOf": [
|
|
264
304
|
{
|
|
@@ -279,6 +319,46 @@
|
|
|
279
319
|
}
|
|
280
320
|
]
|
|
281
321
|
},
|
|
322
|
+
"nuxt": {
|
|
323
|
+
"anyOf": [
|
|
324
|
+
{
|
|
325
|
+
"$ref": "#/definitions/FrameworkToggle"
|
|
326
|
+
},
|
|
327
|
+
{
|
|
328
|
+
"type": "null"
|
|
329
|
+
}
|
|
330
|
+
]
|
|
331
|
+
},
|
|
332
|
+
"nx": {
|
|
333
|
+
"anyOf": [
|
|
334
|
+
{
|
|
335
|
+
"$ref": "#/definitions/FrameworkToggle"
|
|
336
|
+
},
|
|
337
|
+
{
|
|
338
|
+
"type": "null"
|
|
339
|
+
}
|
|
340
|
+
]
|
|
341
|
+
},
|
|
342
|
+
"playwright": {
|
|
343
|
+
"anyOf": [
|
|
344
|
+
{
|
|
345
|
+
"$ref": "#/definitions/FrameworkToggle"
|
|
346
|
+
},
|
|
347
|
+
{
|
|
348
|
+
"type": "null"
|
|
349
|
+
}
|
|
350
|
+
]
|
|
351
|
+
},
|
|
352
|
+
"remix": {
|
|
353
|
+
"anyOf": [
|
|
354
|
+
{
|
|
355
|
+
"$ref": "#/definitions/FrameworkToggle"
|
|
356
|
+
},
|
|
357
|
+
{
|
|
358
|
+
"type": "null"
|
|
359
|
+
}
|
|
360
|
+
]
|
|
361
|
+
},
|
|
282
362
|
"storybook": {
|
|
283
363
|
"anyOf": [
|
|
284
364
|
{
|
|
@@ -289,6 +369,26 @@
|
|
|
289
369
|
}
|
|
290
370
|
]
|
|
291
371
|
},
|
|
372
|
+
"sveltekit": {
|
|
373
|
+
"anyOf": [
|
|
374
|
+
{
|
|
375
|
+
"$ref": "#/definitions/FrameworkToggle"
|
|
376
|
+
},
|
|
377
|
+
{
|
|
378
|
+
"type": "null"
|
|
379
|
+
}
|
|
380
|
+
]
|
|
381
|
+
},
|
|
382
|
+
"turborepo": {
|
|
383
|
+
"anyOf": [
|
|
384
|
+
{
|
|
385
|
+
"$ref": "#/definitions/FrameworkToggle"
|
|
386
|
+
},
|
|
387
|
+
{
|
|
388
|
+
"type": "null"
|
|
389
|
+
}
|
|
390
|
+
]
|
|
391
|
+
},
|
|
292
392
|
"vite": {
|
|
293
393
|
"anyOf": [
|
|
294
394
|
{
|
|
@@ -299,6 +399,16 @@
|
|
|
299
399
|
}
|
|
300
400
|
]
|
|
301
401
|
},
|
|
402
|
+
"vitepress": {
|
|
403
|
+
"anyOf": [
|
|
404
|
+
{
|
|
405
|
+
"$ref": "#/definitions/FrameworkToggle"
|
|
406
|
+
},
|
|
407
|
+
{
|
|
408
|
+
"type": "null"
|
|
409
|
+
}
|
|
410
|
+
]
|
|
411
|
+
},
|
|
302
412
|
"vitest": {
|
|
303
413
|
"anyOf": [
|
|
304
414
|
{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pruneguard",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "Repo truth engine for JS/TS monorepos",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"javascript",
|
|
@@ -43,14 +43,14 @@
|
|
|
43
43
|
}
|
|
44
44
|
},
|
|
45
45
|
"optionalDependencies": {
|
|
46
|
-
"@pruneguard/cli-darwin-arm64": "0.3.
|
|
47
|
-
"@pruneguard/cli-darwin-x64": "0.3.
|
|
48
|
-
"@pruneguard/cli-linux-arm64-gnu": "0.3.
|
|
49
|
-
"@pruneguard/cli-linux-arm64-musl": "0.3.
|
|
50
|
-
"@pruneguard/cli-linux-x64-gnu": "0.3.
|
|
51
|
-
"@pruneguard/cli-linux-x64-musl": "0.3.
|
|
52
|
-
"@pruneguard/cli-win32-arm64-msvc": "0.3.
|
|
53
|
-
"@pruneguard/cli-win32-x64-msvc": "0.3.
|
|
46
|
+
"@pruneguard/cli-darwin-arm64": "0.3.1",
|
|
47
|
+
"@pruneguard/cli-darwin-x64": "0.3.1",
|
|
48
|
+
"@pruneguard/cli-linux-arm64-gnu": "0.3.1",
|
|
49
|
+
"@pruneguard/cli-linux-arm64-musl": "0.3.1",
|
|
50
|
+
"@pruneguard/cli-linux-x64-gnu": "0.3.1",
|
|
51
|
+
"@pruneguard/cli-linux-x64-musl": "0.3.1",
|
|
52
|
+
"@pruneguard/cli-win32-arm64-msvc": "0.3.1",
|
|
53
|
+
"@pruneguard/cli-win32-x64-msvc": "0.3.1"
|
|
54
54
|
},
|
|
55
55
|
"engines": {
|
|
56
56
|
"node": ">=18.0.0"
|
package/report_schema.json
CHANGED
|
@@ -108,6 +108,20 @@
|
|
|
108
108
|
"source"
|
|
109
109
|
],
|
|
110
110
|
"properties": {
|
|
111
|
+
"framework": {
|
|
112
|
+
"description": "Framework that contributed this entrypoint, if any.",
|
|
113
|
+
"type": [
|
|
114
|
+
"string",
|
|
115
|
+
"null"
|
|
116
|
+
]
|
|
117
|
+
},
|
|
118
|
+
"heuristic": {
|
|
119
|
+
"description": "Whether this entrypoint was detected via heuristics.",
|
|
120
|
+
"type": [
|
|
121
|
+
"boolean",
|
|
122
|
+
"null"
|
|
123
|
+
]
|
|
124
|
+
},
|
|
111
125
|
"kind": {
|
|
112
126
|
"type": "string"
|
|
113
127
|
},
|
|
@@ -117,6 +131,13 @@
|
|
|
117
131
|
"profile": {
|
|
118
132
|
"type": "string"
|
|
119
133
|
},
|
|
134
|
+
"reason": {
|
|
135
|
+
"description": "Reason this entrypoint was detected.",
|
|
136
|
+
"type": [
|
|
137
|
+
"string",
|
|
138
|
+
"null"
|
|
139
|
+
]
|
|
140
|
+
},
|
|
120
141
|
"source": {
|
|
121
142
|
"type": "string"
|
|
122
143
|
},
|
|
@@ -275,6 +296,16 @@
|
|
|
275
296
|
"$ref": "#/definitions/Evidence"
|
|
276
297
|
}
|
|
277
298
|
},
|
|
299
|
+
"frameworkContext": {
|
|
300
|
+
"description": "Framework context relevant to this finding.",
|
|
301
|
+
"type": [
|
|
302
|
+
"array",
|
|
303
|
+
"null"
|
|
304
|
+
],
|
|
305
|
+
"items": {
|
|
306
|
+
"type": "string"
|
|
307
|
+
}
|
|
308
|
+
},
|
|
278
309
|
"id": {
|
|
279
310
|
"description": "Stable deterministic ID for this finding.",
|
|
280
311
|
"type": "string"
|
|
@@ -327,6 +358,16 @@
|
|
|
327
358
|
"null"
|
|
328
359
|
]
|
|
329
360
|
},
|
|
361
|
+
"trustNotes": {
|
|
362
|
+
"description": "Trust-related notes for this finding.",
|
|
363
|
+
"type": [
|
|
364
|
+
"array",
|
|
365
|
+
"null"
|
|
366
|
+
],
|
|
367
|
+
"items": {
|
|
368
|
+
"type": "string"
|
|
369
|
+
}
|
|
370
|
+
},
|
|
330
371
|
"workspace": {
|
|
331
372
|
"description": "Workspace this finding belongs to, if applicable.",
|
|
332
373
|
"type": [
|
|
@@ -365,6 +406,32 @@
|
|
|
365
406
|
"info"
|
|
366
407
|
]
|
|
367
408
|
},
|
|
409
|
+
"FrameworkConfidenceCounts": {
|
|
410
|
+
"description": "Breakdown of framework detection confidence levels.",
|
|
411
|
+
"type": "object",
|
|
412
|
+
"required": [
|
|
413
|
+
"exact",
|
|
414
|
+
"heuristic",
|
|
415
|
+
"unsupported"
|
|
416
|
+
],
|
|
417
|
+
"properties": {
|
|
418
|
+
"exact": {
|
|
419
|
+
"type": "integer",
|
|
420
|
+
"format": "uint",
|
|
421
|
+
"minimum": 0.0
|
|
422
|
+
},
|
|
423
|
+
"heuristic": {
|
|
424
|
+
"type": "integer",
|
|
425
|
+
"format": "uint",
|
|
426
|
+
"minimum": 0.0
|
|
427
|
+
},
|
|
428
|
+
"unsupported": {
|
|
429
|
+
"type": "integer",
|
|
430
|
+
"format": "uint",
|
|
431
|
+
"minimum": 0.0
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
},
|
|
368
435
|
"Inventories": {
|
|
369
436
|
"description": "Inventories of discovered entities.",
|
|
370
437
|
"type": "object",
|
|
@@ -521,6 +588,13 @@
|
|
|
521
588
|
"format": "uint",
|
|
522
589
|
"minimum": 0.0
|
|
523
590
|
},
|
|
591
|
+
"compatibilityWarnings": {
|
|
592
|
+
"description": "Compatibility warnings from framework detection.",
|
|
593
|
+
"type": "array",
|
|
594
|
+
"items": {
|
|
595
|
+
"type": "string"
|
|
596
|
+
}
|
|
597
|
+
},
|
|
524
598
|
"confidenceCounts": {
|
|
525
599
|
"$ref": "#/definitions/ConfidenceCounts"
|
|
526
600
|
},
|
|
@@ -578,6 +652,26 @@
|
|
|
578
652
|
"format": "uint",
|
|
579
653
|
"minimum": 0.0
|
|
580
654
|
},
|
|
655
|
+
"frameworkConfidenceCounts": {
|
|
656
|
+
"description": "Framework confidence breakdown.",
|
|
657
|
+
"default": {
|
|
658
|
+
"exact": 0,
|
|
659
|
+
"heuristic": 0,
|
|
660
|
+
"unsupported": 0
|
|
661
|
+
},
|
|
662
|
+
"allOf": [
|
|
663
|
+
{
|
|
664
|
+
"$ref": "#/definitions/FrameworkConfidenceCounts"
|
|
665
|
+
}
|
|
666
|
+
]
|
|
667
|
+
},
|
|
668
|
+
"frameworksDetected": {
|
|
669
|
+
"description": "Frameworks detected during analysis.",
|
|
670
|
+
"type": "array",
|
|
671
|
+
"items": {
|
|
672
|
+
"type": "string"
|
|
673
|
+
}
|
|
674
|
+
},
|
|
581
675
|
"fullScopeRequired": {
|
|
582
676
|
"type": "boolean"
|
|
583
677
|
},
|
|
@@ -591,6 +685,20 @@
|
|
|
591
685
|
"format": "uint",
|
|
592
686
|
"minimum": 0.0
|
|
593
687
|
},
|
|
688
|
+
"heuristicEntrypoints": {
|
|
689
|
+
"description": "Number of entrypoints added by heuristic detection.",
|
|
690
|
+
"default": 0,
|
|
691
|
+
"type": "integer",
|
|
692
|
+
"format": "uint",
|
|
693
|
+
"minimum": 0.0
|
|
694
|
+
},
|
|
695
|
+
"heuristicFrameworks": {
|
|
696
|
+
"description": "Frameworks detected via heuristics (lower confidence).",
|
|
697
|
+
"type": "array",
|
|
698
|
+
"items": {
|
|
699
|
+
"type": "string"
|
|
700
|
+
}
|
|
701
|
+
},
|
|
594
702
|
"indexAgeMs": {
|
|
595
703
|
"description": "Age of the reused graph index in milliseconds.",
|
|
596
704
|
"type": [
|
|
@@ -650,6 +758,11 @@
|
|
|
650
758
|
"format": "uint",
|
|
651
759
|
"minimum": 0.0
|
|
652
760
|
},
|
|
761
|
+
"strictTrustApplied": {
|
|
762
|
+
"description": "Whether strict trust mode was applied.",
|
|
763
|
+
"default": false,
|
|
764
|
+
"type": "boolean"
|
|
765
|
+
},
|
|
653
766
|
"suppressedFindings": {
|
|
654
767
|
"type": "integer",
|
|
655
768
|
"format": "uint",
|
|
@@ -764,6 +877,13 @@
|
|
|
764
877
|
"type": "integer",
|
|
765
878
|
"format": "uint",
|
|
766
879
|
"minimum": 0.0
|
|
880
|
+
},
|
|
881
|
+
"workspaceExportsMiss": {
|
|
882
|
+
"description": "Subpath not declared in a workspace package's `exports` map.",
|
|
883
|
+
"default": 0,
|
|
884
|
+
"type": "integer",
|
|
885
|
+
"format": "uint",
|
|
886
|
+
"minimum": 0.0
|
|
767
887
|
}
|
|
768
888
|
}
|
|
769
889
|
},
|
|
@@ -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
|
}
|