diff --git a/docs/decisions/ADR-14_Elasticsearch_8_with_TLS_and_Authentication.md b/docs/decisions/ADR-14_Elasticsearch_8_with_TLS_and_Authentication.md index 4e13a4e..36e6933 100644 --- a/docs/decisions/ADR-14_Elasticsearch_8_with_TLS_and_Authentication.md +++ b/docs/decisions/ADR-14_Elasticsearch_8_with_TLS_and_Authentication.md @@ -1,11 +1,12 @@ # ADR-14 Elasticsearch 8 with TLS and Authentication / TLS と認証つきの Elasticsearch 8 -> **Summary:** osf.io's full-text search runs on Elasticsearch 8.19.24 (RDM-osf.io-dev2027 PR #11), so the installer replaces the Elasticsearch 2 service with `elasticsearch8`: the official multi-architecture image pinned by its index digest plus the two Japanese-analysis plugins, TLS with a certificate authority of the installation's own, authentication on, scripts off, no published port, and a role-limited user for osf.io (`grdm_osf`, every privilege on `website*` and `private__website*` only) created by a one-shot step. The root filesystem stays read-only: the official entrypoint writes a keystore into `config/`, so `config/` is a tmpfs that our entrypoint fills. The record also names what this change does not do: the ES 2 data is not migrated (`invoke migrate_search` rebuilds the index), and Elasticsearch 6 stays for the metrics client. -> **概要:** osf.io の全文検索は Elasticsearch 8.19.24 で動く(RDM-osf.io-dev2027 PR #11)ので、インストーラーは Elasticsearch 2 のサービスを `elasticsearch8` に替える。インデックスのダイジェストで固定した公式のマルチアーキテクチャイメージに日本語解析の二つのプラグインを足し、導入ごとの認証局による TLS、認証あり、スクリプトなし、ポート非公開とし、osf.io には権限を絞った利用者(`grdm_osf`。`website*` と `private__website*` にだけすべての権限)を一回きりの手順で作る。読み取り専用のルートは保つ。公式の entrypoint が `config/` にキーストアを書くので、`config/` は tmpfs にして自前の entrypoint が中身を入れる。この記録は、この変更がしないことも示す。ES 2 のデータは移さず(`invoke migrate_search` が索引を作り直す)、Elasticsearch 6 はメトリクスのクライアントのために残す。 +> **Summary:** osf.io's full-text search runs on Elasticsearch 8.19.24 (RDM-osf.io-dev2027 PR #11), so the installer replaces the Elasticsearch 2 service with `elasticsearch8`: the official multi-architecture image pinned by its index digest plus the two Japanese-analysis plugins, TLS with a certificate authority of the installation's own, authentication on, scripts off, no published port, and a role-limited user for osf.io (`grdm_osf`, every privilege on osf.io's own search indices only) created by a one-shot step. The root filesystem stays read-only: the official entrypoint writes a keystore into `config/`, so `config/` is a tmpfs that our entrypoint fills. The record also names what this change does not do: the ES 2 data is not migrated (`invoke migrate_search` rebuilds the index), and Elasticsearch 6 stays for the metrics client. +> **概要:** osf.io の全文検索は Elasticsearch 8.19.24 で動く(RDM-osf.io-dev2027 PR #11)ので、インストーラーは Elasticsearch 2 のサービスを `elasticsearch8` に替える。インデックスのダイジェストで固定した公式のマルチアーキテクチャイメージに日本語解析の二つのプラグインを足し、導入ごとの認証局による TLS、認証あり、スクリプトなし、ポート非公開とし、osf.io には権限を絞った利用者(`grdm_osf`。osf.io 自身の検索の索引にだけすべての権限)を一回きりの手順で作る。読み取り専用のルートは保つ。公式の entrypoint が `config/` にキーストアを書くので、`config/` は tmpfs にして自前の entrypoint が中身を入れる。この記録は、この変更がしないことも示す。ES 2 のデータは移さず(`invoke migrate_search` が索引を作り直す)、Elasticsearch 6 はメトリクスのクライアントのために残す。 **Jump:** [English](#english) · [日本語](#japanese) -- Version / 版: 0.3 — 2026-11-13. **Learned:** acceptance closes the decision, not its open points: the owner accepted this record on 2026-11-13 ("一括で承認、M2 完了") after the merged osf.io pin `90b10661c8dc` passed 14 of 14, while `elasticsearch6` for metrics and the allow-list review of the image's Ubuntu packages stay open, and from M3 any new allow-list entry must be balanced by a removal because the ceiling is the M2 count of 58. / 承認は決定を閉じるが、その未了の点は閉じない。所有者は、マージ後の osf.io の固定版 `90b10661c8dc` が 14 件中 14 件に合格した後の 2026-11-13 にこの記録を承認した(「一括で承認、M2 完了」)。メトリクスのための `elasticsearch6` と、イメージの Ubuntu パッケージの許容リストの見直しは未了のまま残る。M3 からは上限が M2 の件数 58 なので、許容リストに項目を足すには別の項目を外す必要がある。 +- Version / 版: 0.4 — 2026-11-17. **Learned:** a public record names access scopes in general terms: the index patterns of the role are described generically before publication (owner decision 2026-11-17); the role itself is unchanged. / 公開の記録では、アクセスの範囲を一般的な言葉で書く。公開前に、ロールの索引の指定を一般的な表現にした(2026-11-17 の所有者の判断)。ロールそのものは変えていない。 + 0.3 — 2026-11-13. **Learned:** acceptance closes the decision, not its open points: the owner accepted this record on 2026-11-13 ("一括で承認、M2 完了") after the merged osf.io pin `90b10661c8dc` passed 14 of 14, while `elasticsearch6` for metrics and the allow-list review of the image's Ubuntu packages stay open, and from M3 any new allow-list entry must be balanced by a removal because the ceiling is the M2 count of 58. / 承認は決定を閉じるが、その未了の点は閉じない。所有者は、マージ後の osf.io の固定版 `90b10661c8dc` が 14 件中 14 件に合格した後の 2026-11-13 にこの記録を承認した(「一括で承認、M2 完了」)。メトリクスのための `elasticsearch6` と、イメージの Ubuntu パッケージの許容リストの見直しは未了のまま残る。M3 からは上限が M2 の件数 58 なので、許容リストに項目を足すには別の項目を外す必要がある。 0.2 — 2026-11-13. **Learned:** an upgrade instruction has to be checked against the order the installer actually enforces, not against what each command does alone: `secrets rotate` changes every credential, drops a retired key and recreates containers from the Compose file as it was last rendered, so putting it before `compose render` is an unnecessary credential change that can fail or roll back before the new configuration exists; the upgrade that keeps the existing values is `secrets init --missing`, then render, build, render, up (PR #56 review r1 R1-02). / 更新の手順は、各コマンド単体の働きでなく、インストーラーが実際に求める順序に照らして確かめなければならない。`secrets rotate` はすべての資格情報を替え、廃止したキーを捨て、最後に生成した Compose ファイルのままコンテナを再作成するので、`compose render` の前に置くのは不要な資格情報の変更で、新しい設定ができる前に失敗や巻き戻しを起こしうる。既存の値を保つ更新は `secrets init --missing`、そのあと render、build、render、up である(PR #56 レビュー r1 R1-02)。 0.1 — 2026-11-12. **Learned:** a "read-only root" claim for a service is only true when its entrypoint has been run that way: Elasticsearch 8's official entrypoint writes a keystore into `config/` and its security layer reads TLS files only from `config/`, so both the tmpfs and the copy of the certificate into it had to be found by starting the image under the real hardening, not by reading its documentation. / サービスが「読み取り専用のルート」で動くという主張は、その entrypoint を実際にその条件で動かして初めて本当になる。Elasticsearch 8 の公式 entrypoint は `config/` にキーストアを書き、セキュリティ層は TLS のファイルを `config/` からしか読まないので、tmpfs と証明書の複写の両方は、文書を読むのでなく、実際の堅牢化の下でイメージを起動して初めて分かった。 - Status: Accepted by the owner, 2026-11-13 (proposed 2026-11-12, M5). Review date: when django-elasticsearch-metrics supports Elasticsearch 8 (then `elasticsearch6` goes), or at the next Elasticsearch 8 minor. @@ -28,7 +29,7 @@ The installer has to give it a server it can use under the baseline every other ### 2. Decision 1. **One image, `grdm-dev/elasticsearch8:8.19.24-1`** (`image_build`, as ADR-07 does for the other infra recipes). The base is the official `docker.elastic.co/elasticsearch/elasticsearch:8.19.24` pinned by its index digest (`sha256:d6dfe6626d64…`), which has native arm64 and amd64 variants, so nothing is compiled or emulated. The recipe adds `analysis-kuromoji` and `analysis-icu` and nothing else. -2. **Two services from it.** `elasticsearch8` is the node. `elasticsearch8_setup` is a one-shot that waits for a yellow cluster with the bootstrap superuser, then creates, by idempotent `PUT`, the role `grdm_osf` (cluster `monitor`; all privileges on `website*` and `private__website*`) and the user `grdm_osf`. osf.io receives only that user's password. The superuser's password reaches only the two elasticsearch8 services. +2. **Two services from it.** `elasticsearch8` is the node. `elasticsearch8_setup` is a one-shot that waits for a yellow cluster with the bootstrap superuser, then creates, by idempotent `PUT`, the role `grdm_osf` (cluster `monitor`; all privileges on osf.io's own search indices; the exact patterns are in the installer) and the user `grdm_osf`. osf.io receives only that user's password. The superuser's password reaches only the two elasticsearch8 services. 3. **TLS with the installation's own CA.** At first start the entrypoint creates a CA and a server certificate for `elasticsearch8`, `localhost` and `127.0.0.1`, keeps the server key in the data volume and discards the CA key. Only the public `ca.crt` is published, into the small volume `elasticsearch8_ca`, which osf.io mounts read-only as `ELASTIC_CA_CERTS`. This replaces the mongo pattern of ADR-07 and PR #43 (a certificate made once, trusted by exact file), and the trust is again by file, never by disabling verification. 4. **Security settings that ES 2 did not have.** `xpack.security` on, TLS on the REST port (the transport port is not reachable on a single node), `script.allowed_types: none` (ES 8 enables Painless by default; the search never needs it), machine learning and the GeoIP download off, `action.destructive_requires_name`, and disk watermarks given in bytes so that a large disk that is nearly full does not stop writes while a small one still does. 5. **Read-only root.** `config/` is a tmpfs because the official entrypoint creates `elasticsearch.keystore` there (it holds the bootstrap password); our `grdm-entrypoint.sh` copies the image's pristine `config.dist/` into it (plain `cp -R`: the tmpfs root belongs to root, so a times-preserving copy fails), copies the TLS files into `config/tls/` (Elasticsearch 8.19 reads SSL files only under `config/`) and execs the official entrypoint. Logs and `/tmp` are tmpfs, data is the named volume `elasticsearch8_data`. No hardening exception. @@ -70,7 +71,7 @@ options[4]{option,reason_for_not_choosing}: ### 2. 決定 1. **イメージは一つ、`grdm-dev/elasticsearch8:8.19.24-1`**(ADR-07 がほかの infra のレシピに行うのと同じ `image_build`)。ベースは公式の `docker.elastic.co/elasticsearch/elasticsearch:8.19.24` をインデックスのダイジェスト(`sha256:d6dfe6626d64…`)で固定したもの。arm64 と amd64 のネイティブ版があるので、組むものも、エミュレーションするものもない。レシピが足すのは `analysis-kuromoji` と `analysis-icu` だけである。 -2. **そこから二つのサービス。** `elasticsearch8` はノード。`elasticsearch8_setup` は一回きりの手順で、ブートストラップの管理者で cluster が yellow になるのを待ち、冪等な `PUT` でロール `grdm_osf`(cluster は `monitor`、`website*` と `private__website*` にすべての権限)と利用者 `grdm_osf` を作る。osf.io が受け取るのはその利用者のパスワードだけで、管理者のパスワードは二つの elasticsearch8 サービスにしか届かない。 +2. **そこから二つのサービス。** `elasticsearch8` はノード。`elasticsearch8_setup` は一回きりの手順で、ブートストラップの管理者で cluster が yellow になるのを待ち、冪等な `PUT` でロール `grdm_osf`(cluster は `monitor`、osf.io 自身の検索の索引にすべての権限。正確な指定はインストーラーにある)と利用者 `grdm_osf` を作る。osf.io が受け取るのはその利用者のパスワードだけで、管理者のパスワードは二つの elasticsearch8 サービスにしか届かない。 3. **導入ごとの認証局による TLS。** 初回起動で entrypoint が認証局と、`elasticsearch8`・`localhost`・`127.0.0.1` のサーバー証明書を作り、サーバー鍵をデータボリュームに残し、認証局の鍵は捨てる。公開するのは公開の `ca.crt` だけで、小さなボリューム `elasticsearch8_ca` に置き、osf.io が `ELASTIC_CA_CERTS` として読み取り専用で mount する。これは ADR-07 と PR #43 の mongo の型(一度だけ作った証明書をファイルそのもので信頼する)を引き継ぐもので、信頼は今回もファイルであり、検証を切ることはない。 4. **ES 2 に無かったセキュリティ設定。** `xpack.security` を有効にし、REST のポートを TLS にし(単一ノードなので transport のポートには届かない)、`script.allowed_types: none`(ES 8 は Painless を既定で有効にするが、検索には要らない)、機械学習と GeoIP のダウンロードを切り、`action.destructive_requires_name` を有効にし、ディスクの watermark をバイトで与える(大きなディスクがほぼ満杯でも書き込みが止まらず、小さなディスクなら止まる)。 5. **読み取り専用のルート。** 公式の entrypoint が `elasticsearch.keystore`(ブートストラップのパスワードを持つ)を `config/` に作るので、`config/` は tmpfs にする。自前の `grdm-entrypoint.sh` がイメージの元のままの `config.dist/` をそこへ写し(`cp -R`。tmpfs の根は root のものなので、時刻を保つ複写は失敗する)、TLS のファイルを `config/tls/` へ写し(Elasticsearch 8.19 は SSL のファイルを `config/` の下からしか読まない)、公式の entrypoint を exec する。ログと `/tmp` は tmpfs、データは名前つきボリューム `elasticsearch8_data`。堅牢化の例外はない。 diff --git a/docs/demo/20_core_install_mac_studio.md b/docs/demo/20_core_install_mac_studio.md index a79981b..6254564 100644 --- a/docs/demo/20_core_install_mac_studio.md +++ b/docs/demo/20_core_install_mac_studio.md @@ -5,7 +5,8 @@ **Jump:** [English](#english) · [日本語](#japanese) -- Version / 版: 0.30 — 2026-11-17. **Learned:** two pins that serve one owner decision move together: retiring Quick Files touches the classic navigation (osf.io #46) and the ember screens (ember-osf-web #6), and one run on both new pins (`d95e0abfae4a`, `a0d25ef70168`) passed 18 with 9 skips, run `acc-20261117T011422Z-01ad30`. / 所有者の一つの決定に仕える二つの固定版は一緒に動かす。Quick Files の回収は旧来の画面のナビ(osf.io #46)と ember の画面(ember-osf-web #6)にまたがり、両方の新しい固定版(`d95e0abfae4a`、`a0d25ef70168`)での一回の実行は合格 18、スキップ 9 だった(実行 `acc-20261117T011422Z-01ad30`)。 +- Version / 版: 0.31 — 2026-11-17. **Learned:** a run log can name results without naming internal index names: two log rows now describe the rebuilt search alias generically (owner decision 2026-11-17); the results are unchanged. / 実行の記録は、内部の索引名を出さなくても結果を示せる。作り直した検索のエイリアスについての 2 行を一般的な表現にした(2026-11-17 の所有者の判断)。結果は変えていない。 + 0.30 — 2026-11-17. **Learned:** two pins that serve one owner decision move together: retiring Quick Files touches the classic navigation (osf.io #46) and the ember screens (ember-osf-web #6), and one run on both new pins (`d95e0abfae4a`, `a0d25ef70168`) passed 18 with 9 skips, run `acc-20261117T011422Z-01ad30`. / 所有者の一つの決定に仕える二つの固定版は一緒に動かす。Quick Files の回収は旧来の画面のナビ(osf.io #46)と ember の画面(ember-osf-web #6)にまたがり、両方の新しい固定版(`d95e0abfae4a`、`a0d25ef70168`)での一回の実行は合格 18、スキップ 9 だった(実行 `acc-20261117T011422Z-01ad30`)。 0.29 — 2026-11-17. **Learned:** a tree that was proven under one SHA has no image under the SHA that is pinned: the run on osf.io #44's test merge `c09e4687cd2a` stands for the merge commit `01999360e094` (same tree), but `up` on a pin needs the image tagged with that pin, and switching back to develop's `567a03ee` failed with exit 40 until that tag was built (from cache). / ある SHA で証明した tree でも、固定した SHA のタグのイメージは別にある。osf.io #44 の試しのマージ `c09e4687cd2a` での実行はマージコミット `01999360e094`(同じ tree)の証拠になるが、固定版で `up` するにはその固定版のタグのイメージが要る。develop の `567a03ee` に戻すときは、そのタグを(キャッシュから)組むまで exit 40 で失敗した。 0.28 — 2026-11-16. **Learned:** a pin can be proven before the merge exists: GitHub's test merge of osf.io #41 (`022de5cf`) was deployed and accepted (16 passed), and the merge commit `567a03ee` carries the same tree, so the run stands for the pin. / 固定版は、マージができる前に証明できる。GitHub が作った osf.io #41 の試しのマージ(`022de5cf`)を配備して受入(合格 16)を通し、マージコミット `567a03ee` は同じ tree を持つので、その実行が固定版の証拠になる。 0.27 — 2026-11-16. **Learned:** an allow-list entry is only as necessary as the package behind it: MFR without pspp (RDM-modular-file-renderer-dev2027 PR #8 head `7a554e2`) has 87 Debian packages instead of 193, Trivy finds 0 CRITICAL / 47 HIGH instead of 3 / 127, 36 of the 47 MFR entries match nothing and were deleted, and acceptance still passed 16 with 8 skips (run `acc-20261116T070123Z-1e2c03`). / 許容リストの項目は、その後ろのパッケージが要る間だけ要る。pspp を外した MFR(RDM-modular-file-renderer-dev2027 PR #8 の先頭 `7a554e2`)は Debian のパッケージが 193 個から 87 個になり、Trivy の検出は CRITICAL/HIGH 3 / 127 から 0 / 47 になった。MFR の 47 項目のうち 36 項目は何にも当てはまらなくなったので削除し、受入はそれでも合格 16、スキップ 8 だった(実行 `acc-20261116T070123Z-1e2c03`)。 @@ -623,7 +624,7 @@ steps[9]{step,exit,result}: "compose render after build",0,"no stale build tags" "up",0,"68 s; web, api, admin, worker, ember_osf_web recreated on the new images; 23 services healthy" "health --network",0,"23 services, 16 loopback bindings; one warning: a foreign listener (`ControlCe`, macOS) on *:5000" - "invoke migrate_search",0,"13 s; the index was rebuilt on Elasticsearch 8 (the `private__website` alias now points to `private__website_v2`; the seeded data held almost nothing to migrate)" + "invoke migrate_search",0,"13 s; the index was rebuilt on Elasticsearch 8 (the search alias now points to the new v2 index; the seeded data held almost nothing to migrate)" "accept --seed --only core",0,"run acc-20261112T223428Z-fda84a: 14 passed, 0 failed, 0 error, 0 skipped" "scan and report",0,"scan 2 min 55 s at commit f223f2c; report exit 0" ``` @@ -1387,7 +1388,7 @@ steps[9]{step,exit,result}: "build 後の compose render",0,"古いビルドのタグは無し" "up",0,"68 秒。web・api・admin・worker・ember_osf_web が新しいイメージで作り直され、23 サービスが healthy" "health --network",0,"23 サービス、ループバックの bind は 16 件。警告が 1 件: *:5000 の他者のリスナー(`ControlCe`、macOS)" - "invoke migrate_search",0,"13 秒。Elasticsearch 8 で索引を作り直した(`private__website` のエイリアスが `private__website_v2` を指す。種データには移す内容がほとんど無かった)" + "invoke migrate_search",0,"13 秒。Elasticsearch 8 で索引を作り直した(検索のエイリアスが新しい v2 の索引を指す。種データには移す内容がほとんど無かった)" "accept --seed --only core",0,"実行 acc-20261112T223428Z-fda84a: 合格 14、失敗 0、エラー 0、skip 0" "scan と report",0,"scan はコミット f223f2c で 2 分 55 秒、report は終了 0" ``` diff --git a/docs/reviews/2026-11-12_RDM-osf.io-dev2027_PR11_Search_ES8_r4.md b/docs/reviews/2026-11-12_RDM-osf.io-dev2027_PR11_Search_ES8_r4.md index d73ac19..fe18ed1 100644 --- a/docs/reviews/2026-11-12_RDM-osf.io-dev2027_PR11_Search_ES8_r4.md +++ b/docs/reviews/2026-11-12_RDM-osf.io-dev2027_PR11_Search_ES8_r4.md @@ -5,8 +5,9 @@ **Jump:** [English](#english) · [日本語](#japanese) +- Version / 版: 0.3 — 2026-11-17. **Learned:** before publication, wording that could hint at search vulnerabilities still unfixed upstream was made generic; the verdict, finding IDs and conclusions are unchanged. / 公開前に、上流で未修正の脆弱性の手がかりになる記述を一般的な表現に改めた。判定・指摘番号・結論は変えていない。 - Version / 版: 0.2 — 2026-11-12. **Learned:** REV changed only what publication requires: private-repository URLs become named plain-text references; local guide links become repository-relative links; unpublished scratch references become named plain text or quoted command-path placeholders; public review links absent from develop point to the reviewed public commit. / REV が公開に必要な変更のみを行った。非公開リポジトリの URL は名称付き平文参照、ローカルのガイドへのリンクはリポジトリ相対リンク、未公開 scratch の参照は名称付き平文またはコマンドの引用符付きパス代替表示とし、develop に未収録の公開レビューへのリンクは確認済みの公開コミットを指す。 -- Publication provenance / 公開版の来歴: REV(担当レビュワ)issued this publication version from the unchanged original `2026-11-12_RDM-osf.io-dev2027_PR11_Search_ES8_r4.md` (SHA-256: `1934bc7d850e9699c3597f61b8720ee0cfce5291fe0a90fcb0b4b10930afdc78`); the original file and scratch evidence remain unchanged, and all text other than this version/provenance metadata and the explicitly stated publication references is verbatim. Quoted scratch command-path placeholders identify retained unpublished evidence and must be replaced with its local location before execution. / REV が上記原本から公開版を発行した。原本と scratch 証跡は未変更で、版・来歴の追記と明示した公開用参照以外の本文は原文どおり。コマンド内の引用符付き scratch パス代替表示は保持された未公開証跡を識別するもので、実行にはそのローカルの場所への置換が必要。 +- Publication provenance / 公開版の来歴: REV(担当レビュワ)issued this publication version from the unchanged original `2026-11-12_RDM-osf.io-dev2027_PR11_Search_ES8_r4.md` (SHA-256: `1934bc7d850e9699c3597f61b8720ee0cfce5291fe0a90fcb0b4b10930afdc78`); the original file and scratch evidence remain unchanged, and, as of version 0.2, all text other than this version/provenance metadata and the explicitly stated publication references was verbatim; version 0.3 (2026-11-17) further generalized wording by the owner's decision, so the body is no longer verbatim in those places. Quoted scratch command-path placeholders identify retained unpublished evidence and must be replaced with its local location before execution. / REV が上記原本から公開版を発行した。原本と scratch 証跡は未変更で、版 0.2 の時点では、版・来歴の追記と明示した公開用参照以外の本文は原文どおりだった。版 0.3(2026-11-17)で所有者の判断により表現をさらに一般化したため、その箇所の本文は原文どおりではない。コマンド内の引用符付き scratch パス代替表示は保持された未公開証跡を識別するもので、実行にはそのローカルの場所への置換が必要。 - Version / 版: 0.1 — 2026-11-12. **Learned:** A green job is insufficient evidence until individual search tests and their execution settings are checked; the former TLS setup failure is now closed by executed endpoint tests. / ジョブの緑表示だけでなく個々の検索試験と実行設定の確認が必要であり、以前の TLS 初期化失敗は実行済みのエンドポイント試験によって解消を確認できた。 - Applies to / 対象: RCOSDP/RDM-osf.io-dev2027 PR #11, head `71405fe148a8a11f6a5c10bf2d3239a528b3dbf5`, delta `3eb4042a819d675eea9f8371a8aeaff67b5397b2..71405fe148a8a11f6a5c10bf2d3239a528b3dbf5`. - Reviewer / レビュワ: REV(担当レビュワ, Codex Astra). @@ -48,7 +49,7 @@ additional_dsl_unit_tests: skipped: 0 ``` -UTC log locations: index at `14:53:45.3393514` (8 dots); permissions at `14:54:03.0817467` (12); r1 at `14:54:17.0473258` (15) and `14:54:22.8443327` (3); r2 at `14:54:21.2908076` (9); DSL at `14:54:22.8835576` (15), all on 2026-11-11. The r1 final three tests are TLS-option unit tests and must be added to its earlier 15. The 47 total includes unit/mock cases and must not be described as 47 HTTP integration cases. The r2 nine tests now execute, including successful real-search controls, while deliberately invalid bodies assert rejection before calling Elasticsearch. +UTC log locations: index at `14:53:45.3393514` (8 dots); permissions at `14:54:03.0817467` (12); r1 at `14:54:17.0473258` (15) and `14:54:22.8443327` (3); r2 at `14:54:21.2908076` (9); DSL at `14:54:22.8835576` (15), all on 2026-11-11. The r1 final three tests are TLS-option unit tests and must be added to its earlier 15. The 47 total includes unit/mock cases and must not be described as 47 HTTP integration cases. The r2 nine tests now execute, including successful real-search controls, while deliberately invalid input is rejected before calling Elasticsearch. The integration classes carry `enable_search`; `conftest.py:102–109` therefore does not replace their search engine with the default mock. Their source performs real index creation and HTTP requests, and the job log shows HTTPS Elasticsearch activity during these classes. This closes r3's missing endpoint-execution evidence. @@ -58,20 +59,18 @@ At `.github/ci/docker-compose.env:8–14` and `.github/docker-compose.ci.overrid `website/search/elastic_search.py:337–371` still rejects mixed HTTP/HTTPS endpoints, authenticated plaintext, and security-option overrides; HTTPS sets `verify_certs=True` and uses the configured CA. `website/settings/defaults.py:119` still defaults the insecure test escape hatch to False. Neither defaults nor these client functions changed in the scoped diff. There is no new verification bypass. -The free-space thresholds at `.github/docker-compose.ci.override.yml:36–38` affect only CI: 1 GB low, 512 MB high, and 256 MB flood-stage. Allocation thresholds remain enabled in the run's diagnostics. `website/search/elastic_search.py:2175–2191` now suppresses only `resource_already_exists_exception`, propagates other creation refusals through the existing exception wrapper, and warns when primaries are unallocated. The four added index tests cover repeated creation, refusal propagation, the warning, and private-index cleanup. `tests/base.py:176` adds deletion of the private index. The website job ends with zero indices; this is not a claim that every matrix job has zero residual indices. +The free-space thresholds at `.github/docker-compose.ci.override.yml:36–38` affect only CI: 1 GB low, 512 MB high, and 256 MB flood-stage. Allocation thresholds remain enabled in the run's diagnostics. `website/search/elastic_search.py:2175–2191` now suppresses only `resource_already_exists_exception`, propagates other creation refusals through the existing exception wrapper, and warns when primaries are unallocated. The four added index tests cover repeated creation, refusal propagation, the warning, and cleanup of the second index. `tests/base.py:176` adds deletion of that index. The website job ends with zero indices; this is not a claim that every matrix job has zero residual indices. ### Setting pinning and permissions -`tests/nii/test_search_api2.py:33–41` already leaves `ENABLE_PRIVATE_SEARCH=True` after its fixture; the file is unchanged from the prior reviewed head. `tests/test_search/test_es8_index.py:21–33` now patches False before superclass setup and stops the patch after teardown. Its assertions at lines 35–51 are explicitly for a public alias. Under private mode, `ensure_index` correctly prefixes the name through `es_index`, so the earlier unexpected `private__` result was consistent product behavior under a leaked test setting. The upstream fixture leak remains a pre-existing test-isolation debt, not a newly discovered product configuration fault or a blocking finding in this delta. +`tests/nii/test_search_api2.py:33–41` already leaves `ENABLE_PRIVATE_SEARCH=True` after its fixture; the file is unchanged from the prior reviewed head. `tests/test_search/test_es8_index.py:21–33` now patches False before superclass setup and stops the patch after teardown. Its assertions at lines 35–51 are explicitly for a public alias. Under private mode, `ensure_index` correctly prefixes the name through `es_index`, so the earlier unexpected index name was consistent product behavior under a test setting carried over from an earlier test. That carried-over fixture setting remains a pre-existing test-isolation debt, not a newly discovered product configuration fault or a blocking finding in this delta. The website log runs `test_search_api2.py` (9 passes at `14:50:15.6480348`) before `test_es8_index.py` (8 passes), exercising the formerly failing order. Private-mode coverage remains explicit and passing: `test_es8_permissions.py:54–84`, `test_es8_review_r1.py:113–136`, and `test_es8_review_r2.py:126–134` still pin True themselves. An independent, network-free probe executed the actual AST-extracted `ensure_index`/index-name function bodies with an in-memory ES double in both modes: alias naming, idempotence, absence of a double prefix, and restoration of the preceding True setting passed. Five additional TLS-option probes passed, for seven named local probes total; these are not live ES integration results. Permission evidence is unchanged code plus executed positive and negative controls: - Private projects/files/wikis: owner access, outsider exclusion, GET/POST, typed searches, API v2, anonymous 401, membership removal, and privacy transitions (`test_es8_permissions.py:102–175`). Server-owned access clauses remain in `website/search/util.py:309–440`. -- Private comments and stale private documents: removal on privatization, migration exclusion, direct comment-type rejection, hit/count/aggregation filtering (`test_es8_review_r1.py:69–105`). Guards remain at `elastic_search.py:1379–1404,1456–1475`; visibility policy remains at `270–294,625–687`. -- Emails and hidden fields: source/highlight exclusion, hidden-field query rejection, no catch-all email match, and a successful exact-email contributor lookup (`test_es8_review_r1.py:147–186`). Source cleanup remains at `elastic_search.py:226–250`, email mapping at `2057,2138`. -- Terms lookup into a private index is rejected with HTTP 400 (`test_es8_review_r1.py:221–226`); `query_policy.py:362–373` still requires a literal value list. Normal searches remain positive controls. +- Visibility of search results and validation of query input: records and fields that must not be returned stay out of hits, counts, aggregations and highlights; queries outside the allowed forms are rejected with HTTP 400; normal searches remain positive controls (`test_es8_review_r1.py`). The guards remain in `elastic_search.py` and `query_policy.py`. ### Evidence limits and remaining work @@ -112,7 +111,7 @@ additional_dsl_unit_tests: skipped: 0 ``` -2026-11-11 の UTC ログ位置は、index が `14:53:45.3393514`(成功記号 8 個)、permissions が `14:54:03.0817467`(12)、r1 が `14:54:17.0473258`(15)と `14:54:22.8443327`(3)、r2 が `14:54:21.2908076`(9)、DSL が `14:54:22.8835576`(15)。r1 の最後の 3 件は TLS 設定の単体試験で、先の 15 件と合算する。47 件には単体・モック試験を含むため「HTTP 統合試験 47 件」とは表現しない。r2 の 9 件も実行され、実検索に成功する陽性対照と、不正な本体を Elasticsearch 呼び出し前に拒否する検査が通った。 +2026-11-11 の UTC ログ位置は、index が `14:53:45.3393514`(成功記号 8 個)、permissions が `14:54:03.0817467`(12)、r1 が `14:54:17.0473258`(15)と `14:54:22.8443327`(3)、r2 が `14:54:21.2908076`(9)、DSL が `14:54:22.8835576`(15)。r1 の最後の 3 件は TLS 設定の単体試験で、先の 15 件と合算する。47 件には単体・モック試験を含むため「HTTP 統合試験 47 件」とは表現しない。r2 の 9 件も実行され、実検索に成功する陽性対照と、不正な入力を Elasticsearch 呼び出し前に拒否する検査が通った。 統合試験のクラスには `enable_search` があり、`conftest.py:102–109` の既定モックによる置換対象から外れる。実際の索引作成と HTTP 要求を行うソースを確認し、実行中の HTTPS Elasticsearch 通信もログで確認した。これにより r3 のエンドポイント実行証拠の不足は解消した。 @@ -122,20 +121,18 @@ additional_dsl_unit_tests: `website/search/elastic_search.py:337–371` は、HTTP/HTTPS の混在、認証情報の平文送信、セキュリティ設定の上書きを引き続き拒否する。HTTPS では `verify_certs=True` と設定済み CA を使用する。`website/settings/defaults.py:119` の試験用例外は既定で False のままである。既定設定とこれらのクライアント関数は対象差分で変更されておらず、検証の迂回は追加されていない。 -`.github/docker-compose.ci.override.yml:36–38` の空き容量しきい値(low 1 GB、high 512 MB、flood-stage 256 MB)は CI だけに適用される。実行ログでも割り当てしきい値が有効である。`website/search/elastic_search.py:2175–2191` は `resource_already_exists_exception` だけを無視し、他の作成拒否を既存の例外変換を通して伝え、主シャード未割り当てを警告する。追加 4 試験は二重作成・拒否の伝播・警告・非公開索引の後片付けを検査している。`tests/base.py:176` は非公開索引の削除を追加した。website ジョブ終了時の残存索引は 0 件だが、全分割ジョブで 0 件とは主張しない。 +`.github/docker-compose.ci.override.yml:36–38` の空き容量しきい値(low 1 GB、high 512 MB、flood-stage 256 MB)は CI だけに適用される。実行ログでも割り当てしきい値が有効である。`website/search/elastic_search.py:2175–2191` は `resource_already_exists_exception` だけを無視し、他の作成拒否を既存の例外変換を通して伝え、主シャード未割り当てを警告する。追加 4 試験は二重作成・拒否の伝播・警告・二つ目の索引の後片付けを検査している。`tests/base.py:176` はその索引の削除を追加した。website ジョブ終了時の残存索引は 0 件だが、全分割ジョブで 0 件とは主張しない。 ### 設定固定と権限 -`tests/nii/test_search_api2.py:33–41` は従来から fixture 後に `ENABLE_PRIVATE_SEARCH=True` を残しており、前回レビュー対象から変更されていない。`tests/test_search/test_es8_index.py:21–33` は親クラスの準備より先に False を固定し、終了処理後に元の値へ戻す。35–51 行目の検査は公開検索用の別名を前提にしている。非公開モードの `ensure_index` は `es_index` によって正しく接頭辞を付けるため、以前の `private__` は漏れた試験設定に従う製品の正常な挙動だった。先行 fixture の設定漏れは既存の試験独立性の課題として残るが、この差分による製品設定の不具合や阻害指摘ではない。 +`tests/nii/test_search_api2.py:33–41` は従来から fixture 後に `ENABLE_PRIVATE_SEARCH=True` を残しており、前回レビュー対象から変更されていない。`tests/test_search/test_es8_index.py:21–33` は親クラスの準備より先に False を固定し、終了処理後に元の値へ戻す。35–51 行目の検査は公開検索用の別名を前提にしている。非公開モードの `ensure_index` は `es_index` によって正しく接頭辞を付けるため、以前の想定外の索引名は、先行する試験から持ち越された設定に従う製品の正常な挙動だった。先行 fixture の設定の持ち越しは既存の試験独立性の課題として残るが、この差分による製品設定の不具合や阻害指摘ではない。 website ログでは `test_search_api2.py`(`14:50:15.6480348`、9 件成功)が `test_es8_index.py`(8 件成功)より先に動き、以前失敗した順序を通過している。非公開モードの検査は `test_es8_permissions.py:54–84`、`test_es8_review_r1.py:113–136`、`test_es8_review_r2.py:126–134` が明示的に True を固定し、成功している。独立したネットワーク不要の検査でも、AST から抜き出した実際の `ensure_index` と索引名関数をメモリー内の ES 代替と組み合わせ、両モードの別名・冪等性・接頭辞の非重複・先行する True 設定の復元を確認した。TLS オプションの 5 検査も成功し、ローカルでは名前付き検査が計 7 件成功した。これらは実 ES 統合試験ではない。 権限の証拠は、維持された製品コードと実行済みの陽性・陰性対照である。 - 非公開プロジェクト・ファイル・wiki:所有者の検索、第三者の除外、GET/POST、型別検索、API v2、匿名 401、共同作業者の削除、非公開化(`test_es8_permissions.py:102–175`)。サーバー側の権限条件は `website/search/util.py:309–440` に維持されている。 -- 非公開コメントと残存非公開文書:非公開化時の削除、移行時の除外、コメント型の直接検索拒否、ヒット・件数・集計の除外(`test_es8_review_r1.py:69–105`)。防御は `elastic_search.py:1379–1404,1456–1475`、公開性の条件は `270–294,625–687` に残る。 -- メールと非公開フィールド:応答本体・強調表示からの除外、非公開フィールド検索の拒否、全文欄でのメール非一致、メール完全一致による共同作業者検索の成功(`test_es8_review_r1.py:147–186`)。応答の除去処理は `elastic_search.py:226–250`、メールのマッピングは `2057,2138` にある。 -- 非公開索引への terms lookup は HTTP 400(`test_es8_review_r1.py:221–226`)。`query_policy.py:362–373` は引き続き値のリストだけを許す。通常検索の陽性対照も成功している。 +- 検索結果の公開範囲と検索条件の入力検査:返してはならない記録と項目は、ヒット・件数・集計・強調表示に出さない。許された形以外の検索条件は HTTP 400 で拒否する。通常の検索の陽性対照も成功している(`test_es8_review_r1.py`)。防御は `elastic_search.py` と `query_policy.py` に残る。 ### 証拠の限界と残作業 diff --git a/docs/reviews/2026-11-12_RDM-osf.io-dev2027_PR11_Search_ES8_r5.md b/docs/reviews/2026-11-12_RDM-osf.io-dev2027_PR11_Search_ES8_r5.md index b08d580..85db7c5 100644 --- a/docs/reviews/2026-11-12_RDM-osf.io-dev2027_PR11_Search_ES8_r5.md +++ b/docs/reviews/2026-11-12_RDM-osf.io-dev2027_PR11_Search_ES8_r5.md @@ -5,6 +5,7 @@ **Jump:** [English](#english) · [日本語](#japanese) +- Version / 版: 0.2 — 2026-11-17. **Learned:** before publication, wording that could hint at search vulnerabilities still unfixed upstream was made generic; the verdict, finding IDs and conclusions are unchanged. / 公開前に、上流で未修正の脆弱性の手がかりになる記述を一般的な表現に改めた。判定・指摘番号・結論は変えていない。 - Version / 版: 0.1 — 2026-11-12. **Learned:** A conflict-free merge alone does not establish compatibility; the resulting tree and executed permission tests must be checked against the upgraded framework. / 衝突のないマージだけでは互換性を証明できず、生成されたツリーと実行済みの権限試験を更新後のフレームワークで確認する必要がある。 - Applies to / 対象: RCOSDP/RDM-osf.io-dev2027 PR #11; `71405fe148a8a11f6a5c10bf2d3239a528b3dbf5..95eb39cf57c1e4c737dfde14867c6dbb3d979032`. - Reviewer / レビュワ: REV(担当レビュワ, Codex Astra). @@ -53,17 +54,17 @@ The counts compare each parent against their common ancestor, including path mod **Middleware and authentication properties.** Search adds no middleware. API settings use `MIDDLEWARE`, and the custom middleware uses `MiddlewareMixin`; custom DRF authentication remains configured. The API intentionally does not rely on Django session/authentication middleware. There are no `is_authenticated()` or `is_anonymous()` calls in the changed Python files. `get_user_auth` reads `user.is_anonymous` as a property (`api/base/utils.py:72`), and DRF 3.9.4's search permission parent reads `request.user.is_authenticated` as a property. [Django user properties](https://github.com/django/django/blob/5c3300027b30c1b498d99010f7d618316f685045/django/contrib/auth/base_user.py#L90), [DRF permissions](https://github.com/encode/django-rest-framework/blob/b1c4d8b59b67084ed07a35ea9a35629805039aaa/rest_framework/permissions.py#L152). -**URLs, requests, responses, and JSON.** No changed Python file uses `django.core.urlresolvers`, `render_to_response`, `MIDDLEWARE_CLASSES`, or the old external `include` import. API v1 imports Flask's `request` (`website/search/views.py:9`), so `get_json(silent=True)` and `request.args` are Flask APIs. Its JSON helper requires an object, catches excessive decoder recursion, and checks structure (`:146–158`); private search checks login before parsing (`:175–176`) and maps missing/wrong body paths to HTTP 400 (`:201–207`). Public bodies still pass the query policy (`:275`). API v2 uses DRF `query_params`, parser context, and `Response`; `SearchParser.parse(stream, media_type=None, parser_context=None)` matches DRF 3.9.4. The existing JSONAPI parser rejects non-object top-level data. Added query-policy failures become DRF `ValidationError`, which retains HTTP 400. [DRF JSON parser](https://github.com/encode/django-rest-framework/blob/b1c4d8b59b67084ed07a35ea9a35629805039aaa/rest_framework/parsers.py#L50), [request properties](https://github.com/encode/django-rest-framework/blob/b1c4d8b59b67084ed07a35ea9a35629805039aaa/rest_framework/request.py#L202), [ValidationError](https://github.com/encode/django-rest-framework/blob/b1c4d8b59b67084ed07a35ea9a35629805039aaa/rest_framework/exceptions.py#L142). +**URLs, requests, responses, and JSON.** No changed Python file uses `django.core.urlresolvers`, `render_to_response`, `MIDDLEWARE_CLASSES`, or the old external `include` import. API v1 imports Flask's `request` (`website/search/views.py:9`), so `get_json(silent=True)` and `request.args` are Flask APIs. Its JSON helper requires an object, catches excessive decoder recursion, and checks structure (`:146–158`); private search checks login before parsing (`:175–176`) and maps missing/wrong body paths to HTTP 400 (`:201–207`). Search input still passes validation (`:275`). API v2 uses DRF `query_params`, parser context, and `Response`; `SearchParser.parse(stream, media_type=None, parser_context=None)` matches DRF 3.9.4. The existing JSONAPI parser rejects non-object top-level data. Added query-policy failures become DRF `ValidationError`, which retains HTTP 400. [DRF JSON parser](https://github.com/encode/django-rest-framework/blob/b1c4d8b59b67084ed07a35ea9a35629805039aaa/rest_framework/parsers.py#L50), [request properties](https://github.com/encode/django-rest-framework/blob/b1c4d8b59b67084ed07a35ea9a35629805039aaa/rest_framework/request.py#L202), [ValidationError](https://github.com/encode/django-rest-framework/blob/b1c4d8b59b67084ed07a35ea9a35629805039aaa/rest_framework/exceptions.py#L142). -**Database operations and dependencies.** The new comment cleanup and refresh paths use `values_list('guids___id', flat=True)` and `filter(...).iterator()` (`website/search/elastic_search.py:1460,1471,1474`); there are no new foreign-key declarations or new middleware contracts. The inherited vendored include/queryset and model compatibility changes remain intact. The dependency upgrade is present in the merged requirements, not merely asserted in the AID comment. Parsing all 17 changed Python files and `git diff --check` succeeded; this is static evidence, not a substitute for execution on the CI runtime. +**Database operations and dependencies.** The new index cleanup and refresh paths use standard queryset calls (`values_list(...)` and `filter(...).iterator()`) in `website/search/elastic_search.py`; there are no new foreign-key declarations or new middleware contracts. The inherited vendored include/queryset and model compatibility changes remain intact. The dependency upgrade is present in the merged requirements, not merely asserted in the AID comment. Parsing all 17 changed Python files and `git diff --check` succeeded; this is static evidence, not a substitute for execution on the CI runtime. ### Permission filtering The search files are identical to r4, and the paths were re-read against the new authentication layer. Private requests still require login and rebuild access clauses on the server (`website/search/views.py:175–251`, `api/search/views.py:77–108`, `website/search/util.py:309–457`). Contributor/public conditions remain part of the mandatory query. The DSL translator retains nested Boolean clauses and their semantics. -Public hits, counts, tags, and aggregations still receive `PUBLIC_VISIBILITY_FILTER`; type restrictions and protected index selection remain in `website/search/elastic_search.py:613–625`, and policy application remains at `:507,534,551,679`. Hidden emails/contributor fields are excluded from the source and highlights (`:226–250`). Private comments are removed or excluded during indexing and migration, and membership/privacy updates refresh dependent records (`:1379–1404,1456–1475`). Client field/lookup restrictions in `query_policy.py` remain unchanged. +Public hits, counts, tags, and aggregations still receive the public visibility filter; type restrictions, protected index selection and policy application remain in `website/search/elastic_search.py`. Fields that must not be returned stay out of responses, records that must not be public stay out of the index, and membership/privacy updates refresh dependent records. Client query restrictions in `query_policy.py` remain unchanged. -The required execution evidence covers owner success, outsider exclusion, anonymous 401, GET/POST and API v2 searches, membership removal, privacy changes, stale private documents, hidden fields, and crafted queries. ES8 source inventory is 8 index tests, 12 permission tests, 18 r1 tests, and 9 r2 tests: 47 total. A further 15 tests cover the legacy DSL. Integration classes opt into `enable_search`, bypassing the default search mock in `conftest.py`; the total also includes unit/mock cases and must not be described as 47 live HTTP integration tests. +The required execution evidence covers owner success, outsider exclusion, anonymous 401, GET/POST and API v2 searches, membership removal, privacy changes, result visibility, and query input validation. ES8 source inventory is 8 index tests, 12 permission tests, 18 r1 tests, and 9 r2 tests: 47 total. A further 15 tests cover the legacy DSL. Integration classes opt into `enable_search`, bypassing the default search mock in `conftest.py`; the total also includes unit/mock cases and must not be described as 47 live HTTP integration tests. ### CI results and evidence limits @@ -159,17 +160,17 @@ merge: **ミドルウェアと認証プロパティ。** 検索はミドルウェアを追加していない。API 設定は `MIDDLEWARE` を使い、独自ミドルウェアは `MiddlewareMixin` を使う。独自 DRF 認証の設定も残っている。API は設計上、Django の session/authentication ミドルウェアに認証を依存させていない。変更した Python ファイルには `is_authenticated()` や `is_anonymous()` の呼び出しはない。`get_user_auth` は `user.is_anonymous` をプロパティとして読み(`api/base/utils.py:72`)、検索権限の親である DRF 3.9.4 も `request.user.is_authenticated` をプロパティとして読む。[Django の利用者プロパティ](https://github.com/django/django/blob/5c3300027b30c1b498d99010f7d618316f685045/django/contrib/auth/base_user.py#L90)、[DRF の権限処理](https://github.com/encode/django-rest-framework/blob/b1c4d8b59b67084ed07a35ea9a35629805039aaa/rest_framework/permissions.py#L152)。 -**URL・要求・応答・JSON。** 変更した Python ファイルには `django.core.urlresolvers`、`render_to_response`、`MIDDLEWARE_CLASSES`、旧外部 `include` の import はない。API v1 は Flask の `request` を import するため(`website/search/views.py:9`)、`get_json(silent=True)` と `request.args` は Flask の API である。JSON ヘルパーはオブジェクト型を要求し、深すぎる JSON の再帰エラーを捕捉して構造を検査する(`:146–158`)。非公開検索は解析前にログインを検査し(`:175–176`)、本体の欠落・型誤りは HTTP 400 にする(`:201–207`)。公開検索の本体も検索ポリシーを通る(`:275`)。API v2 の `query_params`、parser context、`Response` と、`SearchParser.parse(stream, media_type=None, parser_context=None)` は DRF 3.9.4 と整合する。既存の JSONAPI parser は最上位がオブジェクト以外なら拒否する。追加された検索ポリシー違反は DRF `ValidationError` に変換され、HTTP 400 が維持される。[DRF JSON parser](https://github.com/encode/django-rest-framework/blob/b1c4d8b59b67084ed07a35ea9a35629805039aaa/rest_framework/parsers.py#L50)、[request プロパティ](https://github.com/encode/django-rest-framework/blob/b1c4d8b59b67084ed07a35ea9a35629805039aaa/rest_framework/request.py#L202)、[ValidationError](https://github.com/encode/django-rest-framework/blob/b1c4d8b59b67084ed07a35ea9a35629805039aaa/rest_framework/exceptions.py#L142)。 +**URL・要求・応答・JSON。** 変更した Python ファイルには `django.core.urlresolvers`、`render_to_response`、`MIDDLEWARE_CLASSES`、旧外部 `include` の import はない。API v1 は Flask の `request` を import するため(`website/search/views.py:9`)、`get_json(silent=True)` と `request.args` は Flask の API である。JSON ヘルパーはオブジェクト型を要求し、深すぎる JSON の再帰エラーを捕捉して構造を検査する(`:146–158`)。非公開検索は解析前にログインを検査し(`:175–176`)、本体の欠落・型誤りは HTTP 400 にする(`:201–207`)。検索の入力も引き続き検査を通る(`:275`)。API v2 の `query_params`、parser context、`Response` と、`SearchParser.parse(stream, media_type=None, parser_context=None)` は DRF 3.9.4 と整合する。既存の JSONAPI parser は最上位がオブジェクト以外なら拒否する。追加された検索ポリシー違反は DRF `ValidationError` に変換され、HTTP 400 が維持される。[DRF JSON parser](https://github.com/encode/django-rest-framework/blob/b1c4d8b59b67084ed07a35ea9a35629805039aaa/rest_framework/parsers.py#L50)、[request プロパティ](https://github.com/encode/django-rest-framework/blob/b1c4d8b59b67084ed07a35ea9a35629805039aaa/rest_framework/request.py#L202)、[ValidationError](https://github.com/encode/django-rest-framework/blob/b1c4d8b59b67084ed07a35ea9a35629805039aaa/rest_framework/exceptions.py#L142)。 -**DB 操作と依存パッケージ。** 追加されたコメント削除・更新処理は `values_list('guids___id', flat=True)` と `filter(...).iterator()` を使う(`website/search/elastic_search.py:1460,1471,1474`)。新規の外部キー宣言やミドルウェア契約はない。同梱 include/queryset とモデルの互換修正は継承されている。依存更新は AID コメントの記述だけでなく、マージ結果の requirements でも確認した。変更 Python 17 ファイルの構文解析と `git diff --check` は成功したが、これは静的証拠であり、CI の実行証拠とは分けて扱う。 +**DB 操作と依存パッケージ。** 追加された索引の後片付け・更新処理は、標準的な queryset の呼び出し(`values_list(...)` と `filter(...).iterator()`)を使う(`website/search/elastic_search.py`)。新規の外部キー宣言やミドルウェア契約はない。同梱 include/queryset とモデルの互換修正は継承されている。依存更新は AID コメントの記述だけでなく、マージ結果の requirements でも確認した。変更 Python 17 ファイルの構文解析と `git diff --check` は成功したが、これは静的証拠であり、CI の実行証拠とは分けて扱う。 ### 権限フィルター 検索ファイルは r4 と同一であり、新しい認証層と併せて経路を読み直した。非公開要求は引き続きログインを要求し、サーバー側でアクセス条件を再構成する(`website/search/views.py:175–251`、`api/search/views.py:77–108`、`website/search/util.py:309–457`)。共同作業者・公開性の条件は必須の検索条件に残る。DSL 変換も入れ子の論理条件と意味を保持する。 -公開検索のヒット・件数・タグ・集計には `PUBLIC_VISIBILITY_FILTER` が付く。型制限と保護された索引選択は `website/search/elastic_search.py:613–625`、ポリシー適用は `:507,534,551,679` に残る。メールと非公開の共同作業者フィールドは本体と強調表示から除外する(`:226–250`)。非公開コメントは索引更新・移行時に削除または除外され、共同作業者・公開性の変更は関連文書へ反映する(`:1379–1404,1456–1475`)。`query_policy.py` のクライアント向けフィールド・lookup 制限も変わっていない。 +公開検索のヒット・件数・タグ・集計には、引き続き公開範囲の絞り込みが付く。型制限、保護された索引選択、ポリシー適用は `website/search/elastic_search.py` に残る。返してはならない項目は応答に出さず、公開してはならない記録は索引に入れない。共同作業者・公開性の変更は関連文書へ反映する。`query_policy.py` のクライアント向けの検索条件の制限も変わっていない。 -必要な実行証拠は、所有者の成功、第三者の除外、匿名 401、GET/POST と API v2、共同作業者の削除、非公開化、残存非公開文書、非公開フィールド、不正な検索条件を含む。ソース上の ES8 試験は index 8 件・permissions 12 件・r1 18 件・r2 9 件で計 47 件。別に旧 DSL の試験が 15 件ある。統合試験クラスは `enable_search` により `conftest.py` の既定検索モックの対象外になる。合計には単体・モック試験も含むため「実 HTTP 統合試験 47 件」とは表現しない。 +必要な実行証拠は、所有者の成功、第三者の除外、匿名 401、GET/POST と API v2、共同作業者の削除、非公開化、検索結果の公開範囲、検索条件の入力検査を含む。ソース上の ES8 試験は index 8 件・permissions 12 件・r1 18 件・r2 9 件で計 47 件。別に旧 DSL の試験が 15 件ある。統合試験クラスは `enable_search` により `conftest.py` の既定検索モックの対象外になる。合計には単体・モック試験も含むため「実 HTTP 統合試験 47 件」とは表現しない。 ### CI 結果と証拠の限界 diff --git a/docs/reviews/2026-11-12_RDM-osf.io-dev2027_PR11_Search_ES8_r6.md b/docs/reviews/2026-11-12_RDM-osf.io-dev2027_PR11_Search_ES8_r6.md index f65ef65..e2a1460 100644 --- a/docs/reviews/2026-11-12_RDM-osf.io-dev2027_PR11_Search_ES8_r6.md +++ b/docs/reviews/2026-11-12_RDM-osf.io-dev2027_PR11_Search_ES8_r6.md @@ -5,6 +5,7 @@ **Jump:** [English](#english) · [日本語](#japanese) +- Version / 版: 0.2 — 2026-11-17. **Learned:** before publication, wording that could hint at search vulnerabilities still unfixed upstream was made generic; the verdict, finding IDs and conclusions are unchanged. / 公開前に、上流で未修正の脆弱性の手がかりになる記述を一般的な表現に改めた。判定・指摘番号・結論は変えていない。 - Version / 版: 0.1 — 2026-11-12. **Learned:** A clean merge must preserve both service removal and search configuration, and passing test counts must be established on the resulting tree. / 衝突のないマージでもサービス撤去と検索設定の両立を確認し、生成された tree で試験の成功件数を確かめる必要がある。 - Applies to / 対象: RCOSDP/RDM-osf.io-dev2027 PR #11; `95eb39cf57c1e4c737dfde14867c6dbb3d979032..b4bc1341885dcb6725c1e3f27333d9ca9d0ef873`. - Reviewer / レビュワ: REV(担当レビュワ, Codex Astra). @@ -57,7 +58,7 @@ merge: `tasks/__init__.py:238` retains `search_ensure_index`, including its decorator, application initialization, and `ensure_index(index=index)` call; its syntax tree is identical to r5. The sharejs task is absent. The old `tokumx` reference in the development startup helper at line 683 is inherited unchanged from develop; this merge neither introduces it nor uses that helper in CI. -The search source and tests in `website/search`, `api/search`, and `tests/test_search` are byte-identical to r5. Of the 17 Python files changed by PR #11 relative to develop, 16 are byte-identical to r5; only `tasks/__init__.py` changes, solely to remove the inherited sharejs task. The server-enforced permission filters and private-field exclusions therefore remain intact. +The search source and tests in `website/search`, `api/search`, and `tests/test_search` are byte-identical to r5. Of the 17 Python files changed by PR #11 relative to develop, 16 are byte-identical to r5; only `tasks/__init__.py` changes, solely to remove the inherited sharejs task. The server-enforced permission filters and result-visibility controls therefore remain intact. The inherited wiki changes remove obsolete MongoDB draft operations. `WikiVersion.save` and `WikiPage.save` still call `node.update_search` (`addons/wiki/models.py:148,281`), and the search serializer still reads saved wiki content through `get_version().raw_text(node)` (`website/search/elastic_search.py:1287`). No search path uses the removed draft helpers. The new Yjs room handling does not replace those saved-content hooks. The internal URL choices in `api/files/serializers.py:235,467,536` and `addons/base/views.py:1083` leave search serializers and routes unchanged. @@ -111,7 +112,7 @@ additional_dsl[2]{run_id,collected,passed,skipped}: Each ES8 module's collected count is reconstructed from every pytest progress outcome and checked against its source inventory. The explicit collection total in the log is for the whole website job. The four ES8 modules have no extra parametrized or inherited cases. In each run, r1 is split into 15 integration-class outcomes and 3 TLS-option unit outcomes. Thus these are the same 47 distinct ES8 tests executed twice. -The integration classes use `enable_search` to bypass the default search mock (a substitute used instead of the real service). Real index creation, owner/outsider/anonymous controls, public visibility, membership and privacy changes, hidden fields, and crafted queries remain covered. The total includes unit/mock tests and is not described as 47 live HTTP integration tests. The inherited Yjs addition contributes 32 passing website tests; website collection increased from r5's 2,277 to 2,309 while skips remain 74. +The integration classes use `enable_search` to bypass the default search mock (a substitute used instead of the real service). Real index creation, owner/outsider/anonymous controls, public visibility, membership and privacy changes, result visibility, and query input validation remain covered. The total includes unit/mock tests and is not described as 47 live HTTP integration tests. The inherited Yjs addition contributes 32 passing website tests; website collection increased from r5's 2,277 to 2,309 while skips remain 74. For the PR run, ES8 progress lines occur at 23:30:41.1100299 (index), 23:30:59.5758497 (permissions), 23:31:13.3340143 and 23:31:19.0212848 (r1), and 23:31:17.5868238 (r2). For push they occur at 23:20:44.7719355, 23:21:01.6017482, 23:21:12.7667170 and 23:21:17.6023874, and 23:21:16.2951514 respectively. All timestamps are UTC on 2026-11-11. @@ -164,7 +165,7 @@ merge: `tasks/__init__.py:238` は `search_ensure_index` の decorator、アプリケーション初期化、`ensure_index(index=index)` 呼び出しを保持し、構文木は r5 と同一である。sharejs タスクは存在しない。683 行の開発用起動ヘルパーにある古い `tokumx` 参照は develop から変更なしで継承したもので、今回のマージで追加したものではなく、CI もそのヘルパーを使用しない。 -`website/search`・`api/search`・`tests/test_search` の検索コードと試験は r5 とバイト単位で同一。develop に対する PR #11 の変更 Python 17 ファイル中、16 ファイルは r5 とバイト単位で同一である。変更したのは `tasks/__init__.py` のみで、継承した sharejs タスクの削除だけである。サーバー側で強制する権限フィルターと非公開フィールドの除外も保持されている。 +`website/search`・`api/search`・`tests/test_search` の検索コードと試験は r5 とバイト単位で同一。develop に対する PR #11 の変更 Python 17 ファイル中、16 ファイルは r5 とバイト単位で同一である。変更したのは `tasks/__init__.py` のみで、継承した sharejs タスクの削除だけである。サーバー側で強制する権限フィルターと検索結果の公開範囲の制御も保持されている。 継承した wiki 変更は旧 MongoDB の下書き操作を削除する。`WikiVersion.save` と `WikiPage.save` は引き続き `node.update_search` を呼び(`addons/wiki/models.py:148,281`)、検索用変換は `get_version().raw_text(node)` で保存済み wiki の内容を読む(`website/search/elastic_search.py:1287`)。削除した下書きヘルパーを検索経路は使っていない。新しい Yjs の部屋管理も保存済み内容の更新処理を置き換えない。`api/files/serializers.py:235,467,536` と `addons/base/views.py:1083` の内部 URL 選択は、検索用変換とルートを変更しない。 @@ -218,7 +219,7 @@ additional_dsl[2]{run_id,collected,passed,skipped}: ES8 モジュール別の収集数は pytest の全結果記号から再構成し、ソースの試験一覧と照合した。ログの明示的な収集総数は website ジョブ全体のものである。この 4 モジュールにパラメーター展開・継承による追加試験はない。両 run とも r1 は統合試験クラスの 15 件と TLS 設定の単体試験 3 件に分かれて現れる。同じ ES8 試験 47 件を 2 回実行した結果である。 -統合試験クラスは `enable_search` により既定の検索モック(実サービスの代わりに使う代用品)を回避する。実索引の作成、所有者・第三者・匿名の対照、公開可視性、共同作業者・公開性の変更、非公開フィールド、不正な検索条件を引き続き試験する。合計には単体・モック試験を含むため「実 HTTP 統合試験 47 件」とは表現しない。継承した Yjs 追加の website 試験 32 件も成功し、収集数は r5 の 2,277 件から 2,309 件へ増え、スキップは 74 件のままである。 +統合試験クラスは `enable_search` により既定の検索モック(実サービスの代わりに使う代用品)を回避する。実索引の作成、所有者・第三者・匿名の対照、公開可視性、共同作業者・公開性の変更、検索結果の公開範囲、検索条件の入力検査を引き続き試験する。合計には単体・モック試験を含むため「実 HTTP 統合試験 47 件」とは表現しない。継承した Yjs 追加の website 試験 32 件も成功し、収集数は r5 の 2,277 件から 2,309 件へ増え、スキップは 74 件のままである。 PR run の ES8 結果行は index が 23:30:41.1100299、permissions が 23:30:59.5758497、r1 が 23:31:13.3340143 と 23:31:19.0212848、r2 が 23:31:17.5868238。push は順に 23:20:44.7719355、23:21:01.6017482、23:21:12.7667170 と 23:21:17.6023874、23:21:16.2951514。すべて 2026-11-11 の UTC である。 diff --git a/docs/reviews/2026-11-13_RDM-osf.io-dev2027_PR11_Search_ES8_r7.md b/docs/reviews/2026-11-13_RDM-osf.io-dev2027_PR11_Search_ES8_r7.md index 99b1be3..c5f8328 100644 --- a/docs/reviews/2026-11-13_RDM-osf.io-dev2027_PR11_Search_ES8_r7.md +++ b/docs/reviews/2026-11-13_RDM-osf.io-dev2027_PR11_Search_ES8_r7.md @@ -5,6 +5,7 @@ **Jump:** [English](#english) · [日本語](#japanese) +- Version / 版: 0.2 — 2026-11-17. **Learned:** before publication, wording that could hint at search vulnerabilities still unfixed upstream was made generic; the verdict, finding IDs and conclusions are unchanged. / 公開前に、上流で未修正の脆弱性の手がかりになる記述を一般的な表現に改めた。判定・指摘番号・結論は変えていない。 - Version / 版: 0.1 — 2026-11-13. **Learned:** A security merge must preserve current database authorization while adapting physical search identifiers; green CI must also prove the intended tests ran. / セキュリティの統合では検索の物理識別子を移植しつつ現在の DB 認可を保持し、CI 成功だけでなく目的の試験が実行されたことも確かめる必要がある。 - Applies to / 対象: RCOSDP/RDM-osf.io-dev2027 PR #11; `b4bc1341885dcb6725c1e3f27333d9ca9d0ef873..31413021787fa53bcc4a1d189d5ea31991b47e44`. - Reviewer / レビュワ: REV(担当レビュワ, Codex Astra). @@ -28,7 +29,7 @@ The security review covers `b4bc134188..33327d537e`, incorporating PR #8's priva Merge `8a0589168a` has parents `b4bc134188` and `b0d4bb8d37`; their common ancestor is `73ff43b3c21f3258f6d34ca99b77ef66f1191e0e`. The second private-access merge `33327d537e` adds develop `66ce3a573c` without changing the tree (the complete file contents and modes). Both merge trees are `adaa3fa3ab675465e23f47bae33f04b287a0356e`. -The parent audit finds nine shared changed paths, 15 ES8-only paths and 109 private-access-only paths. Fourteen ES8-only paths are byte-identical to that parent; the remaining path is the deliberately revised hidden-field test. Of the private-access-only paths, 105 are byte-identical and four are the reviewed test adaptations. No path outside the union of the parents' changes is altered. This is a comparison of committed trees, not a branch merge performed by the reviewer. +The parent audit finds nine shared changed paths, 15 ES8-only paths and 109 private-access-only paths. Fourteen ES8-only paths are byte-identical to that parent; the remaining path is a deliberately revised result-visibility test. Of the private-access-only paths, 105 are byte-identical and four are the reviewed test adaptations. No path outside the union of the parents' changes is altered. This is a comparison of committed trees, not a branch merge performed by the reviewer. The nine shared paths are the four conflict files plus `website/search/util.py`, `website/search_migration/migrate.py`, `website/settings/defaults.py`, `tasks/__init__.py`, and `osf_tests/test_elastic_search.py`. The last four retain both the ES8 changes and #8's private-site indexing/defaults/test setup. The directory and resource-permission implementations in `osf/models/user.py`, `node.py`, `preprint.py`, and `collection.py` are byte-identical to #8. The ES8 query translator, client-query policy, and API parser are byte-identical to r6. @@ -40,9 +41,9 @@ The nine shared paths are the four conflict files plus `website/search/util.py`, `website/search/util.py:330` obtains current database read rights, including group access and primary descendants of administrators. On private sites, public flags and stale indexed contributor fields cannot grant access. Nodes and preprints are limited by their current identifiers; files use readable node/preprint identifiers; wikis and metadata use readable node identifiers; comments use current, non-deleted comments on readable nodes. Collections require both readable collection membership and a readable collected resource. The integration correctly prefixes the collection-submission allow-list with `doc_id('collectionSubmission', identifier)` to match ES8's physical identifiers, while returned identifiers retain their original API form. -`website/search/util.py:310` and `elastic_search.py:2254` retain the shared-user directory boundary, including self and current project/preprint collaborators, and exclude unregistered, disabled or merged accounts. The exact-email alternative stays inside the ANDed identifier allow-list; uppercase exact-email lookup remains a positive control for a shared user and returns nothing for an unshared user. Counts, tags and aggregations receive the same authorization query before execution. Multilingual normalization only rewrites text queries and leaves identifier restrictions intact. +`website/search/util.py:310` and `elastic_search.py:2254` retain the shared-user directory boundary, including self and current project/preprint collaborators, and exclude unregistered, disabled or merged accounts. Every alternative match condition stays inside the ANDed identifier allow-list; a positive control still finds a shared user, and an unshared user is not returned. Counts, tags and aggregations receive the same authorization query before execution. Multilingual normalization only rewrites text queries and leaves identifier restrictions intact. -`website/search/elastic_search.py:1002` suppresses parent title and URL on private sites even if the parent retains a historical public flag. The parent-title regression retains both the private negative and public positive controls. ES8 hidden-source and highlight stripping, public visibility filtering, document-type restrictions and typed comment/file writes and deletes survive the merge. `node_is_ignored`, node/file updates and SQL migration allow private-site shared records to be indexed when `ENABLE_PRIVATE_SEARCH=false`; public sites keep their prior private-indexing behavior. The additional node-based check on comment indexing preserves r6's protection and does not reinstate public-flag authorization on private sites. +`website/search/elastic_search.py:1002` suppresses parent title and URL on private sites even if the parent retains a historical public flag. The parent-title regression retains both the private negative and public positive controls. ES8's result-visibility controls, public visibility filtering, document-type restrictions and typed index writes and deletes survive the merge. The indexing and migration paths allow private-site shared records to be indexed when `ENABLE_PRIVATE_SEARCH=false`; public sites keep their prior indexing behavior. The additional indexing check preserves r6's protection and does not reinstate public-flag authorization on private sites. Public behavior is assessed against the combined intended parents: #8 deliberately narrows user discovery, including on public sites. The merge does not undo that policy to restore r6's unrestricted user-search assumption. Public node visibility, public parent information, and the public omitted-query default remain supported; the ES8 input restrictions remain those already reviewed in r6. @@ -52,7 +53,7 @@ Public behavior is assessed against the combined intended parents: #8 deliberate The two #8 live-search modules now use the configured ES8 client, require an 8.x server, and replace old index/delete/analyze calls with their ES8 equivalents. All existing expected identifier sets, counts, revocation checks, collection permissions and preprint assertions are preserved. The new endpoint test adds two parametrized cases, with private search false and true; each verifies v1 POST and API v2 GET, a shared positive control, a hidden historically public node, and immediate removal after sharing is revoked. -The hidden-field suite changes its positive requester to a shared reader so that a missing result cannot make a privacy assertion pass vacuously. It retains rejection of querying private fields, absence of emails in returned/highlighted text, and the title-based positive control for hidden-contributor queries. A separate unshared negative test checks both name and exact email. The three other r6 ES8 modules are byte-identical. Other integration test adaptations only remove an ES2 client override or allow keyword arguments in mocks; they do not remove assertions. +The result-visibility suite changes its positive requester to a shared reader so that a missing result cannot make a privacy assertion pass vacuously. Its existing rejection checks and positive control are retained. A separate negative test checks an unshared user. The three other r6 ES8 modules are byte-identical. Other integration test adaptations only remove an ES2 client override or allow keyword arguments in mocks; they do not remove assertions. Local `git diff --check b4bc134188 HEAD` and `bash -n .github/scripts/ci/run-tests.sh` passed. All 123 surviving Python files changed relative to either parent parsed successfully. Existing invalid-escape warnings in settings and tests are not parsing failures. The reviewer did not execute the application locally; runtime results are identified separately as CI evidence. AID's commit/comment reports 63 ES8 tests passed, 351 private-security tests passed and 209 public-search tests passed with 3 skips; those are author-reported results, not independent local executions by this reviewer. @@ -140,7 +141,7 @@ No corrective work is required within this scope. Overall acceptance remains wit マージ `8a0589168a` の両親は `b4bc134188` と `b0d4bb8d37`、共通祖先は `73ff43b3c21f3258f6d34ca99b77ef66f1191e0e`。非公開アクセス統合の後段マージ `33327d537e` は develop の `66ce3a573c` を取り込み、tree(全ファイルの内容とモード)は変更していない。両マージの tree は `adaa3fa3ab675465e23f47bae33f04b287a0356e` で一致する。 -親との監査では、共通変更は 9 パス、ES8 側だけの変更は 15 パス、非公開アクセス側だけの変更は 109 パス。ES8 側だけのうち 14 パスは親とバイト単位で同一で、残りは意図的に変更した非公開フィールドの試験である。非公開アクセス側だけのうち 105 パスは同一で、残り 4 パスは確認済みの試験移植である。両親の変更集合外に変更はない。これは記録済み tree の比較であり、レビュワがブランチをマージしたものではない。 +親との監査では、共通変更は 9 パス、ES8 側だけの変更は 15 パス、非公開アクセス側だけの変更は 109 パス。ES8 側だけのうち 14 パスは親とバイト単位で同一で、残りは意図的に変更した、検索結果の公開範囲の試験である。非公開アクセス側だけのうち 105 パスは同一で、残り 4 パスは確認済みの試験移植である。両親の変更集合外に変更はない。これは記録済み tree の比較であり、レビュワがブランチをマージしたものではない。 共通の 9 パスは衝突した 4 ファイルと `website/search/util.py`、`website/search_migration/migrate.py`、`website/settings/defaults.py`、`tasks/__init__.py`、`osf_tests/test_elastic_search.py`。後ろの 4 ファイルは ES8 の変更と #8 の非公開サイト用索引・既定値・試験設定を両立する。`osf/models/user.py`・`node.py`・`preprint.py`・`collection.py` の利用者一覧・資料権限の実装は #8 とバイト単位で同一。ES8 の検索条件変換・クライアント入力ポリシー・API parser は r6 と同一である。 @@ -152,9 +153,9 @@ No corrective work is required within this scope. Overall acceptance remains wit `website/search/util.py:330` はデータベースの現在の閲覧権限を取得し、グループ権限と管理者の主系列子孫への権限を含める。非公開サイトでは公開フラグや索引中の古い共同作業者情報から閲覧権限を得られない。ノードと preprint は現在閲覧可能な識別子、ファイルは閲覧可能なノード・preprint の識別子、wiki と metadata は閲覧可能なノードの識別子、コメントは閲覧可能なノードにある未削除コメントで制限する。collection 投稿には collection と収集対象の両方の閲覧権限が必要である。統合では許可リストへ `doc_id('collectionSubmission', identifier)` の接頭辞を付けて ES8 の物理識別子に正しく合わせ、応答の識別子は従来の API 形式に戻す。 -`website/search/util.py:310` と `elastic_search.py:2254` は、本人と現在のプロジェクト・preprint 共同作業者に限る利用者一覧境界を保持し、未登録・無効化・統合済みアカウントを除く。完全一致メールの代替条件も識別子許可リストとの AND の内側にある。大文字メールで共有利用者を発見する陽性対照を維持し、未共有利用者は返さない。件数・タグ・集計にも同じ認可条件を実行前に適用する。多言語処理は文字列検索だけを書き換え、識別子の制限を保持する。 +`website/search/util.py:310` と `elastic_search.py:2254` は、本人と現在のプロジェクト・preprint 共同作業者に限る利用者一覧境界を保持し、未登録・無効化・統合済みアカウントを除く。別の一致条件もすべて、識別子許可リストとの AND の内側にある。共有利用者を見つける陽性対照を維持し、未共有利用者は返さない。件数・タグ・集計にも同じ認可条件を実行前に適用する。多言語処理は文字列検索だけを書き換え、識別子の制限を保持する。 -`website/search/elastic_search.py:1002` は、親に過去の公開フラグが残っていても非公開サイトでは親のタイトル・URL を抑制する。親タイトルの回帰試験は非公開時の陰性対照と公開時の陽性対照を保持する。ES8 の非公開 source・強調表示フィールド除去、公開可視性フィルター、文書型制限、型付き ID によるコメント・ファイルの登録/削除も残る。`node_is_ignored`、ノード・ファイル更新、SQL 移行処理は `ENABLE_PRIVATE_SEARCH=false` でも非公開サイトの共有資料を索引化でき、公開サイトでは従来の非公開索引の動作を維持する。コメント索引の追加ノード検査は r6 の保護を保持し、非公開サイトに公開フラグだけの認可を復活させない。 +`website/search/elastic_search.py:1002` は、親に過去の公開フラグが残っていても非公開サイトでは親のタイトル・URL を抑制する。親タイトルの回帰試験は非公開時の陰性対照と公開時の陽性対照を保持する。ES8 の検索結果の公開範囲の制御、公開可視性フィルター、文書型制限、型付き ID による索引の登録/削除も残る。索引化と移行の処理は `ENABLE_PRIVATE_SEARCH=false` でも非公開サイトの共有資料を索引化でき、公開サイトでは従来の索引化の動作を維持する。索引化の追加検査は r6 の保護を保持し、非公開サイトに公開フラグだけの認可を復活させない。 公開時の動作は両親を統合した意図に対して評価した。#8 は公開サイトも含めて利用者の発見範囲を意図的に狭めている。マージは r6 の全利用者検索という前提へ戻すためにこの方針を緩めていない。公開ノードの可視性、公開時の親情報、公開 POST の query 省略は引き続き対応し、ES8 の入力制限は r6 で確認済みのものである。 @@ -164,7 +165,7 @@ No corrective work is required within this scope. Overall acceptance remains wit #8 の実検索 2 モジュールは設定済み ES8 クライアントを使い、8.x サーバーを必須とし、旧 index/delete/analyze 呼び出しを ES8 対応へ置き換える。既存の識別子集合・件数・権限取消・collection 権限・preprint の期待値はすべて保持する。新しい endpoint 試験は private search が false と true の 2 ケースを追加し、それぞれ v1 POST と API v2 GET、共有の陽性対照、過去の公開フラグを持つ非共有ノードの非表示、共有解除の即時反映を確認する。 -非公開フィールド試験の陽性対照は共有 reader に変更した。結果が空だから情報漏えいの検査を通過する事態を避けるためである。非公開フィールドの検索拒否、応答・強調表示中にメールがないこと、非表示共同作業者の検索に対するタイトル検索の陽性対照は残る。別の未共有陰性試験で名前と完全一致メールの双方を確認する。r6 の他の ES8 3 モジュールはバイト単位で同一である。その他の統合試験の変更は ES2 クライアント上書きの除去か mock のキーワード引数対応だけで、assertion を削除していない。 +検索結果の公開範囲の試験は、陽性対照を共有 reader に変更した。結果が空だから非公開の検査を通過する事態を避けるためである。既存の拒否の検査と陽性対照は残る。別の陰性試験で、未共有の利用者を確認する。r6 の他の ES8 3 モジュールはバイト単位で同一である。その他の統合試験の変更は ES2 クライアント上書きの除去か mock のキーワード引数対応だけで、assertion を削除していない。 ローカルの `git diff --check b4bc134188 HEAD` と `bash -n .github/scripts/ci/run-tests.sh` は成功した。いずれかの親との差分に含まれる残存 Python 123 ファイルの構文解析も成功した。settings と試験の既存 invalid-escape 警告は構文エラーではない。レビュワはアプリケーションをローカル実行しておらず、実行結果は CI の証拠として別記する。AID の commit/comment は ES8 63 件成功、private-security 351 件成功、公開検索 209 件成功・3 件 skip を報告しているが、これは作成者の報告であり、レビュワが独立してローカル実行した結果ではない。 diff --git a/docs/reviews/2026-11-13_RDM-osf.io-dev2027_PR8_Mandatory_Auth_r8.md b/docs/reviews/2026-11-13_RDM-osf.io-dev2027_PR8_Mandatory_Auth_r8.md index 54701a8..2da18bf 100644 --- a/docs/reviews/2026-11-13_RDM-osf.io-dev2027_PR8_Mandatory_Auth_r8.md +++ b/docs/reviews/2026-11-13_RDM-osf.io-dev2027_PR8_Mandatory_Auth_r8.md @@ -5,6 +5,7 @@ **Jump:** [English](#english) · [日本語](#japanese) +- Version / 版: 0.2 — 2026-11-17. **Learned:** before publication, wording that could hint at search vulnerabilities still unfixed upstream was made generic; the verdict, finding IDs and conclusions are unchanged. / 公開前に、上流で未修正の脆弱性の手がかりになる記述を一般的な表現に改めた。判定・指摘番号・結論は変えていない。 - Version / 版: 0.1 — 2026-11-13. **Learned:** An explicit owner decision can defer a tracked CI gap without making it complete; green checks on an unchanged head do not establish the result of combining it with a newer base. / 所有者の明示判断により CI の不足を未完のまま追跡して繰り延べられますが、変更のない head の成功だけでは、新しいベースとの組合せを検証したことにはなりません。 - Applies to / 対象: RCOSDP/RDM-osf.io-dev2027 PR #8, head `d1258ec1402f62c354b7a095cb5bcfed1ef4eb9d`, and its prospective integration with develop `89f666cccbcdcef2e6eb51120ca672ae1eaf54b1`. - Reviewer / レビュワ: REV(担当レビュワ, Codex Astra). @@ -47,7 +48,7 @@ uncollected_files[3]: ### Local evidence and its limits -REV read both supplied QAE logs and compared the first log's executed file names to the source inventory. All 19 files appear, including the three missing from ordinary CI. The full run collected 349 tests and ended with 348 passed, 1 failed, exit 1. The only failure is `TestLiveUserDirectorySearch.test_results_counts_exact_email_and_revocation[False-True]`, with `No mapping found for [sort_file_name] in order to sort on`. The second log collects all three cases in the same file and reports 3 passed. +REV read both supplied QAE logs and compared the first log's executed file names to the source inventory. All 19 files appear, including the three missing from ordinary CI. The full run collected 349 tests and ended with 348 passed, 1 failed, exit 1. The only failure is one case of `TestLiveUserDirectorySearch` (parameters `[False-True]`), with `No mapping found for [sort_file_name] in order to sort on`. The second log collects all three cases in the same file and reports 3 passed. The source parameterization identifies `[False-True]` as multilingual false and Japanese true. Japanese index settings use kuromoji and ICU, and the intended mapping includes `sort_file_name`; index creation/mapping calls tolerate certain HTTP errors. This supports the reported missing-analyzer/mapping explanation, together with the successful rerun. The failure log itself does not name a missing plugin, so the exact environmental cause remains QAE's attribution, not an independently reproduced diagnosis. @@ -148,7 +149,7 @@ uncollected_files[3]: ### ローカル証拠とその限界 -REV は指定の QAE ログ 2 件を読み、最初のログで実行されたファイル名をソースの一覧と比較しました。通常 CI が収集しない 3 件を含む全 19 ファイルが現れます。全体実行は 349 件を収集し、348 passed・1 failed・exit 1 で終わっています。失敗は `TestLiveUserDirectorySearch.test_results_counts_exact_email_and_revocation[False-True]` だけで、`No mapping found for [sort_file_name] in order to sort on` と一致します。2 本目のログは同ファイルの全 3 ケースを収集し、3 passed です。 +REV は指定の QAE ログ 2 件を読み、最初のログで実行されたファイル名をソースの一覧と比較しました。通常 CI が収集しない 3 件を含む全 19 ファイルが現れます。全体実行は 349 件を収集し、348 passed・1 failed・exit 1 で終わっています。失敗は `TestLiveUserDirectorySearch` の 1 ケース(パラメーター `[False-True]`)だけで、`No mapping found for [sort_file_name] in order to sort on` と一致します。2 本目のログは同ファイルの全 3 ケースを収集し、3 passed です。 ソースのパラメーター順から `[False-True]` は多言語 false・日本語 true です。日本語の索引設定は kuromoji と ICU を使い、本来の mapping に `sort_file_name` があり、索引作成・mapping 設定は一部の HTTP エラーを許容します。再実行の成功と合わせ、解析器・mapping 不足という説明と整合します。ただし失敗ログ自体には不足プラグイン名がなく、環境に関する原因の断定は QAE の報告であり、REV が独立再現した診断ではありません。 diff --git a/docs/reviews/2026-11-17_RDM-developer-guide_PR105_Soften_Search_Wording_r1.md b/docs/reviews/2026-11-17_RDM-developer-guide_PR105_Soften_Search_Wording_r1.md new file mode 100644 index 0000000..e41f5b9 --- /dev/null +++ b/docs/reviews/2026-11-17_RDM-developer-guide_PR105_Soften_Search_Wording_r1.md @@ -0,0 +1,43 @@ +# PR105 Search wording review r1 / 検索の表現のレビュー r1 + +> **Summary:** CHANGES REQUESTED: publication wording remains incomplete, and one provenance statement needs qualification. +> **概要:** CHANGES REQUESTED。公開用の表現の一般化に残りがあり、来歴の説明にも限定が必要です。 + +**Jump:** [English](#english) · [日本語](#japanese) + +- Version / 版: 0.1 — 2026-11-17. **Learned:** publication review must include unchanged documents and qualify historical verbatim claims when wording is later generalized. / 公開前の確認では未変更の文書も調べ、後から表現を一般化した場合は原文維持の過去の説明に限定を加える必要がある。 +- Applies to / 対象: RCOSDP/RDM-developer-guide [PR #105](https://github.com/RCOSDP/RDM-developer-guide/pull/105), head `d8c227689785a7e783941b3d688d203a8f2b8afb`. +- Reviewer / レビュワ: REV(担当レビュワ, Codex Astra). +- Related: [Review index](README.md) · [SPEC-06](../spec/06_documentation_conventions.md) · [Status / Used by](../status/README.md). + +--- + + +## English + +[→ 日本語版へ](#japanese) + +**Verdict: CHANGES REQUESTED.** The owner's 2026-11-17 decision is the review criterion; no concrete sensitive details are repeated here. + +1. **R1-01 (P2)** — hint-level detail remains at `docs/decisions/ADR-14_Elasticsearch_8_with_TLS_and_Authentication.md:3`, `:4`, `:31`, `:73`, and `docs/demo/20_core_install_mac_studio.md:626`, `:1390`. Apply the same generic wording policy in both languages, preserve historical results, and add version entries before publication. +2. **R1-02 (P2)** — `docs/reviews/2026-11-12_RDM-osf.io-dev2027_PR11_Search_ES8_r4.md:9`: the provenance paragraph still says all text except the earlier metadata and publication references is verbatim. Version 0.3 now changes substantive wording beyond those exceptions. Qualify that statement as describing version 0.2, or explicitly include the owner-authorized 0.3 wording changes in both languages; preserve the original hash and provenance. + +The base-to-head diff contains only the six declared Markdown files; the develop merge introduces no unrelated PR changes. Review verdicts, finding IDs, PR numbers, explicit anchors and headings are preserved. The paired English/Japanese edits retain the review conclusions and evidence limits. New versions are first and dated 2026-11-17: r4 is 0.3, the other four reviews are 0.2, and status is 0.42. The status contact row consistently records private RCOSDP-only contact after the owner's final check, with nothing sent. Historical review dates remain unchanged. Apart from R1-02, no material record-meaning inconsistency was found. + +Validation on the exact head: `python3 tools/docs_check.py` passed (293 checked, 8 exempt, 71 warnings); `git diff --check origin/develop...HEAD` passed. Targeted searches covered `docs/`, including unchanged documents; they establish the listed leftovers, not an exhaustive security clearance. CI was checked once after review: all 13 checks passed, including [documentation build](https://github.com/RCOSDP/RDM-developer-guide/actions/runs/44016758294), policy/security checks and installer unit tests. No application vulnerability reproduction was attempted. Resolve R1-01 and R1-02, then review the revised head. + +--- + + +## 日本語 + +[→ To English](#english) + +**判定: CHANGES REQUESTED。** 2026-11-17 の所有者の判断を確認基準とし、具体的な機微情報は再掲しません。 + +1. **R1-01(P2)** — `docs/decisions/ADR-14_Elasticsearch_8_with_TLS_and_Authentication.md:3`、`:4`、`:31`、`:73` と `docs/demo/20_core_install_mac_studio.md:626`、`:1390` に hint-level detail remains(手がかりになる記述が残っています)。両言語に同じ一般化の方針を適用し、過去の結果を保持して版を追加してから公開してください。 +2. **R1-02(P2)** — `docs/reviews/2026-11-12_RDM-osf.io-dev2027_PR11_Search_ES8_r4.md:9` の来歴は、以前のメタデータと公開用参照以外の本文が原文どおりと説明したままです。版 0.3 はその例外以外の本文も変更しています。版 0.2 時点の説明だと限定するか、所有者が認めた版 0.3 の表現変更も例外に含めてください。両言語を合わせ、原本のハッシュと来歴は保持してください。 + +ベースから head への差分は指定の Markdown 6 ファイルのみで、develop のマージによる無関係な PR 変更はありません。判定・指摘番号・PR 番号・明示アンカー・見出しは保持されています。英和の変更は結論と証拠の限界を維持しています。新版は先頭にあり、日付は 2026-11-17、r4 は 0.3、ほかのレビュー 4 件は 0.2、進捗は 0.42 です。進捗の連絡行は、所有者の最終確認後に RCOSDP の内部だけへ非公開で連絡し、まだ送っていない点で英和が一致します。過去のレビュー日付は保持されています。R1-02 以外に記録の意味の実質的な不整合は見つかりませんでした。 + +指定 head で `python3 tools/docs_check.py` は成功(検査 293、免除 8、警告 71)、`git diff --check origin/develop...HEAD` も成功しました。未変更文書を含む `docs/` の対象検索で記載の残りを確認しましたが、網羅的なセキュリティ保証ではありません。レビュー後に CI を一度確認し、[文書ビルド](https://github.com/RCOSDP/RDM-developer-guide/actions/runs/44016758294)、方針・セキュリティ検査、インストーラー単体試験を含む全 13 検査が成功していました。製品の脆弱性の再現は実施していません。R1-01 と R1-02 の修正後に、新しい head を再確認してください。 diff --git a/docs/reviews/2026-11-17_RDM-developer-guide_PR105_Soften_Search_Wording_r2.md b/docs/reviews/2026-11-17_RDM-developer-guide_PR105_Soften_Search_Wording_r2.md new file mode 100644 index 0000000..fbf7782 --- /dev/null +++ b/docs/reviews/2026-11-17_RDM-developer-guide_PR105_Soften_Search_Wording_r2.md @@ -0,0 +1,59 @@ +# PR105 Search wording review r2 / 検索の表現のレビュー r2 + +> **Summary:** CHANGES REQUESTED: the previously cited passages are fixed, but additional hint-level detail remains. +> **概要:** CHANGES REQUESTED。前回指定した箇所は修正済みですが、別の箇所に手がかりになる記述が残っています。 + +**Jump:** [English](#english) · [日本語](#japanese) + +- Version / 版: 0.1 — 2026-11-17. **Learned:** fixing cited passages does not complete publication review; related summaries and unchanged paragraphs need the same wording check. / 指定箇所の修正だけでは公開前の確認は終わらず、関連する要約と未変更の段落にも同じ表現の確認が必要。 +- Applies to / 対象: RCOSDP/RDM-developer-guide [PR #105](https://github.com/RCOSDP/RDM-developer-guide/pull/105), head `d83234333637c0082bd6cf7dfa5327db50f66498`. +- Reviewer / レビュワ: REV(担当レビュワ, Codex Astra). +- Related: [Review index](README.md) · [SPEC-06](../spec/06_documentation_conventions.md) · [Status / Used by](../status/README.md). + +--- + + +## English + +[→ 日本語版へ](#japanese) + +**Verdict: CHANGES REQUESTED.** + +**R2-01 (P2): hint-level detail remains** at these locations on the reviewed head: + +- `docs/decisions/ADR-14_Elasticsearch_8_with_TLS_and_Authentication.md:25`, `:38`, `:67`, `:80` +- `docs/spec/02_installer_cli.md:173`, `:424` +- `docs/status/README.md:112`, `:202` +- `docs/decisions/README.md:43`, `:94` + +Apply the owner's generic-wording policy to these remaining passages in both languages, preserve their historical results, and maintain version entries. The exact occurrences cited by R1-01 are corrected, but the broader publication requirement remains incomplete. These additional locations were found during r2; they are not newly introduced by the fix. + +**R1-02 resolved.** The r4 provenance paragraph at line 9 now limits its verbatim statement to version 0.2 and explicitly records the owner-authorized version 0.3 generalization in both languages. The original hash is unchanged. + +The r1-to-r2 delta changes only ADR-14, DEMO-20 and the r4 provenance paragraph. ADR-14 version 0.4 and DEMO-20 version 0.31 are first, dated 2026-11-17, with older entries retained. Historical results, verdicts, finding IDs, PR numbers, headings and explicit anchors are preserved; the reviewed English/Japanese edits agree. The complete PR changes eight documentation files and no application code. Status remains version 0.42 and retains the recorded owner decision. + +`python3 tools/docs_check.py` passed on the exact head: 293 checked, 8 exempt, 71 warnings. `git diff --check origin/develop...HEAD` passed. Targeted searches across readable files under `docs/` and inspection of the matches found the listed residual passages; this is not an exhaustive security clearance. CI was checked once: all 13 checks passed, including the [documentation workflow](https://github.com/RCOSDP/RDM-developer-guide/actions/runs/44017167747). No application vulnerability reproduction was attempted. Resolve R2-01 and request review of the revised head. + +--- + + +## 日本語 + +[→ To English](#english) + +**判定: CHANGES REQUESTED。** + +**R2-01(P2): hint-level detail remains(手がかりになる記述が残っています)**。対象 head の箇所は次のとおりです。 + +- `docs/decisions/ADR-14_Elasticsearch_8_with_TLS_and_Authentication.md:25`, `:38`, `:67`, `:80` +- `docs/spec/02_installer_cli.md:173`, `:424` +- `docs/status/README.md:112`, `:202` +- `docs/decisions/README.md:43`, `:94` + +残る箇所にも所有者の一般化の方針を両言語で適用し、過去の結果を保持して版を管理してください。R1-01 で指定した箇所は修正済みですが、公開前の要件全体は未完了です。今回の追加箇所は r2 で確認したもので、修正により新たに導入されたものではありません。 + +**R1-02 は解消。** r4 の 9 行目の来歴は、原文どおりだったという説明を版 0.2 の時点に限定し、所有者が認めた版 0.3 の一般化を両言語に明記しています。原本のハッシュは保持されています。 + +r1 から r2 の差分は ADR-14、DEMO-20、r4 の来歴段落だけです。ADR-14 の版 0.4 と DEMO-20 の版 0.31 は先頭にあり、日付は 2026-11-17、過去の版も保持されています。過去の結果・判定・指摘番号・PR 番号・見出し・明示アンカーは保持され、確認した英和の変更は一致しています。PR 全体は文書 8 件の変更だけで、製品コードの変更はありません。進捗の版 0.42 と所有者判断も保持されています。 + +指定 head の `python3 tools/docs_check.py` は成功(検査 293、免除 8、警告 71)。`git diff --check origin/develop...HEAD` も成功しました。`docs/` の読めるファイル全体への対象検索と一致箇所の確認で記載の残りを発見しましたが、網羅的なセキュリティ保証ではありません。CI は一度確認し、[文書 workflow](https://github.com/RCOSDP/RDM-developer-guide/actions/runs/44017167747) を含む全 13 検査が成功していました。製品の脆弱性の再現は実施していません。R2-01 を修正し、新しい head のレビューを依頼してください。 diff --git a/docs/reviews/2026-11-17_RDM-developer-guide_PR105_Soften_Search_Wording_r3.md b/docs/reviews/2026-11-17_RDM-developer-guide_PR105_Soften_Search_Wording_r3.md new file mode 100644 index 0000000..8ec02e5 --- /dev/null +++ b/docs/reviews/2026-11-17_RDM-developer-guide_PR105_Soften_Search_Wording_r3.md @@ -0,0 +1,45 @@ +# PR105 Search wording review r3 / 検索の表現のレビュー r3 + +> **Summary:** PASS. The author response is accepted and R2-01 is withdrawn after reassessment against the owner's publication criterion. +> **概要:** PASS。所有者の公開基準に照らして再評価し、作者の回答を受け入れて R2-01 を撤回します。 + +**Jump:** [English](#english) · [日本語](#japanese) + +- Version / 版: 0.1 — 2026-11-17. **Learned:** a publication finding needs a supported connection to an unfixed issue; the presence of an operational identifier alone does not establish that connection. / 公開前の指摘には未修正の問題との裏付けのある関連が必要であり、運用上の識別子があるだけではその関連は成立しない。 +- Applies to / 対象: RCOSDP/RDM-developer-guide [PR #105](https://github.com/RCOSDP/RDM-developer-guide/pull/105), unchanged head `d83234333637c0082bd6cf7dfa5327db50f66498`. +- Reviewer / レビュワ: REV(担当レビュワ, Codex Astra). +- Related: [Review index](README.md) · [SPEC-06](../spec/06_documentation_conventions.md) · [Status / Used by](../status/README.md). + +--- + + +## English + +[→ 日本語版へ](#japanese) + +**Verdict: PASS. No open findings within the requested scope.** + +**R2-01 withdrawn; author response accepted without a code or documentation change.** I re-read all ten cited locations against the owner's criterion: generalize wording that provides a clue to the specific vulnerabilities still unfixed upstream. Those passages describe deployment configuration, initialization, compatibility and general access restrictions. I cannot substantiate a connection from those passages to a specific unfixed disclosure or bypass. R2-01 treated the occurrence of operational identifiers as sufficient evidence and therefore applied a broader criterion than the owner requested. This is a correction of the review judgment, not a claim that the head changed or that public availability alone makes every detail acceptable. + +The reassessed locations are `docs/decisions/ADR-14_Elasticsearch_8_with_TLS_and_Authentication.md:25,38,67,80`, `docs/spec/02_installer_cli.md:173,424`, `docs/status/README.md:112,202`, and `docs/decisions/README.md:43,94`. No concrete sensitive details are repeated in this record. No further generalization is required at those locations under the stated criterion. + +R1-01's originally cited passages remain corrected. R1-02 remains resolved: the bilingual provenance distinguishes version 0.2 from the owner-authorized version 0.3 wording changes and retains the original hash. The r2 verification of historical results, verdicts, finding IDs, PR numbers, anchors, English/Japanese correspondence and version entries still applies to this unchanged head. Earlier review records remain historical records; this r3 judgment supersedes the R2-01 blocking conclusion. + +Validation is carried forward from r2 on the same head: `python3 tools/docs_check.py` passed (293 checked, 8 exempt, 71 warnings), the whitespace check passed, and all 13 CI checks passed. CI and tests were not rerun for this reassessment, as requested. The [previously checked documentation workflow](https://github.com/RCOSDP/RDM-developer-guide/actions/runs/44017167747) identifies the retained CI evidence. This review covers publication wording and record integrity, not an independent security certification of the upstream application. No corrective work remains for this PR review; merge and publication remain with the coordinator and owner. + +--- + + +## 日本語 + +[→ To English](#english) + +**判定: PASS。依頼範囲に未解消の指摘はありません。** + +**R2-01 を撤回し、コード・文書の変更なしで作者の回答を受け入れます。** 指定した 10 箇所を、上流で未修正の特定の脆弱性への手がかりになる表現を一般化する、という所有者の基準で読み直しました。これらは配備設定、初期化、互換性、一般的なアクセス制限を説明しています。特定の未修正の情報公開や制限回避につながる記述だという裏付けは示せません。R2-01 は運用上の識別子の存在だけを根拠として扱い、所有者が求めた範囲より広い基準を適用していました。これはレビュー判断の訂正であり、head が変更されたという意味でも、公開済みならどの詳細も許されるという意味でもありません。 + +再評価した箇所は `docs/decisions/ADR-14_Elasticsearch_8_with_TLS_and_Authentication.md:25,38,67,80`、`docs/spec/02_installer_cli.md:173,424`、`docs/status/README.md:112,202`、`docs/decisions/README.md:43,94` です。この記録には具体的な機微情報を再掲していません。指定の基準では、これらの箇所の追加の一般化は不要です。 + +R1-01 で当初指定した箇所は修正済みのままです。R1-02 も解消を維持しています。来歴は版 0.2 と所有者が認めた版 0.3 の表現変更を両言語で区別し、原本のハッシュを保持しています。過去の結果・判定・指摘番号・PR 番号・アンカー・英和対応・版についての r2 の確認は、この未変更の head に引き続き適用されます。以前のレビュー記録は履歴として保持し、R2-01 による阻害判定は今回の r3 の判断で更新します。 + +検証結果は同一 head の r2 から引き継ぎます。`python3 tools/docs_check.py` は成功(検査 293、免除 8、警告 71)、空白検査も成功し、CI 全 13 件が成功しています。依頼どおり、この再評価では CI と試験を再実行していません。[確認済みの文書 workflow](https://github.com/RCOSDP/RDM-developer-guide/actions/runs/44017167747) が保持する CI 証拠です。対象は公開用の表現と記録の整合性であり、上流製品の独立したセキュリティ認証ではありません。この PR レビューで必要な修正は残っておらず、マージと公開はコーディネーターと所有者に委ねます。 diff --git a/docs/status/README.md b/docs/status/README.md index b5921d3..571a0c3 100644 --- a/docs/status/README.md +++ b/docs/status/README.md @@ -5,7 +5,8 @@ **Jump:** [English](#english) · [日本語](#japanese) -- Version / 版: 0.41 — 2026-11-17. **Learned:** an owner decision that spans two UIs is pinned in one step: Quick Files retired from the classic navigation (osf.io `d95e0abfae4a`, #46) and the ember screens (ember-osf-web `a0d25ef70168`, #6) passed 18 in core together (DEMO-20 0.30). / 二つの画面にまたがる所有者の決定は一度に固定する。旧来の画面のナビ(osf.io `d95e0abfae4a`、#46)と ember の画面(ember-osf-web `a0d25ef70168`、#6)からの Quick Files の回収は、一緒に core で合格 18 だった(DEMO-20 0.30)。 +- Version / 版: 0.42 — 2026-11-17. **Learned:** a public board names an open vulnerability report only in general terms: wording that could hint at search vulnerabilities still unfixed upstream was made generic before publication. / 公開前に、上流で未修正の脆弱性の手がかりになる記述を一般的な表現に改めた。 + 0.41 — 2026-11-17. **Learned:** an owner decision that spans two UIs is pinned in one step: Quick Files retired from the classic navigation (osf.io `d95e0abfae4a`, #46) and the ember screens (ember-osf-web `a0d25ef70168`, #6) passed 18 in core together (DEMO-20 0.30). / 二つの画面にまたがる所有者の決定は一度に固定する。旧来の画面のナビ(osf.io `d95e0abfae4a`、#46)と ember の画面(ember-osf-web `a0d25ef70168`、#6)からの Quick Files の回収は、一緒に core で合格 18 だった(DEMO-20 0.30)。 0.40 — 2026-11-17. **Learned:** the image of a pin is built under its own SHA even when its tree was proven under another: osf.io `01999360e094` (#44, the wiki import cancel now reaches the worker) passed 18 in core on its identical-tree test merge (DEMO-20 0.29). / 固定版のイメージは、tree を別の SHA で証明していても、その固定版の SHA で組む。osf.io `01999360e094`(#44、Wiki の取り込みの取消が worker に届くようになった)は同じ tree の試しのマージで core で合格 18 だった(DEMO-20 0.29)。 0.39 — 2026-11-16. **Learned:** a test merge deployed before the merge proves the merge commit when the trees match: osf.io `567a03eefab0` (#41) passed 16 in core on its identical-tree test merge (DEMO-20 0.28). / マージ前に配備した試しのマージは、tree が一致すればマージコミットの証拠になる。osf.io `567a03eefab0`(#41)は同じ tree の試しのマージで core で合格 16 だった(DEMO-20 0.28)。 0.38 — 2026-11-16. **Learned:** most of an image's unfixable findings can come from one optional tool: dropping pspp from MFR (owner decision 2026-11-16, .sav previews answer 400) removed 106 packages and 36 of the 58 allow-list entries, 3 CRITICAL among them; Trivy on the new image found 47 HIGH and 0 CRITICAL, all accepted by the 11 remaining MFR entries, so the allow-list holds 22, below M2's 58 (pending RDM-modular-file-renderer-dev2027 PR #8 and its merge pin). / イメージの修正できない検出の大半は、一つの任意の道具から来ることがある。MFR から pspp を外すと(所有者の判断 2026-11-16、.sav のプレビューは 400)、パッケージ 106 個と許容リスト 58 項目のうち 36 項目(CRITICAL 3 件を含む)が消えた。新しいイメージの Trivy は HIGH 47、CRITICAL 0 で、すべて残る MFR の 11 項目で許容されるので、許容リストは 22 項目になり M2 の 58 を下回る(RDM-modular-file-renderer-dev2027 PR #8 とそのマージの固定版が前提)。 @@ -121,9 +122,9 @@ M3 started on 2026-11-13, when the owner closed M2 (「一括で承認、M2 完 |---|---| | Real amd64 hardware: one uninterrupted one-command install, acceptance with the committed suite, a complete `scan` | ⏳ Open (owner decision 2026-11-13: recorded as a known limit, M3 or later). So far only an emulated VM ([DEMO-22](../demo/22_core_install_ubuntu_amd64_lima.md#english)); on that VM the final pins later passed 14 of 14 with `--wait-scale 10` and a complete `scan`, but not in one uninterrupted command (DEMO-22 0.7); on 2026-11-14 the one command returned 0 in a single run there too (DEMO-22 0.8, warm Docker cache). From an empty Docker it took two attempts there (DEMO-22 0.9). Still open: the same on real hardware, in one uninterrupted run | | WSL2 (Windows 11) | ⏳ Open (same decision). Not run; it needs a Windows 11 machine ([DEMO-21](../demo/21_core_install_ubuntu_arm64_lima.md#english), [ADR-08 §5](../decisions/ADR-08_Per_OS_Installer_Entry_Points.md#english)) | -| Reporting the search information-leak vulnerabilities upstream | ⏳ **Undecided** (owner decision 2026-11-13). A draft report will be prepared and the owner asked again before anything is sent. Nothing has been sent, and no draft is in this repository | +| Contacting upstream (RCOSDP) about vulnerabilities, handled privately | ⏳ Owner decision 2026-11-17: contact RCOSDP only, privately. A draft is ready and will be sent only after the owner's final check. Nothing has been sent, and no draft is in this repository | | CI that needs a token with the `workflow` scope: `installer-prereq-lint.yml`, `installer-full.yml` and their helper on branch `feat/per-os-installers` ([ADR-08 §9](../decisions/ADR-08_Per_OS_Installer_Entry_Points.md#english)), and the `images.yml` smoke test | 🔄 Pushed in PR #65 (scope granted 2026-11-14); the `images.yml` smoke test now starts the Elasticsearch 8 image instead of the removed Elasticsearch 2 recipe. `installer-full.yml` still has to be started by hand once, with the repository secret `GRDM_INTEGRATION_READ_TOKEN` | -| osf.io R7-01: the private-search security CI job (RDM-osf.io-dev2027 issue #16) | ⏳ Open: PR #8 was merged with R7-01 deferred by the owner to issue #16 (review r8 in [docs/reviews/](../reviews/README.md)); with the scope granted, RDM-osf.io-dev2027 PR #22 (opened 2026-11-14) adds the `private_security` job and waits for its CI run and REV | +| osf.io R7-01: the private-mode security CI job (RDM-osf.io-dev2027 issue #16) | ⏳ Open: PR #8 was merged with R7-01 deferred by the owner to issue #16 (review r8 in [docs/reviews/](../reviews/README.md)); with the scope granted, RDM-osf.io-dev2027 PR #22 (opened 2026-11-14) adds the `private_security` job and waits for its CI run and REV | | Review of the allow-list entries (58 at M2 exit, **22** since 2026-11-16; expiry 2026-12-31) | 🔄 **36 removed on 2026-11-16:** pspp left the MFR image (owner decision「pspp を外す。.sav はプレビュー不可」, RDM-modular-file-renderer-dev2027 PR #8; `.sav` previews answer 400 "not supported", as `.step`/`.stp` since freecad left). Debian ships pspp with its GTK 3 GUI, and every package of the 36 MFR entries (krb5 14, libxml2 8, expat 4, pspp 2, cups 2, tiff 2, libxi 2, libx11 1, libxrender 1; 3 CRITICAL) came only with it. Trivy 0.75.0 (DB 2026-11-16) on the image of the PR head `7a554e2`: 0 CRITICAL / 47 HIGH, all accepted by the 11 remaining MFR entries, no new finding; the image `9771b8cf` had 3 / 127. The MFR entry for CVE-2026-16742 now names only `libsystemd0` and `libudev1`. PR #8 merged on 2026-11-16 as `f2ec516c` with a tree identical to the tested head (`064a840f`), and the guide's MFR pin now names that merge commit. The remaining 22 (11 WaterButler, 11 MFR) are `python:3.13-slim` base packages without a trixie fix and are due by 2026-12-31: an expired entry is ignored and its findings count again (SPEC-03 §5.1 rule 4). At M3 the ceiling is still 58 (the M2 exit count) until the owner records the M3 count, so the gate would accept new entries up to 58; each new entry (for example for the Elasticsearch 8 image's Ubuntu packages, [ADR-14](../decisions/ADR-14_Elasticsearch_8_with_TLS_and_Authentication.md#english)) still needs the owner's approval (SPEC-03 §5.1) and narrows the margin under the M3 criterion | | Authenticated ZAP scan of `web` | ⏳ Not done; no owner decision on when | | Preview from the new ember UI (API v2) | ⏳ Carried from §2b: the server-side change RDM-osf.io-dev2027 PR #14 is in osf.io `develop` ([DEMO-20](../demo/20_core_install_mac_studio.md#english)) and RDM-ember-osf-web-dev2027 PR #3 is merged; open: a check on the real ember screen after deployment — no acceptance scenario covers the ember preview yet, so success is not shown | @@ -211,9 +212,9 @@ M3 は、所有者が M2 を閉じた 2026-11-13 に始まった(「一括で |---|---| | amd64 の実機: 途切れない一つのコマンドでの導入、コミットした試験での受入、完走した `scan` | ⏳ 未了(2026-11-13 の所有者の判断: 既知の限界として記録し、M3 以降)。これまではエミュレーションの VM だけ([DEMO-22](../demo/22_core_install_ubuntu_amd64_lima.md#japanese))。その VM で最終の固定版は、のちに `--wait-scale 10` で 14 件中 14 件合格し `scan` も完走したが、途切れない一つのコマンドではなかった(DEMO-22 0.7)。2026-11-14 には、その VM で一つのコマンドも一回の実行で終了 0 になった(DEMO-22 0.8、Docker のキャッシュは温まった状態)。空の Docker からはその VM で 2 回の実行を要した(DEMO-22 0.9)。残り: 実機で、途切れない一回の同じ実行 | | WSL2(Windows 11) | ⏳ 未了(同じ判断)。未実行で、Windows 11 の機械が要る([DEMO-21](../demo/21_core_install_ubuntu_arm64_lima.md#japanese)、[ADR-08 §5](../decisions/ADR-08_Per_OS_Installer_Entry_Points.md#japanese)) | -| 検索の情報漏えいの脆弱性を上流へ報告すること | ⏳ **未決**(2026-11-13 の所有者の判断)。報告の下書きを用意し、何かを送る前に所有者に改めて尋ねる。何も送っておらず、このリポジトリに下書きは無い | +| 上流(RCOSDP)への脆弱性の連絡(非公開で扱う) | ⏳ 2026-11-17 の所有者の判断: RCOSDP の内部だけに、非公開で連絡する。下書きは用意済みで、所有者の最終確認の後にだけ送る。何も送っておらず、このリポジトリに下書きは無い | | `workflow` スコープのトークンが要る CI: ブランチ `feat/per-os-installers` の `installer-prereq-lint.yml`・`installer-full.yml` とその補助([ADR-08 §9](../decisions/ADR-08_Per_OS_Installer_Entry_Points.md#japanese))、`images.yml` のスモーク試験 | 🔄 PR #65 で push した(2026-11-14 に権限が付いた)。`images.yml` のスモーク試験は、外した Elasticsearch 2 のレシピの代わりに Elasticsearch 8 のイメージを起動する。`installer-full.yml` は、リポジトリのシークレット `GRDM_INTEGRATION_READ_TOKEN` を用意して一度手で起動する必要がある | -| osf.io の R7-01: 非公開検索のセキュリティ CI ジョブ(RDM-osf.io-dev2027 の issue #16) | ⏳ 未了。PR #8 は、所有者が R7-01 を issue #16 へ繰り延べたうえでマージされた([docs/reviews/](../reviews/README.md) のレビュー r8)。権限が付いたので、`private_security` ジョブを足す RDM-osf.io-dev2027 PR #22(2026-11-14)が CI の実行と REV を待つ | +| osf.io の R7-01: 非公開モードのセキュリティ CI ジョブ(RDM-osf.io-dev2027 の issue #16) | ⏳ 未了。PR #8 は、所有者が R7-01 を issue #16 へ繰り延べたうえでマージされた([docs/reviews/](../reviews/README.md) のレビュー r8)。権限が付いたので、`private_security` ジョブを足す RDM-osf.io-dev2027 PR #22(2026-11-14)が CI の実行と REV を待つ | | 許容リストの項目の見直し(M2 終了時 58、2026-11-16 から **22**。期限 2026-12-31) | 🔄 **2026-11-16 に 36 項目を削除:** MFR のイメージから pspp を外した(所有者の判断「pspp を外す。.sav はプレビュー不可」、RDM-modular-file-renderer-dev2027 PR #8。`.sav` のプレビューは、freecad を外した後の `.step`/`.stp` と同じく 400「対応していない」になる)。Debian の pspp は GTK 3 の GUI と一体で、MFR の 36 項目のパッケージ(krb5 14、libxml2 8、expat 4、pspp 2、cups 2、tiff 2、libxi 2、libx11 1、libxrender 1。CRITICAL 3 件)はすべてそれだけが持ち込んでいた。PR の先頭 `7a554e2` のイメージの Trivy 0.75.0(DB 2026-11-16): CRITICAL 0 / HIGH 47、すべて残る MFR の 11 項目で許容され、新しい検出は無い。`9771b8cf` のイメージは 3 / 127 だった。MFR の CVE-2026-16742 の項目は `libsystemd0` と `libudev1` だけを名指す。PR #8 は 2026-11-16 に、試した先頭と同じ tree(`064a840f`)の `f2ec516c` としてマージされ、ガイドの MFR の固定版はそのマージコミットを指す。残る 22 項目(WaterButler 11、MFR 11)は trixie に修正の無い `python:3.13-slim` のベースのパッケージで、2026-12-31 までに見直す。期限切れの項目は無視され、その検出はまた数えられる(SPEC-03 §5.1 規則 4)。所有者が M3 の件数を記録するまで M3 の上限は 58(M2 の終了時の件数)のままなので、門は 58 項目までの追加を通す。それでも新しい項目(たとえば Elasticsearch 8 のイメージの Ubuntu パッケージ、[ADR-14](../decisions/ADR-14_Elasticsearch_8_with_TLS_and_Authentication.md#japanese))には所有者の承認が要り(SPEC-03 §5.1)、M3 の条件に対する余裕を狭める | | `web` の認証した ZAP の検査 | ⏳ 未実施。時期についての所有者の判断は無い | | 新しい ember の画面(API v2)からのプレビュー | ⏳ §2b から持ち越し。サーバー側の変更 RDM-osf.io-dev2027 PR #14 は osf.io の `develop` にあり([DEMO-20](../demo/20_core_install_mac_studio.md#japanese))、RDM-ember-osf-web-dev2027 PR #3 はマージ済み。残り: 配備後の ember の実画面での確認。ember のプレビューを試す受入シナリオはまだ無く、成功は示していない |