@crediolabs/policy-synth 0.1.8 → 0.1.10
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/dist/adapters/interpreter/adapter.js +21 -3
- package/dist/adapters/oz/adapter.js +8 -0
- package/dist/ir/types.d.ts +9 -0
- package/dist/predicate/encode.js +9 -0
- package/dist/review-card/builder.js +32 -0
- package/dist/review-card/cross-check.js +40 -0
- package/dist/run/index.d.ts +8 -2
- package/dist/run/index.js +2 -1
- package/dist/run/schemas.d.ts +12 -0
- package/dist/run/schemas.js +14 -0
- package/dist/synth/compose-from-recording.js +89 -0
- package/dist/synth/deny-cases.js +89 -1
- package/dist/synth/evaluate.js +49 -0
- package/dist/synth/synthesize-from-mandate.d.ts +17 -2
- package/dist/synth/synthesize-from-mandate.js +27 -2
- package/dist/synth/synthesize-from-recording.d.ts +25 -1
- package/dist/synth/synthesize-from-recording.js +66 -1
- package/dist/types.d.ts +8 -0
- package/dist-cjs/adapters/interpreter/adapter.js +21 -3
- package/dist-cjs/adapters/oz/adapter.js +8 -0
- package/dist-cjs/ir/types.d.ts +9 -0
- package/dist-cjs/predicate/encode.js +9 -0
- package/dist-cjs/review-card/builder.js +32 -0
- package/dist-cjs/review-card/cross-check.js +40 -0
- package/dist-cjs/run/index.d.ts +8 -2
- package/dist-cjs/run/index.js +2 -1
- package/dist-cjs/run/schemas.d.ts +12 -0
- package/dist-cjs/run/schemas.js +14 -0
- package/dist-cjs/synth/compose-from-recording.js +89 -0
- package/dist-cjs/synth/deny-cases.js +89 -1
- package/dist-cjs/synth/evaluate.js +49 -0
- package/dist-cjs/synth/synthesize-from-mandate.d.ts +17 -2
- package/dist-cjs/synth/synthesize-from-mandate.js +27 -2
- package/dist-cjs/synth/synthesize-from-recording.d.ts +25 -1
- package/dist-cjs/synth/synthesize-from-recording.js +66 -1
- package/dist-cjs/types.d.ts +8 -0
- package/package.json +1 -1
- package/src/adapters/interpreter/adapter.ts +20 -4
- package/src/adapters/oz/adapter.ts +8 -0
- package/src/ir/types.ts +8 -0
- package/src/predicate/encode.ts +9 -0
- package/src/review-card/builder.ts +28 -0
- package/src/review-card/cross-check.ts +40 -0
- package/src/run/index.ts +16 -2
- package/src/run/schemas.ts +14 -0
- package/src/synth/compose-from-recording.ts +87 -0
- package/src/synth/deny-cases.ts +86 -1
- package/src/synth/evaluate.ts +41 -0
- package/src/synth/synthesize-from-mandate.ts +40 -4
- package/src/synth/synthesize-from-recording.ts +103 -4
- package/src/types.ts +10 -0
package/src/types.ts
CHANGED
|
@@ -145,6 +145,16 @@ export type PredicateLeaf =
|
|
|
145
145
|
| { kind: 'call_contract' }
|
|
146
146
|
| { kind: 'call_fn' }
|
|
147
147
|
| { kind: 'call_arg'; index: number }
|
|
148
|
+
// Length of a vec-typed argument as a u32. Binds the OUTER vec length so
|
|
149
|
+
// a caller cannot append a new element to defeat a per-element pin.
|
|
150
|
+
// Paired with `call_arg_field` per element - pinning only the field leaves
|
|
151
|
+
// an element-append vulnerability; this leaf closes it.
|
|
152
|
+
| { kind: 'call_arg_len'; index: number }
|
|
153
|
+
// Value of `field` in the map at `element` of the vec at argument `index`.
|
|
154
|
+
// Fixed-arity: index, element, field. The leaf is resolved against the
|
|
155
|
+
// recorded ScVal type. A non-vec arg, missing element, missing field, or
|
|
156
|
+
// type mismatch all DENY (fail-closed).
|
|
157
|
+
| { kind: 'call_arg_field'; index: number; element: number; field: string }
|
|
148
158
|
// `call_sub_invocation[i]` is NOT in v1 grammar. OZ `Policy::enforce`
|
|
149
159
|
// receives one `Context`, not a sub-invocation tree; sub-invocations live under
|
|
150
160
|
// `InvokerContractAuthEntry::Contract(SubContractInvocation)`, not in the
|