@vantageos/backend-doctor 0.2.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 +57 -4
- package/dist/args.d.ts +1 -1
- package/dist/args.js +19 -1
- package/dist/build-stamp.json +2 -2
- package/dist/caller-resolution.js +11 -8
- package/dist/cli.js +164 -15
- package/dist/contract.d.ts +25 -7
- package/dist/contract.js +52 -7
- package/dist/coverage.d.ts +1 -1
- package/dist/coverage.js +2 -2
- package/dist/detectors/oracle-axis1.js +5 -4
- package/dist/detectors/oracle-axis2.d.ts +6 -0
- package/dist/detectors/oracle-axis2.js +32 -16
- package/dist/detectors/predicates.js +12 -3
- package/dist/detectors/shared.js +3 -2
- package/dist/detectors/source/_ast.d.ts +92 -0
- package/dist/detectors/source/_ast.js +353 -0
- package/dist/detectors/source/_scan.js +4 -3
- package/dist/detectors/source/backfill.js +62 -17
- package/dist/detectors/source/contract.js +21 -13
- package/dist/detectors/source/credential-hygiene.d.ts +11 -0
- package/dist/detectors/source/credential-hygiene.js +619 -0
- package/dist/detectors/source/cross-tenant-write.d.ts +46 -0
- package/dist/detectors/source/cross-tenant-write.js +1408 -0
- package/dist/detectors/source/guard-helper-flow.d.ts +22 -0
- package/dist/detectors/source/guard-helper-flow.js +49 -6
- package/dist/detectors/source/identity-by-id.d.ts +80 -0
- package/dist/detectors/source/identity-by-id.js +1783 -0
- package/dist/detectors/source/identity.d.ts +8 -1
- package/dist/detectors/source/identity.js +364 -35
- package/dist/detectors/source/jobs.js +13 -2
- package/dist/detectors/source/lifecycle.js +14 -2
- package/dist/detectors/source/local-identity.d.ts +26 -0
- package/dist/detectors/source/local-identity.js +666 -0
- package/dist/detectors/source/narrow-then-bound.d.ts +11 -0
- package/dist/detectors/source/narrow-then-bound.js +571 -0
- package/dist/detectors/source/package-principal.d.ts +9 -0
- package/dist/detectors/source/package-principal.js +177 -0
- package/dist/detectors/source/r6-shapes.d.ts +20 -0
- package/dist/detectors/source/r6-shapes.js +285 -0
- package/dist/detectors/source/readbudget.js +291 -0
- package/dist/detectors/source/recipient-by-id.d.ts +40 -0
- package/dist/detectors/source/recipient-by-id.js +1108 -0
- package/dist/detectors/source/refusal.d.ts +14 -0
- package/dist/detectors/source/refusal.js +75 -2
- package/dist/detectors/source/security.js +455 -26
- package/dist/detectors/source/service-account-claim.d.ts +15 -0
- package/dist/detectors/source/service-account-claim.js +491 -0
- package/dist/detectors/source/writesafety.js +27 -14
- package/dist/detectors/standard/_doc.d.ts +1 -1
- package/dist/detectors/standard/_doc.js +5 -4
- package/dist/detectors/standard/r41-frontier.js +3 -2
- package/dist/detectors/standard/r46-returns-validator.js +3 -2
- package/dist/detectors/structural.d.ts +6 -7
- package/dist/detectors/structural.js +75 -43
- package/dist/not-checkable.d.ts +1 -1
- package/dist/not-checkable.js +12 -0
- package/dist/registry.d.ts +1 -1
- package/dist/registry.js +55 -3
- package/dist/rule-class.d.ts +85 -0
- package/dist/rule-class.js +218 -0
- package/dist/tally.d.ts +13 -5
- package/dist/tally.js +14 -6
- package/dist/violation-count.d.ts +48 -0
- package/dist/violation-count.js +94 -0
- package/fixtures/backend-standard-2825122.md +722 -0
- package/fixtures/backend-standard-4dcd3e0.md +722 -0
- package/fixtures/backend-standard-bacc54a.md +785 -0
- package/fixtures/rule-classes-bacc54a.json +244 -0
- package/package.json +1 -1
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
{
|
|
2
|
+
"standard_sha": "bacc54a53d5f6f9f20e5254908e2b46807902faa",
|
|
3
|
+
"standard_file": "fixtures/backend-standard-bacc54a.md",
|
|
4
|
+
"about": "Per-rule gate class for the deploy gate's mechanical_violations count. mechanical = a detector decides it by deterministic code over the source or the oracle; judgement = it needs a human reading or a written justification the detector cannot verify. DATA, never TS logic: src/rule-class.ts loads this file and cross-checks every R- entry against the pinned standard's own build kind (section 15 table, which at bacc54a lists all 56 rules; the '*kind:*' Detector-spec token is the fallback for a rule the table omits) through standard_kind_to_class. A sidecar class that disagrees with the standard, or a rule with no entry, is could-not-judge: the CLI names it and the evidence file carries mechanical_violations = null, never a defaulted count.",
|
|
5
|
+
"standard_kind_to_class": {
|
|
6
|
+
"mechanical": "mechanical",
|
|
7
|
+
"judgement": "judgement",
|
|
8
|
+
"process": "judgement"
|
|
9
|
+
},
|
|
10
|
+
"rules": {
|
|
11
|
+
"R-1": {
|
|
12
|
+
"class": "mechanical",
|
|
13
|
+
"basis": "oracle `surface` cell is one of three closed values"
|
|
14
|
+
},
|
|
15
|
+
"R-2": {
|
|
16
|
+
"class": "mechanical",
|
|
17
|
+
"basis": "oracle verb is in the closed set and never `rpc`"
|
|
18
|
+
},
|
|
19
|
+
"R-3": {
|
|
20
|
+
"class": "mechanical",
|
|
21
|
+
"basis": "oracle cursor/default/max cells are present and numeric"
|
|
22
|
+
},
|
|
23
|
+
"R-4": {
|
|
24
|
+
"class": "mechanical",
|
|
25
|
+
"basis": "oracle retrieval mechanism is in the indexed set"
|
|
26
|
+
},
|
|
27
|
+
"R-5": {
|
|
28
|
+
"class": "mechanical",
|
|
29
|
+
"basis": "oracle reader tier is one of five"
|
|
30
|
+
},
|
|
31
|
+
"R-6": {
|
|
32
|
+
"class": "mechanical",
|
|
33
|
+
"basis": "standard s15 (ElPi-Corp #225): argument-derived boundary traced through the handler; flagged row with no JUSTIFIED token is non-conforming"
|
|
34
|
+
},
|
|
35
|
+
"R-7": {
|
|
36
|
+
"class": "mechanical",
|
|
37
|
+
"basis": "INCOHERENT flag without a written JUSTIFIED token is decided by a token match (s23)"
|
|
38
|
+
},
|
|
39
|
+
"R-8": {
|
|
40
|
+
"class": "mechanical",
|
|
41
|
+
"basis": "AUCUN scope on a data op without a STATELESS/JUSTIFIED token is decided by a token match (s23)"
|
|
42
|
+
},
|
|
43
|
+
"R-9": {
|
|
44
|
+
"class": "mechanical",
|
|
45
|
+
"basis": "oracle token-cost cell is a number, not a placeholder"
|
|
46
|
+
},
|
|
47
|
+
"R-10": {
|
|
48
|
+
"class": "mechanical",
|
|
49
|
+
"basis": "writer tier present, distinct, one of five in the side-car"
|
|
50
|
+
},
|
|
51
|
+
"R-11": {
|
|
52
|
+
"class": "mechanical",
|
|
53
|
+
"basis": "standard s15 (ElPi-Corp #225): in-handler post-query scope filter with no withIndex on the key, decided by a token match"
|
|
54
|
+
},
|
|
55
|
+
"R-12": {
|
|
56
|
+
"class": "mechanical",
|
|
57
|
+
"basis": "indexed-vector row declares a namespace and a numeric topK"
|
|
58
|
+
},
|
|
59
|
+
"R-13": {
|
|
60
|
+
"class": "mechanical",
|
|
61
|
+
"basis": "purpose non-empty and disposition in a closed set"
|
|
62
|
+
},
|
|
63
|
+
"R-14": {
|
|
64
|
+
"class": "mechanical",
|
|
65
|
+
"basis": "inventory header compared field by field against the s2 contract"
|
|
66
|
+
},
|
|
67
|
+
"R-15": {
|
|
68
|
+
"class": "judgement",
|
|
69
|
+
"basis": "standard s15 process rule: reconciliation of a new term is a delivery-gate reading"
|
|
70
|
+
},
|
|
71
|
+
"R-16": {
|
|
72
|
+
"class": "judgement",
|
|
73
|
+
"basis": "standard s15: error shape is mechanical, whether the remedy is followable is human"
|
|
74
|
+
},
|
|
75
|
+
"R-17": {
|
|
76
|
+
"class": "judgement",
|
|
77
|
+
"basis": "standard s15: additivity is a heuristic, reversibility soundness is human"
|
|
78
|
+
},
|
|
79
|
+
"R-18": {
|
|
80
|
+
"class": "judgement",
|
|
81
|
+
"basis": "standard s15: key presence is mechanical, key correctness is human"
|
|
82
|
+
},
|
|
83
|
+
"R-19": {
|
|
84
|
+
"class": "judgement",
|
|
85
|
+
"basis": "standard s15: retention/delete path is mechanical, cascade completeness is human"
|
|
86
|
+
},
|
|
87
|
+
"R-20": {
|
|
88
|
+
"class": "judgement",
|
|
89
|
+
"basis": "standard s15: bounds are mechanical, idempotency soundness is human"
|
|
90
|
+
},
|
|
91
|
+
"R-21": {
|
|
92
|
+
"class": "mechanical",
|
|
93
|
+
"basis": "webhook path is read for signature verification and a delivery-id key"
|
|
94
|
+
},
|
|
95
|
+
"R-22": {
|
|
96
|
+
"class": "mechanical",
|
|
97
|
+
"basis": "secret-shaped literal scan over source, responses and logs"
|
|
98
|
+
},
|
|
99
|
+
"R-23": {
|
|
100
|
+
"class": "mechanical",
|
|
101
|
+
"basis": "rate and runtime bounds are numeric or a written exception exists"
|
|
102
|
+
},
|
|
103
|
+
"R-24": {
|
|
104
|
+
"class": "mechanical",
|
|
105
|
+
"basis": "bulk-write default dry-run and confirm flag read from source"
|
|
106
|
+
},
|
|
107
|
+
"R-25": {
|
|
108
|
+
"class": "judgement",
|
|
109
|
+
"basis": "standard s15: org-binding/expiry are mechanical, the both-ends check is human"
|
|
110
|
+
},
|
|
111
|
+
"R-26": {
|
|
112
|
+
"class": "judgement",
|
|
113
|
+
"basis": "standard s15: seam declaration is mechanical, library trust is a human justification"
|
|
114
|
+
},
|
|
115
|
+
"R-27": {
|
|
116
|
+
"class": "mechanical",
|
|
117
|
+
"basis": "named survivor resolves to a tool in the current inventory"
|
|
118
|
+
},
|
|
119
|
+
"R-28": {
|
|
120
|
+
"class": "mechanical",
|
|
121
|
+
"basis": "non-conforming tool carries a CORRIGER/REVOIR remediation, not a placeholder"
|
|
122
|
+
},
|
|
123
|
+
"R-29": {
|
|
124
|
+
"class": "mechanical",
|
|
125
|
+
"basis": "standard s15 (ElPi-Corp #225): action-orchestrated writes found from source; a flagged row with no JUSTIFIED token is non-conforming"
|
|
126
|
+
},
|
|
127
|
+
"R-30": {
|
|
128
|
+
"class": "mechanical",
|
|
129
|
+
"basis": "declared max present and below the platform limit, read from source"
|
|
130
|
+
},
|
|
131
|
+
"R-31": {
|
|
132
|
+
"class": "mechanical",
|
|
133
|
+
"basis": "bulk op batches reads and writes with take/paginate + self-schedule, read from source"
|
|
134
|
+
},
|
|
135
|
+
"R-32": {
|
|
136
|
+
"class": "judgement",
|
|
137
|
+
"basis": "standard s15 process rule: a real-deployment proof is checked at the delivery gate"
|
|
138
|
+
},
|
|
139
|
+
"R-33": {
|
|
140
|
+
"class": "mechanical",
|
|
141
|
+
"basis": "standard s15 (ElPi-Corp #225): caller-influenced outbound call-site inventory; a flagged row with no JUSTIFIED token is non-conforming"
|
|
142
|
+
},
|
|
143
|
+
"R-34": {
|
|
144
|
+
"class": "mechanical",
|
|
145
|
+
"basis": "standard s15 (ElPi-Corp #225): forwarded caller-token / missing audience-assert grep; a flagged row with no JUSTIFIED token is non-conforming"
|
|
146
|
+
},
|
|
147
|
+
"R-35": {
|
|
148
|
+
"class": "mechanical",
|
|
149
|
+
"basis": "standard s15 (ElPi-Corp #225): third-party content spliced into an instruction position; a flagged row with no JUSTIFIED token is non-conforming"
|
|
150
|
+
},
|
|
151
|
+
"R-36": {
|
|
152
|
+
"class": "mechanical",
|
|
153
|
+
"basis": "lockfile pins every dependency and publish carries provenance"
|
|
154
|
+
},
|
|
155
|
+
"R-37": {
|
|
156
|
+
"class": "mechanical",
|
|
157
|
+
"basis": "pairwise filled-neighbour compare plus a justification-token match (s23)"
|
|
158
|
+
},
|
|
159
|
+
"R-38": {
|
|
160
|
+
"class": "mechanical",
|
|
161
|
+
"basis": "thirteen s2 fields present per table within their vocabulary"
|
|
162
|
+
},
|
|
163
|
+
"R-39": {
|
|
164
|
+
"class": "judgement",
|
|
165
|
+
"basis": "standard s15: the mechanism is named mechanically, its current guarantee is a delivery-gate reading"
|
|
166
|
+
},
|
|
167
|
+
"R-40": {
|
|
168
|
+
"class": "mechanical",
|
|
169
|
+
"basis": "two backends' shared fields compared with a justification-token match (s23)"
|
|
170
|
+
},
|
|
171
|
+
"R-41": {
|
|
172
|
+
"class": "mechanical",
|
|
173
|
+
"basis": "every cited S-/C- identifier resolves in the vendored sibling document"
|
|
174
|
+
},
|
|
175
|
+
"R-42": {
|
|
176
|
+
"class": "judgement",
|
|
177
|
+
"basis": "standard s15 process rule: un-routed subjects are a delivery-gate reading"
|
|
178
|
+
},
|
|
179
|
+
"R-43": {
|
|
180
|
+
"class": "judgement",
|
|
181
|
+
"basis": "standard s15: whether a missing delete is an accepted choice is human"
|
|
182
|
+
},
|
|
183
|
+
"R-44": {
|
|
184
|
+
"class": "judgement",
|
|
185
|
+
"basis": "standard s15: whether the backfill reaches every pre-write row is human"
|
|
186
|
+
},
|
|
187
|
+
"R-45": {
|
|
188
|
+
"class": "judgement",
|
|
189
|
+
"basis": "standard s15: whether the fixture truly reaches the pre-migration state is human"
|
|
190
|
+
},
|
|
191
|
+
"R-46": {
|
|
192
|
+
"class": "mechanical",
|
|
193
|
+
"basis": "returns-validator field set compared to the schema's writable fields"
|
|
194
|
+
},
|
|
195
|
+
"R-47": {
|
|
196
|
+
"class": "judgement",
|
|
197
|
+
"basis": "standard s15: which remedy (refusal, index, bound) is right is human"
|
|
198
|
+
},
|
|
199
|
+
"R-48": {
|
|
200
|
+
"class": "judgement",
|
|
201
|
+
"basis": "standard s15: whether an unreachable row is a deliberate lock is human"
|
|
202
|
+
},
|
|
203
|
+
"R-50": {
|
|
204
|
+
"class": "mechanical",
|
|
205
|
+
"basis": "standard s15 row R-50 mechanical: org throw vs fail-closed resolver read from source"
|
|
206
|
+
},
|
|
207
|
+
"R-51": {
|
|
208
|
+
"class": "mechanical",
|
|
209
|
+
"basis": "standard s15 row R-51 mechanical: the two readable absences are read from source"
|
|
210
|
+
},
|
|
211
|
+
"R-52": {
|
|
212
|
+
"class": "mechanical",
|
|
213
|
+
"basis": "standard s15 row R-52: tenant-column test, caller-choosable selector trace and a server-stamped tenant guard read from source; no token exit"
|
|
214
|
+
},
|
|
215
|
+
"R-53": {
|
|
216
|
+
"class": "mechanical",
|
|
217
|
+
"basis": "standard s15 row R-53: principal source, ID-vs-name admission predicate, unresolved branch and local identity layer read from source; no token exit"
|
|
218
|
+
},
|
|
219
|
+
"R-54": {
|
|
220
|
+
"class": "mechanical",
|
|
221
|
+
"basis": "standard s15 row R-54: a door that resolves its caller through the scope resolver is read for a claim argument and a refusal of the claimless service-account call; exits listed; no other token exit"
|
|
222
|
+
},
|
|
223
|
+
"R-55": {
|
|
224
|
+
"class": "mechanical",
|
|
225
|
+
"basis": "standard s15 row R-55: a caller-dependent predicate or an aggregate applied after the bound of a read is read from source; no token exit"
|
|
226
|
+
},
|
|
227
|
+
"R-56": {
|
|
228
|
+
"class": "mechanical",
|
|
229
|
+
"basis": "standard s15 row R-56: credential storage, refresh-token consumption, bearer mint revocation and verification-token matching read from source; no token exit"
|
|
230
|
+
},
|
|
231
|
+
"R-57": {
|
|
232
|
+
"class": "mechanical",
|
|
233
|
+
"basis": "standard s15 row R-57: a function defining an identity primitive of any of five kinds, ceiling zero; measured and reported under the doctor-owned key CR-2 (src/not-checkable.ts names why), so it is never counted twice"
|
|
234
|
+
},
|
|
235
|
+
"CR-1": {
|
|
236
|
+
"class": "mechanical",
|
|
237
|
+
"basis": "doctor-owned: a FAIL-OPEN or unjustified NO-IDENTITY registration is classified from source; not in the standard, so no cross-check"
|
|
238
|
+
},
|
|
239
|
+
"CR-2": {
|
|
240
|
+
"class": "mechanical",
|
|
241
|
+
"basis": "doctor-owned: a function outside @vantageos/cloud-identity that resolves a caller to a tenant, asserts membership, filters by caller scope, validates a credential or identifies an agent by name is classified from source (AST); ceiling 0; the standard at bacc54a numbers this rule R-57, the key stays CR-2 for the deploy-gate baseline; non-R id, so no cross-check"
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vantageos/backend-doctor",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "A conformance instrument that measures the VantagePeers backend against the pinned backend standard. The THIRD doctor built ON the @vantageos/mcp-doctor engine — never a third engine. It consumes runDoctor/renderTable and adds only detectors.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/cli.js",
|