Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Paths taken from table metadata are used without containment checks against the table location

オープン
#3,973 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
56/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
python

調査の方向性

Start in pyiceberg/catalog/init.py at Catalog.purge_table and trace delete_data_files, then inspect LocationProvider.init in pyiceberg/table/locations.py and the WRITE_DATA_PATH and WRITE_METADATA_PATH handling. Determine how containment should be checked without breaking documented redirected locations. Done means paths outside the table location cannot be acted on, with regression coverage for both deletion and write-path cases.

索引モデルが issue の本文から書いたものです。

説明

bug

Two places where a path read from table metadata is acted on without any check that it falls under the table's own location.

1. purge_table deletes whatever paths the manifests name

Catalog.purge_table (pyiceberg/catalog/__init__.py) walks every snapshot, collects manifests, manifest lists and previous metadata files, and calls delete_data_files(io, manifests_to_delete). The file_path entries inside those manifests are followed as given. Nothing constrains them to the table's location, so a manifest naming a path elsewhere in the warehouse results in a delete against that path, performed with the credentials of whoever ran the purge.

2. write.data.path and write.metadata.path are accepted verbatim

if path := table_properties.get(TableProperties.WRITE_DATA_PATH):
    self.data_path = path.rstrip("/")
else:
    self.data_path = f"{self.table_location.rstrip('/')}/data"

LocationProvider.__init__ (pyiceberg/table/locations.py) takes the configured value as-is. Subsequent writes for that table go wherever it points, again with the writing principal's credentials.

Note that redirecting the write location is the documented purpose of these two properties, so the gap is the absence of a containment check rather than the fact that the properties are honoured at all.


Issue investigation generated via claude, reviewed by Sung, Kevin, Fokko.

主要言語
Python
スター
1.1k
フォーク
589
平均マージ
2日 2時間
マージ済み PR(30日)
70

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

apache/iceberg-python のほかの issue

apache/iceberg-python の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。