方針を決めたい:任意オリジンの JS 実行・public の置き物・拡大の禁止・bubble-space との関係

Open
#205 0 comments 0 reactions 1 assignee View on GitHub

Maintainers usually reply within 12 days

@ninjamasa is already working on this.

Since Oct 7, 2026.

Assessment

This issue has not been assessed yet.

Description

OS question

実装を直す前に、方針として決めたいものです。

1. 任意オリジンの JS を無確認で実行し、以後の起動でも自動で再実行する

  • 場所:apps/bublys-os/app/launcher/BublyLoaderBubble.tsx:66-84、BublyOriginStore.ts
  • 良い点:読み込み元は利用者の入力だけで、URL や postMessage から来る経路は無い(grep で確認)
  • 気になる点:
    • 許可リストも、「このオリジンのコードは OS の全データに触れる」という警告も無い
    • bublys.loaded-bubly-origins は起動のたびに cache-bust 付きで取り直して実行するので、同一オリジン上の何か(読み込み済みのバブリ自身も含む)が localStorage に 1 行書ければ、恒久的にコードを実行できる。配信側が差し替えれば、利用者の同意なしに中身が変わる
    • スキームを省くと http:// を補う。https 配信の本番では mixed content でブロックされ、http では改ざんされ得る
    • 入力をそのまま残す候補(bublyOriginCandidates の raw)には data: URL なども通る
  • 決めること:プラグインの仕組みとして、同意・警告・許可リストをどこまで持つか

2. 本番に出す必要の無いページ

  • apps/bublys-os/public/ の bubble-layout-v6.html(16k 行)・z-or-not.html(14k 行)・bubble-layout-lab.html(2k 行)、合計約 1.5MB。fb80c11e で入れたあと未更新のビルド済み成果物で、生成元のスクリプトもリンクも無い。危険な読み込みは無いが、本番の同一オリジンで配信され、ライブラリと食い違ったまま古くなる
  • app/shore-fit(検証台)と app/bubble-layout(静的な bubbleRoutes を使うので、動的に読んだバブリは出ない)も本番ルートとして公開されている
  • 決めること:docs/ へ移すか、開発時だけのルートにするか

3. ブラウザの拡大を切っている

  • apps/bublys-os/app/layout.tsx の viewport が userScalable: false, maximumScale: 1。意図は注釈にある(100vh に貼り付いた 1 枚の場で、ピンチは海の操作に使う)が、アクセシビリティ(ピンチでの拡大)を潰している
  • 決めること:このまま行くか、拡大の代わりになる口を用意するか

4. bublys-libs/bubble-space(DOM 版)との関係

  • bubble-layout 系は、その後継の実装(docs/bubble-space-prototype/DECISIONS.md で 9/19 以降の決定を引き継いでいる)
  • 手元の bublys-libs/bubble-space は dist だけが残った抜け殻(git では追跡されていない)
  • 決めること:どちらを正とするかを README / CLAUDE.md に明示する
Dominant language
TypeScript
Stars
1
Forks
0
Avg merge
9d 13h
Merged PRs (30d)
10

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from fumicode/bublys-org

All issues in fumicode/bublys-org

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.