Bug: `testEndpoint` URL Scheme Not Validated
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
cmd/test.go の testEndpoint から始め、flag の値が Microcks API に渡される前にどこで読み取られるかを確認する。url.Parse で解析し、http と https 以外の scheme を拒否し、microcks test に関するコマンドレベルのテストを追加または更新する。完了条件は、無効な scheme が API 呼び出しの前にクライアント側で失敗し、有効な HTTP および HTTPS エンドポイントは引き続き動作すること。
索引モデルが issue の本文から書いたものです。
説明
Describe the bug
testEndpoint URL Scheme Not Validated
Description
In cmd/test.go, testEndpoint is only validated for non-emptiness and leading hyphens. The string is not parsed with url.Parse, nor is its scheme validated against an allowlist (http, https). Users can pass arbitrary URIs such as file:///etc/passwd, ftp://..., or cloud metadata endpoints (http://169.254.169.254/latest/meta-data), causing the remote Microcks server to initiate unintended network requests.
Steps to Reproduce
- Execute a test targeting cloud metadata:
microcks.exe test "API:1.0" "http://169.254.169.254/latest/meta-data/" HTTP --microcksURL http://localhost:8080/api - The CLI passes the endpoint directly to the Microcks API without client-side scheme validation.
Recommended Fix
Parse testEndpoint with url.Parse and enforce that u.Scheme is either "http" or "https".
- 主要言語
- Go
- スター
- 59
- フォーク
- 74
- 平均マージ
- 5日 4時間
- マージ済み PR(30日)
- 25
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
microcks/microcks-cli のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
microcks/microcks-cli#601 ·
メンテナーはふだん 1 日以内に返信
-
bug: microcks login ignores the --config flag and always modifies default config対応中かも @aryarathoree が 2 日前に担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
microcks/microcks-cli#594 · コメント 5 件 ·
メンテナーはふだん 1 日以内に返信
-
Wrong link to test results対応中かも @SajanBisht が 12 日前に担当しました。 オープンcomponent/cli keep-open kind/bug
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
microcks/microcks-cli#589 · コメント 4 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
Default configuration path falls back to the current directory when the home directory cannot be determined対応中かも @Sarthak-Shreshtha01 が 16 日前に担当しました。 オープンcomponent/cli kind/bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
microcks/microcks-cli#583 · コメント 5 件 ·
メンテナーはふだん 1 日以内に返信
-
bug: YAML parse error in config is silently swallowed, login overwrites all other contexts対応中かも @Sarthak-Shreshtha01 が 21 日前に担当しました。 オープンcomponent/cli kind/bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
microcks/microcks-cli#572 · コメント 6 件 ·
メンテナーはふだん 1 日以内に返信
microcks/microcks-cli の issue をすべて見る
似ている issue
-
[Bug]: Anthropic Responses converter forwards empty text blocks, upstream rejects with 400対応中かも @david-choi-querypie が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
area:web p3
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
Lets-Parley/Parley#912 ·
メンテナーはふだん 1 日以内に返信
-
bug observability
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
sagar2395/snowopslabs#164 ·
メンテナーはふだん 1 日以内に返信
-
enhancement help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
Git-Hospital/githealthcheck#61 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
afreidah/s3-orchestrator#1824 ·
メンテナーはふだん 1 日以内に返信