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

bug(sdk/go): gateways with host-derived names (containing dots) cannot be loaded

オープン 初心者向け
#4,509 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

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

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
72/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
go
領域
api

調査の方向性

gateway/paths.go の validateGatewayName から始め、sdk/go/openshell/v1/gateway 配下で LoadConfig、NewClient(名前が空の場合のアクティブなゲートウェイの経路を含む)、ListGateways がこれをどのように呼び出しているかを追ってください。既存のパス検証テストを読み、どのトラバーサルのケースがすでにカバーされているかを確認してください。gw.example.com のようなドット付きの名前と IPv4 ホストが読み込まれ、一覧に表示され、アクティブとして解決される一方で、.. とパス区切り文字が引き続き拒否されれば完了です。

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

説明

state:triage-needed
User Story

I use OpenShell and build automation against its SDKs. While reviewing sdk/ I hit this behavior and reproduced it with the minimal test below against main. Any gateway added by URL without --name is affected.

Problem Statement

openshell gateway add https://gw.example.com derives the gateway name from the host (gw.example.com). The CLI accepts any single path component as a name, but the Go SDK's validateGatewayName rejects any name containing a dot (gateway/paths.go).

Impact / Why This Matters

gateway.NewClient("gw.example.com") and gateway.LoadConfig fail with invalid gateway name: name must not contain dots; when that gateway is the active one, NewClient("") fails too, and ListGateways() silently omits it. Users must re-register gateways under a dot-free name to use the Go SDK.

Acceptance Criteria
  • The Go SDK loads, lists and resolves (as active) any gateway name the CLI can create, including host-derived names such as gw.example.com and IPv4 hosts.
  • Path traversal (.., separators) is still rejected.
Reproduction Steps
  1. openshell gateway add https://gw.example.com (or create $XDG_CONFIG_HOME/openshell/gateways/gw.example.com/metadata.json with {"gateway_endpoint":"https://gw.example.com:443","auth_mode":"none"} and active_gateway = gw.example.com).
  2. Call gateway.LoadConfig("gw.example.com"), gateway.LoadConfig(""), gateway.ListGateways().
Suggested UX (if applicable)

No response

Environment
  • OpenShell: main @ 82977e2 (2026-10-13)
  • SDK: Go (sdk/go/openshell/v1/gateway)
  • Toolchain: Go 1.25.4 linux/amd64, Node 22
Logs
gateway: invalid gateway name: name must not contain dots
gateway: no active gateway: active_gateway contains invalid name "gw.example.com": gateway: invalid gateway name: name must not contain dots
ListGateways omits the CLI-registered gateway
主要言語
Rust
スター
16.3k
フォーク
1.8k
平均マージ
2日 5時間
マージ済み PR(30日)
402

環境構築

はじめの一歩

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

NVIDIA/OpenShell のほかの issue

NVIDIA/OpenShell の issue をすべて見る

似ている issue

Rust の issue をもっと見る

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

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