Bug: `testEndpoint` URL Scheme Not Validated
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
研究方向
從 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
- 星號
- 58
- 分支
- 72
- 平均合併
- 4 天 7 小時
- 30 天內合併 PR
- 24
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 沒有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
microcks/microcks-cli 的其他 Issue
-
bug: microcks login ignores the --config flag and always modifies default config可能已有人在做 @aryarathoree 於 1 天前認領。 未關閉
難度 1/5 1 小時以內 新手友好度 88/100
microcks/microcks-cli#594 · 5 則留言 ·
維護者通常 1 天內回覆
-
Wrong link to test results可能重新可做 @SajanBisht 於 11 天前認領,目前沒有進行中的 PR。 未關閉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 於 15 天前認領。 未關閉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 於 20 天前認領。 未關閉component/cli kind/bug
難度 2/5 1-3 小時 新手友好度 76/100
microcks/microcks-cli#572 · 6 則留言 ·
維護者通常 1 天內回覆
-
import-dir uploads secondary artifacts before their primary API definition可能已有人在做 @doraem-on 於 27 天前認領。 未關閉component/cli kind/bug
難度 2/5 1-3 小時 新手友好度 88/100
microcks/microcks-cli#561 · 4 則留言 ·
維護者通常 1 天內回覆
查看 microcks/microcks-cli 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 82/100
維護者通常 2 天內回覆
-
test-failure
難度 2/5 1-3 小時 新手友好度 72/100
teramoby/speedle-plus#129 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 78/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 76/100
containerd/containerd#14485 ·
維護者通常 1 天內回覆
-
bug needs-triage
難度 2/5 1-3 小時 新手友好度 76/100
維護者通常 1 天內回覆