Repository navigation
feat: dApp Store readiness, security-audit fixes and dependency updates - #13
Merged
Merged
Conversation
Both deploy targets serve the client with script-src 'self'. Zod 4 probes for eval with a caught `new Function` when it first builds an object schema, and Chrome reports that probe as a CSP violation and a console error on every page, the live rehearsal included. Configure Zod as jitless before any schema module loads; parsing behaves the same and the probe never runs. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01JHDgeGLvKoi7gnFqUbJ1sw
Add /privacy and /terms as real client routes. Both deploy targets read the one route list, so the static rehearsal's Vercel rewrite and the Express server serve them as pages, and the documents keep the rehearsal's connect-src 'none' policy: they render from static text and need no network. The privacy policy describes what the code does today: the public site's single localStorage key and service-worker cache, the Android shell, and what a live operator deployment stores (Argon2id-checked sessions in express-session, per-IP sign-in counts, the SQLite journal of policies, receipts and mandates, payment records with wallet addresses and signatures) and which services receive data (RPC provider, x402 facilitator, OpenAI when configured). It covers retention, the backup and restore runbook, security, 18+, changes and contact. The terms describe a developer tool for an operator's own dedicated payer, quote the threat model on application-enforced limits, and carry the Solana dApp Store Developer Agreement section 10.6 clause. The site footer now renders once for every page, the walkthrough, policy lab and console included, with a legal row linking both pages. The contact is VITE_SUPPORT_EMAIL when set at build time, otherwise the GitHub issue tracker. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01JHDgeGLvKoi7gnFqUbJ1sw
… guide The APK declared 86 locales, all from AndroidX libraries the app never translates. Add the AGP 9 locale filter and an explicit values-en resource, so aapt2 now reports only `'--_--' 'en'`: the default configuration and English. The resource table shrinks from 483 KB to 34 KB. docs/seeker-and-pwa.md named WEB_SHELL_KEYSTORE_PASSWORD and WEB_SHELL_KEY_PASSWORD, which Gradle never reads. Replace them with the route the build script accepts, verified with a throwaway key: passwords in the environment, the keystore path and alias as Gradle properties. Warn that a missing property still builds, but writes an unsigned APK. Replace the /rwa deep-link example with Allowance routes, update the dApp Store facts (Portal, KYC/KYB, extension wallet, fees, signed APK, text and graphic limits, review time), record the download gap, and add the store listing decision. The privacy policy now states the shell's permissions as aapt2 reports them. A test keeps the filter and the documented property names in step with the build. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01JHDgeGLvKoi7gnFqUbJ1sw
docs/dapp-store/listing.md holds paste-ready listing text within the Portal limits (name 9 of 25 characters, subtitle 24 of 30, a description that presents the app as a no-spend rehearsal plus a self-hosted operator console), the links, contact, language, token, copyright and country answers, reviewer notes, and the recommendation to hold the listing until a live server exists. The 1200 x 600 banner is composed in banner.html from the brand fonts, the A mark and the sky art plate, and repeats the landing page's own policy plan. The six 1080 x 1920 screenshots come from the live site at a 360 x 640 viewport, scale 3, with phone emulation and the service worker blocked: the landing page, the policy lab after an edit, the walkthrough paused mid-run, its completed receipt, the developer guide and the console workspace. `npm run store:kit` regenerates both and fails if a file is the wrong size, a screenshot reaches 3 MB or the brand fonts did not load. A test checks the committed sizes, the listing limits and that every public-site link in the kit and the Seeker guide is a page the site serves. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01JHDgeGLvKoi7gnFqUbJ1sw
Allowance is not entered in CLOCK IN, so the listing decision no longer cites its prize rule as a reason to list before a live server exists. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01JHDgeGLvKoi7gnFqUbJ1sw
The footer check loaded eleven pages inside one test, so on a slow runner the shared 60-second budget ran out before the last pages loaded. One test per page gives each load its own budget and names the page that lost its links. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01JHDgeGLvKoi7gnFqUbJ1sw
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
These projects are not entered in Solana Mobile × RadiantsDAO CLOCK IN, so the store guide no longer frames the listing as a prize requirement or keeps the hackathon checklist. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01JHDgeGLvKoi7gnFqUbJ1sw
The Android shell no longer allows backup, so the WebView's session and local storage are not copied to Google or to a new phone; the privacy page's "What stays on your device" section is now true in the app as well. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01JHDgeGLvKoi7gnFqUbJ1sw
Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01JHDgeGLvKoi7gnFqUbJ1sw
…loads, stop mixed content The Web Shell template handed every link to startActivity without a catch, so a phone with no wallet or mail app closed the app the moment Use my wallet or a support link was tapped, and intent: URLs were started with their component intact. Downloads were dropped entirely, so the JSON and CSV exports did nothing on a Seeker. - LinkOpener catches every launch and shows a short message instead of crashing. intent: URLs lose component, selector, extras and URI grants and must be BROWSABLE. Only https, mailto, solana-wallet and intent leave the shell; everything else is blocked. - WebShellDownloads saves https downloads through DownloadManager and blob: and data: downloads through a two-method page bridge that only creates new files under Downloads. - Mixed content is never allowed (localhost stays a secure context for Mobile Wallet Adapter), third-party cookies and file or content access are off, and popups need a user gesture. - Backup and data-extraction rules exclude everything explicitly instead of the template stubs. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01JHDgeGLvKoi7gnFqUbJ1sw
The direct rail accepted any 32-byte base58 string as a recipient and created an associated token account for it, so a token-account address or the USDC mint pasted as a recipient would send funds to an account nobody can sign for. readTransferPreconditions now reads the recipient account itself and refuses token accounts (Token and Token-2022), mints and executable programs; any other program-owned account is refused unless an administrator approval carried the new allowProgramOwnedRecipient flag, which is part of the signed approval text, defaults to off, is stored with the recipient and is read again before every payment. The refusal stays on the released receipt (HTTP 409 DIRECT_RECIPIENT_ACCOUNT, MCP RECIPIENT_REJECTED), the signing script gained --allow-program-owned, and the mandate form says a recipient is a wallet address, not a token account. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01JHDgeGLvKoi7gnFqUbJ1sw
The stdio bridge built both payment services with the payer key inside the agent client's process tree. It now runs its runtime without any key source (PAYER_SECRET_FILE and PAYER_SECRET_JSON are blanked in its configuration and removed from its environment) and forwards every paid tool, execute_guarded_payment and the x402 purchases, to the backend over two new loopback routes, POST /api/bridge/mandates/:id/payments and POST /api/bridge/runs/:id/purchases. Those routes authenticate with the shared MCP_BACKEND_TOKEN (no session, cookie or CSRF token), stay off until it is set, refuse callers that came through the reverse proxy, and reuse the same DirectPaymentService and runPaidTool the operator API uses, so the ledger still checks the human grant inside each reservation and signing claim. Errors cross the boundary as a typed envelope and are rebuilt into the original classes so the agent sees the same codes as before. The bridge says on stderr where the key is; ALLOWANCE_MCP_LOCAL_SIGNER=1 restores the in-process signer for isolated local tests only, and docs/mcp.md, docs/configuration.md and .env.example now describe what is true. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01JHDgeGLvKoi7gnFqUbJ1sw
…imit /api, lock out per address Every cookie-less visit to /api/session wrote a session row, because the CSRF token for a visitor lived in the session. The token now travels in an HttpOnly cookie signed with the session secret and is echoed back in the x-csrf-token header (a signed double-submit cookie), so nothing is persisted until the operator signs in; a signed-in session keeps the session-bound token. Expired sessions and lapsed lockout counters are pruned at start and every fifteen minutes by a timer the server stops on shutdown, not only in startup recovery. express-rate-limit now fronts /api (300 requests a minute per address) and /api/login (20 per fifteen minutes) with draft-8 headers. The sign-in lockout counts per address only, so an outsider can no longer lock the operator out by exhausting a global counter, and a successful sign-in clears that address's counter. Tests cover the zero-row visitor, the forged cookie, per-address lockout, the limiters and the pruning timer. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01JHDgeGLvKoi7gnFqUbJ1sw
The x402 merchant counted every receipt row created in the last day toward its 1,000-per-day verification quota, including rows written before the facilitator verified the payment. An outsider with a throwaway key could send well-formed payloads that fail verification and fill the quota, so the operator's own runner was refused. The quota now counts only receipts whose status is past verification (verified, settling, settled, unknown); rejected payloads and verifications that never completed no longer consume it. The counting query is a named helper with a unit test over every status. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01JHDgeGLvKoi7gnFqUbJ1sw
…ub local paths .gitignore now covers *.pem, *payer*.json, *keypair*.json, id.json and *.key wherever they are written, and the !.env.example exception follows the last .env* rule so the template stays tracked while every other env file is ignored; no tracked file matches the new rules. CI gains a `secrets` job that checks out the full history and runs gitleaks-action pinned to commit ff98106e4c7b2bc287b24eaf42907196329070c7 (v2.3.9) with the read-only workflow token and PR comments off. The implementation audit no longer embeds absolute paths from the author's machine; its evidence and brand links are relative to the repository. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01JHDgeGLvKoi7gnFqUbJ1sw
Mechanical Prettier output under the repository's own .prettierrc.json: long lines in server/app.ts and server/index.ts are wrapped. No code changes. The formatter ran outside the fix commits, so this is kept apart from them. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01JHDgeGLvKoi7gnFqUbJ1sw
…devnet defaults PAYMENT_NETWORK accepted `mainnet` or `devnet` and the template defaulted to mainnet. The variable now accepts exactly `devnet` or `mainnet-beta`, the spellings Solana uses for its clusters; `mainnet` and any other variant refuse to start, so a typo can never select a cluster, while an unset value keeps the inert mainnet default in which neither payment rail can be enabled. MAINNET_PAYMENTS_ACKNOWLEDGED stays the second gate for both rails. DATA_NETWORK accepts `mainnet-beta` as well as the older `mainnet`. .env.example is now a devnet configuration with the mainnet lines commented out; render.yaml, the browser harness, the smoke-command message and the configuration, live-setup and README docs use the new spelling, and the network tests cover the refused spellings. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01JHDgeGLvKoi7gnFqUbJ1sw
robots.txt allowed crawling but named no sitemap, so the store-readiness robots audit failed. public/sitemap.xml now lists the home page and the two legal pages the listing links to, at the public origin, with the legal pages' last-updated date, and robots.txt points at it. A new test pins both files, checks every sitemap address is a route the router serves, and asserts that /privacy and /terms are rewritten to the shell with status 200 on the static rehearsal (after the filesystem phase and before the error phase) and are pages for the Node server, while the two new files stay plain files. vercel.json is unchanged: the rewrites live in the build-output route table that scripts/rehearsal-config.ts emits. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01JHDgeGLvKoi7gnFqUbJ1sw
…rk test Prettier re-wrapped two expressions after the previous edits; no behaviour changes. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01JHDgeGLvKoi7gnFqUbJ1sw
A second Next.js advisory published after 16.3.8 is fixed in 16.4.3. The other direct dependencies named by npm audit move to their patched releases where the fix stays within the current major; what remains is either the React Native chain that Mobile Wallet Adapter pulls in or has no patched release yet. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01JHDgeGLvKoi7gnFqUbJ1sw
…-out /api/session Since sessions are persisted only at sign-in, an anonymous visitor receives the signed double-submit CSRF cookie (__Host-allowance-csrf) instead of a session cookie. The container verifier still asserted the old name, so the production-image job failed on the first push of this branch. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01JHDgeGLvKoi7gnFqUbJ1sw
Patches the @vitest/mocker advisory that Dependabot opened grouped PRs for; test runner only, nothing shipped to users changes. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01JHDgeGLvKoi7gnFqUbJ1sw
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.
What this PR ships
Everything Allowance needs for its Solana dApp Store listing, plus the fixes from the 16 October 2026 security audit, in one branch. The kit's own decision (
docs/dapp-store/listing.md) is to hold the listing until a live operator server and a reviewer login exist.Store readiness (the original scope): privacy and terms pages that meet Developer Agreement §10.6, an English-only Android shell, and the listing kit under
docs/dapp-store/.Android shell hardening (
android/): every external launch is guarded, so a phone without a wallet or mail app shows a short message instead of closing the app;intent:URLs lose component, selector, extras and URI grants and must be BROWSABLE; downloads work (DownloadManager for https, a two-method page bridge forblob:anddata:); mixed content is never allowed, third-party cookies and file access are off, popups need a user gesture, and the backup rules exclude everything.Security audit fixes
allowProgramOwnedRecipient.MCP_BACKEND_TOKEN;ALLOWANCE_MCP_LOCAL_SIGNER=1restores the old behaviour deliberately./apiand/api/loginare rate-limited, and lockout is per address..gitignorecovers key-shaped files; a SHA-pinned gitleaks job runs in CI; absolute local paths are scrubbed from the docs.PAYMENT_NETWORKis exactlydevnetormainnet-beta;.env.exampledefaults to devnet.public/sitemap.xmland a robots.txt that references it; /privacy and /terms are rewritten with status 200.Dependencies:
@modelcontextprotocol/client2.3.1,@modelcontextprotocol/server2.4.0, vite 8.3.5, and body-parser, fast-uri, ip-address and proxy-addr throughnpm audit fix. The remaining advisories are on the@x402/*packages, which have no patched release.Environment and operator steps
MCP_BACKEND_TOKEN(openssl rand -hex 32) in the private.envread by both the backend and the bridge; optionalMCP_BACKEND_URL. Change any livePAYMENT_NETWORK=mainnettomainnet-beta. Re-approve a vault PDA with--allow-program-ownedif one is paid.Verification
npm run typecheck,npm run lintandnpm test(376 tests) pass;npm run buildpasses; the Android shell compiles as an unsigned release build; CI runs the production-image job and the new gitleaks job.Addendum, 25 October 2026
🤖 Generated with Claude Code
https://claude.ai/code/session_01JHDgeGLvKoi7gnFqUbJ1sw