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

allow (require?) limiting of available cmd targets

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

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

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
30/100
issue の種類
機能追加
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
python
領域
backend, security

調査の方向性

OP_CMD のディスパッチが実装されていると issue に記載されている Endpoint から始め、メソッドと属性がどのように選択されるかを追跡します。提案されているアンダースコアの拒否と、decorator ベースの whitelist の案を比較し、そのうえでアプローチを選択する前に、期待される動作と必要なテストを特定します。OP_CMD へのアクセスが一貫して制限され、その動作がテストでカバーされていれば完了です。

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

説明

enhancement

Currently, an OP_CMD can call any method of an endpoint. It would probably be good to restrict this in one or both of the following ways:

  1. any function which starts with an underscore (_) should be rejected with an error. The same should be true for setting attributes with the same name pattern.

  2. it should only be possible to call a restricted subset of "whitelisted" methods. I'm not sure exactly how this would work, but I think the nicest way would be to apply a decorator to functions we want to whitelist. We could also consider the other side and have a decorator which prevents a method from being called directly by an OP_CMD.

Item 1 should be easy to just add to the logic in Endpoint. Item 2 will require more thought and some experimenting.

主要言語
Python
スター
3
フォーク
6
PR マージ指標
30日以内にマージされた PR はありません

環境構築

  • Dockerfile または Docker Compose ファイルあり
  • プルリクエストのテンプレートあり
  • コントリビューションガイドなし

はじめの一歩

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

driplineorg/dripline-python のほかの issue

driplineorg/dripline-python の issue をすべて見る

似ている issue

Python の issue をもっと見る

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

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