@coderifts/sdk 3.14.2 → 3.14.3
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 +35 -1
- package/dist/cjs/execution-grant.d.ts.map +1 -1
- package/dist/cjs/execution-grant.js +3 -1
- package/dist/cjs/execution-grant.js.map +1 -1
- package/dist/cjs/generated/decision-result.v1.d.ts +14 -2
- package/dist/cjs/generated/decision-result.v1.d.ts.map +1 -1
- package/dist/cjs/generated/preflight-response.v2.d.ts +30 -14
- package/dist/cjs/generated/preflight-response.v2.d.ts.map +1 -1
- package/dist/cjs/policy.d.ts.map +1 -1
- package/dist/cjs/policy.js +1 -1
- package/dist/cjs/policy.js.map +1 -1
- package/dist/cjs/vendor/receipt-verifier/VENDOR.sha256 +15 -18
- package/dist/cjs/vendor/receipt-verifier/verify-grant.js +8 -4
- package/dist/cjs/vendor/receipt-verifier/verify.js +11 -3
- package/dist/esm/execution-grant.d.ts.map +1 -1
- package/dist/esm/execution-grant.js +3 -1
- package/dist/esm/execution-grant.js.map +1 -1
- package/dist/esm/generated/decision-result.v1.d.ts +14 -2
- package/dist/esm/generated/decision-result.v1.d.ts.map +1 -1
- package/dist/esm/generated/preflight-response.v2.d.ts +30 -14
- package/dist/esm/generated/preflight-response.v2.d.ts.map +1 -1
- package/dist/esm/policy.d.ts.map +1 -1
- package/dist/esm/policy.js +1 -1
- package/dist/esm/policy.js.map +1 -1
- package/dist/esm/vendor/receipt-verifier/VENDOR.sha256 +15 -18
- package/dist/esm/vendor/receipt-verifier/verify-grant.js +8 -4
- package/dist/esm/vendor/receipt-verifier/verify.js +11 -3
- package/package.json +1 -1
|
@@ -65,17 +65,21 @@ const V2_REQUIRED_STRINGS = Object.freeze([
|
|
|
65
65
|
*
|
|
66
66
|
* The admitted key set is closed: an unknown field is `MALFORMED/unknown_field`, which is the
|
|
67
67
|
* right default and also means a future field cannot be introduced without every deployed
|
|
68
|
-
* verifier refusing the grants that carry it. Reserving the
|
|
68
|
+
* verifier refusing the grants that carry it. Reserving the names now is what keeps that
|
|
69
69
|
* introduction from being a breaking change later.
|
|
70
70
|
*
|
|
71
71
|
* ── WHAT THEY DO NOT DO, WHICH IS THE POINT ─────────────────────────────────────────────────
|
|
72
72
|
*
|
|
73
73
|
* NOTHING. A grant carrying `call_hash` is graded EXACTLY as one without it. There is no check,
|
|
74
|
-
* no comparison, and no `intended` field they bind to.
|
|
74
|
+
* no comparison, and no `intended` field they bind to. Same for `applied_policy_hash` (1942):
|
|
75
|
+
* admitted so a later producer can emit it without every deployed verifier going MALFORMED.
|
|
76
|
+
* This verifier does not read it as the evaluated policy, does not compare it to `policy_hash`,
|
|
77
|
+
* and does not fail a grant that omits it.
|
|
75
78
|
*
|
|
76
79
|
* A VERIFIER THAT READS THEIR PRESENCE AS AUTHORIZATION IS WRONG. `call_hash` present does not
|
|
77
80
|
* mean a tool call was bound; `executor_image_digest` present does not mean an executor image was
|
|
78
|
-
* pinned
|
|
81
|
+
* pinned; `applied_policy_hash` present does not mean the evaluator's policy was bound. Nothing
|
|
82
|
+
* signs a promise that the value is true, nothing compares it to anything, and an
|
|
79
83
|
* attacker who can mint a grant can put any value in them. Presence is not proof — it is a slot.
|
|
80
84
|
*
|
|
81
85
|
* They are unsigned-by-default only in the sense that no separate signature covers them: the v2
|
|
@@ -86,7 +90,7 @@ const V2_REQUIRED_STRINGS = Object.freeze([
|
|
|
86
90
|
* When a gate for them lands it will be a NEW check with its own negative fixtures, and this
|
|
87
91
|
* comment is what a reader should be shown if anyone claims otherwise before then.
|
|
88
92
|
*/
|
|
89
|
-
const V2_RESERVED_INERT = Object.freeze(['call_hash', 'executor_image_digest']);
|
|
93
|
+
const V2_RESERVED_INERT = Object.freeze(['call_hash', 'executor_image_digest', 'applied_policy_hash']);
|
|
90
94
|
const TARGET_SCHEMES = Object.freeze(['fs', 'git', 'api', 'db', 'registry', 'deploy']);
|
|
91
95
|
const DEFAULT_FETCH_URL = 'https://app.coderifts.com/api/v1/attestation/public-key';
|
|
92
96
|
|
|
@@ -427,9 +427,17 @@ function verifyChain(tokens, second, third) {
|
|
|
427
427
|
return verifyChainInner(tokens, ctx, opts);
|
|
428
428
|
}
|
|
429
429
|
|
|
430
|
-
// Reusable API — require('./verify') imports the pure verify logic WITHOUT running the CLI
|
|
431
|
-
//
|
|
432
|
-
//
|
|
430
|
+
// Reusable API — require('./verify') imports the pure verify logic WITHOUT running the CLI; the
|
|
431
|
+
// receipt format + taxonomy are frozen in RECEIPT_FORMAT.md.
|
|
432
|
+
//
|
|
433
|
+
// WHO ACTUALLY CALLS THESE, measured across the public surface on 2026-09-13:
|
|
434
|
+
// verifyChain — cli.js:219 (--chain, with a test) and the Python verifier's public API
|
|
435
|
+
// (coderifts_verifier/_verify.py verify_chain).
|
|
436
|
+
// verifyReceipt — the contract-gate Action.
|
|
437
|
+
// The previous wording said "the GitHub Action + other embedders use these directly" and listed
|
|
438
|
+
// verifyChain first. That is false for the Action: contract-gate calls verifyReceipt and never
|
|
439
|
+
// verifyChain — its copy of this file only carries the definition. Naming the callers instead of
|
|
440
|
+
// a category keeps the claim checkable.
|
|
433
441
|
module.exports = {
|
|
434
442
|
verifyReceipt,
|
|
435
443
|
verifyChain,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coderifts/sdk",
|
|
3
|
-
"version": "3.14.
|
|
3
|
+
"version": "3.14.3",
|
|
4
4
|
"description": "Agent Governance SDK — validate API changes before tool invocations. TypeScript client for the CodeRifts API.",
|
|
5
5
|
"main": "./dist/cjs/index.js",
|
|
6
6
|
"module": "./dist/esm/index.js",
|