Repository navigation
STE-48: a licence cannot be borrowed by naming its holder - #50
Merged
Merged
Conversation
GET /use served the artifact free to any request carrying a licence
holder's X-AGENT-ADDRESS, and holders are public on chain (license_minted,
get_token, the dashboard's /licences page). The free held path and the owed
path now require proof that the caller controls that address.
- GET /use/{skill}/{version}/challenge?agent=G... issues a single-use nonce
bound to agent, skill and version, with a TTL (STERISH_PROOF_TTL_SECONDS,
default 300, clamped 30-900), and returns the exact message to sign.
- The caller signs it with SEP-53 (ed25519 over SHA-256 of "Stellar Signed
Message:\n" + message), which is what a wallet's SEP-43 signMessage and
`stellar message sign` produce, and repeats the request with
X-STERISH-PROOF-NONCE and X-STERISH-PROOF-SIGNATURE.
- Missing proof: 401 OWNERSHIP_PROOF_REQUIRED with challenge_url. Wrong
proof: 401 INVALID_OWNERSHIP_PROOF naming why. Never 402.
Decisions:
- One signature format (SEP-53) for both the browser wallet and the
terminal. A bare ed25519 signature is refused, so two clients cannot drift.
- The server rebuilds the signed text from its own nonce record.
- A failed signature does not consume the nonce, so nobody can burn
another caller's challenge; a valid one is consumed atomically.
- Nonces live beside the payments ledger so a restart cannot reopen a
used one.
- The paid path needs no separate proof: the x402 payment is signed by
the payer, and the payer comes from /verify. Documented as a known limit
that the payment header is a bearer credential until its auth expires.
Clients: demo/x402-buyer/prove.js (terminal agent, secret from env),
buy.js step 3, the e2e script (4b: seven refusal cases) and the STE-27
rehearsal step 5, which now expects the bare request to be refused and
the proven one served.
Tests: API 170 passed, 14 skipped, including a known-answer signature
captured from stellar-cli, identical to prove.js's.
E2E on testnet against a local API: real purchase of cctp; the holder
with proof 200 and bytes match content_hash; address-only, ?agent=,
another key, replayed, a stranger's proof for the holder, another
version, and an expired proof all 401 with no artifact and no challenge;
a stranger proving its own address gets 402; a second payment settles
nothing.
Axel's condition on the ACC: while production is unpatched we make a soulbound claim the API does not enforce, so it goes on the record from our side, dated, with the fix, the deploy plan (as soon as the dashboard can sign, no later than 19 Sep 2026) and the residual limit on the paid path.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Linear: STE-48 · ACC by Axel 2026-09-17 · reviewers @axelmatsama @fable
Problem
GET /useserved the artifact free to any request that named a licence holder inX-AGENT-ADDRESS. Holders are public on chain, so any licence could be borrowed.Fix
GET /use/{skill}/{version}/challenge?agent=G…issues a single-use nonce. It is bound to the agent, skill and version, and to the network passphrase inside the signed message. Default TTL is 300 s, clamped to 30–900.messagewith SEP-53: ed25519 overSHA-256("Stellar Signed Message:\n" + message). The Stellar CLI and SEP-43 wallets produce this format.X-STERISH-PROOF-NONCEandX-STERISH-PROOF-SIGNATURE.401 OWNERSHIP_PROOF_REQUIRED. Wrong proof →401 INVALID_OWNERSHIP_PROOF, with the reason indetail. Never402.Decisions
/verify). Its residual limit is stated in the spec.Clients
demo/x402-buyer/prove.js(new) andbuy.jsapi/scripts/e2e_paid_path.pyDocs
api-spec.md§3.7.audit-evidence.mdnow records the gap, dated, with the fix, the deploy plan and the residual limit.Tests
stellar message sign, byte-identical toprove.js.E2E (testnet, local API from this branch, TTL 30 s)
cctp. The holder with a proof is served, and the bytes matchcontent_hash.?agent=, a proof signed by another key, a replayed proof, a stranger's proof presented for the holder, a proof for another version, an expired proof.docs/evidence/ste-48-e2e-ownership-proof-local-2026-09-17.json.Deploy
Merged now; not deployed yet. It deploys as soon as the dashboard signing UI lands (@AncungAulia), and no later than 19 September 2026 either way. Any redeploy from
mainalso ships it.