Skip to content

Add isolated Repository setup client - #4

Merged
Pluglug merged 5 commits into
mainfrom
website/dedicated-setup-client
Aug 10, 2026
Merged

Add isolated Repository setup client#4
Pluglug merged 5 commits into
mainfrom
website/dedicated-setup-client

Conversation

@Pluglug

@Pluglug Pluglug commented Aug 10, 2026

Copy link
Copy Markdown
Member

目的

購入証明とRepository credentialを通常websiteから分離し、専用originで既存serviceのclaim/ack authorityへ接続する静的browser clientを追加します。

変更

  • pie-menu-editor.com/setup/をpurchase dataを扱わないhandoffページへ置換
  • 実行可能なsetup clientをignored dist/setupへbuildするsource/build commandを追加
  • productionとstagingを明示targetにし、staging service origin未設定時はfail closed
  • claimとackのidempotency、8日間のretry reference、write/read-back、別tab scrub、pagehide abort/scrubを実装
  • exact delivery statusだけをDOMへ表示し、purchase key/token/recovery secretはstorage・URL・cookieへ保存しない
  • 最終生成byteからCSP hashとSRIを生成し、exact service originだけへ接続
  • WIP result/error previewとdummy credentialを削除
  • dependency-free testsとwebsite-required CIを追加

Service側のexact-origin CORSは pie-menu-editor/pie-menu-editor-service#19 にあります。

Security Review follow-up

  • response bodyを32 KiBまでstreamingで制限し、超過時にcancel
  • dedicated credential originへ1年間のHSTSを追加
  • credential表示中のpending claim選択/新規開始/破棄を禁止
  • cross-tab破棄findingを受け、必須でない手動discard機能を削除

検証

  • npm test — 13 tests green
  • git diff --check
  • production/staging buildのorigin分離とfail-closed
  • Pages local runtimeでHTML、application/javascript MIME、CSP/SRI、no-store/no-transform、COOPを確認
  • localhostなどcanonical setup origin以外ではclientが入力と送信を無効化することを確認

外部環境

このPRのコード自体はCloudflare Pages project、DNS、Worker、Neon、Gumroadをprovisionしません。review後のstaging acceptanceで、productionとは分離した専用originだけを別receiptとして配備・検証しました。

Staging acceptance receipt(2026-08-10)

  • setup: https://setup-staging.pie-menu-editor.com(専用Pages project、TLS active)
  • service: https://extensions-staging.pie-menu-editor.com(staging Worker Custom Domain)
  • exact staging buildのHTML/JS SHA-256とcustom domain上の配信byteが一致
  • CSPはstaging service originだけをconnect-srcへ許可し、private, no-store, no-transform/HSTS/COOPを確認
  • 新しいTest base purchaseでclaim成功
  • 同じbrowser retry referenceとpurchase keyでcredential delivery replay成功
  • 成功時にpurchase-key viewを隠し、credential viewへ切り替わることをWindows browserで確認
  • acknowledgement operation成功、deliveryはacknowledged、server側ciphertext/nonce破棄をread-only SQLで確認
  • production setup/service origin、apex/www、Gumroad設定、Neon設定は非変更
  • purchase key、Repository token、Recovery secret、provider sale ID、Subject IDはreceiptへ記録しない

@Pluglug

Pluglug commented Aug 10, 2026

Copy link
Copy Markdown
Member Author

@codex security review

Please review exact implementation HEAD 1d1d140. This request is intentionally security-review-only.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1d1d14071d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread credential-setup/app.source.js.txt Outdated
Comment thread tools/build-setup.mjs
Comment thread credential-setup/app.source.js.txt Outdated
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 10, 2026

Copy link
Copy Markdown

Deploying pie-menu-editor-website with  Cloudflare Pages  Cloudflare Pages

Latest commit: 6bdcd54
Status: ✅  Deploy successful!
Preview URL: https://4a7f0310.pie-menu-editor-website.pages.dev
Branch Preview URL: https://website-dedicated-setup-clie.pie-menu-editor-website.pages.dev

View logs

@Pluglug

Pluglug commented Aug 10, 2026

Copy link
Copy Markdown
Member Author

@codex security review

Please re-review exact implementation HEAD a4464c822b141957b72e49bddd67b64a2bf1f54d after resolving the three P2 findings. This request is intentionally security-review-only.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a4464c822b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread credential-setup/app.source.js.txt Outdated
@Pluglug

Pluglug commented Aug 10, 2026

Copy link
Copy Markdown
Member Author

@codex security review

Please re-review exact implementation HEAD 8d8afe2b3e592402c3896717cefd0cb7f6ce457c after removing the unsafe cross-tab discard path. This request is intentionally security-review-only.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Hooray!

Reviewed commit: 8d8afe2b3e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@Pluglug

Pluglug commented Aug 10, 2026

Copy link
Copy Markdown
Member Author

@codex security review

@chatgpt-codex-connector

Copy link
Copy Markdown

Security review completed. No security issues were found in this pull request.

Reviewed commit: ae6e52f03b

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@Pluglug

Pluglug commented Aug 10, 2026

Copy link
Copy Markdown
Member Author

@codex security review

@chatgpt-codex-connector

Copy link
Copy Markdown

Security review completed. No security issues were found in this pull request.

Reviewed commit: 6bdcd546fb

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@Pluglug
Pluglug marked this pull request as ready for review August 10, 2026 13:15
@Pluglug
Pluglug merged commit abd960e into main Aug 10, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant