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
- 星标
- 59
- 派生
- 74
- 平均合并
- 5 天 17 小时
- 30 天内合并 PR
- 22
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 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 于 3 天前认领。 未关闭
难度 1/5 1 小时以内 新手友好度 88/100
microcks/microcks-cli#594 · 5 条评论 ·
维护者通常 1 天内回复
-
Wrong link to test results可能已有人在做 @SajanBisht 于 3 天前认领。 未关闭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 于 17 天前认领。 未关闭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 于 22 天前认领。 未关闭component/cli kind/bug
难度 2/5 1-3 小时 新手友好度 76/100
microcks/microcks-cli#572 · 6 条评论 ·
维护者通常 1 天内回复
查看 microcks/microcks-cli 的全部 Issue
相似的 Issue
-
ux
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
bug report
难度 2/5 1-3 小时 新手友好度 70/100
维护者通常 1 天内回复
-
type:bug
难度 2/5 1-3 小时 新手友好度 66/100
nightgauge/nightgauge#2732 ·
维护者通常 1 天内回复
-
fix below CVEs未关闭bug
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 5 天内回复
-
good first issue help wanted
难度 2/5 1-3 小时 新手友好度 78/100