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

Bug: `testEndpoint` URL Scheme Not Validated

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

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

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

評価

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

調査の方向性

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
  1. 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
    
  2. 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

環境構築

はじめの一歩

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

microcks/microcks-cli のほかの issue

microcks/microcks-cli の issue をすべて見る

似ている issue

Go の issue をもっと見る

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

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