Running-target scans cannot be authenticated
还没有人认领这个 Issue。
评估
调研方向
Start in internal/dast/client.go: read where ClientOptions.Headers is validated and merged in NewClient, then trace the sole caller at internal/engine/live.go:116 to see what it currently sets. Decide on the header source (a [scope] config table or --header flag reading env vars) and thread it through to NewClient, and add the authenticated/unauthenticated run note where crawl results are summarised (internal/dast/crawl.go nearby). Done is when make test and make lint pass, a scoped host's headers reach every request, and the report states whether credentials were sent. Read docs/ARCHITECTURE.md first.
由索引模型根据 Issue 内容生成。
描述
Summary
The live-target client has a tested option for operator-supplied headers that nothing sets, and no cookie jar, so only the unauthenticated surface is assessed and the report does not say so.
Where
internal/dast/client.go:71-72internal/dast/client.go:115-127internal/dast/client.go:129-137internal/engine/live.go:116-118internal/dast/crawl.go:133-135
Details
ClientOptions.Headers is documented as "sent on every request (operator-supplied authentication)" and is validated and merged in NewClient. Its only caller, engine/live.go:116, sets UserAgent and OnRecord and nothing else, and no config key or flag feeds it. The http.Client is built without a Jar, so a Set-Cookie from a login response is recorded and then forgotten. Meanwhile crawl.go:133 skips logout-like links "so it does not end the session it is using".
Impact
The baseline and the endpoint investigator only ever see the unauthenticated surface of the target. Nothing in the run notes says so, so a report on an application that is mostly behind a login reads as coverage of the application. The validated, tested header path is dead code from the product's point of view.
Suggested fix
Either wire it up (a [scope] headers table or --header flag whose values are read from environment variables, masked in exchanges as maskRequestHeaders already does) or remove the option and add a fixed run note: "Requests were sent without credentials; pages behind a login were not examined."
Acceptance criteria
- Headers can be supplied from the environment for a scoped host
- The report states whether the scan was authenticated
Getting started
- Relevant files:
internal/dast/client.go,internal/engine/live.go,internal/dast/crawl.go - How to run tests:
make test(Unix) or.\make.ps1 test(Windows PowerShell); lint withmake lint - Related docs:
CONTRIBUTING.md,AGENTS.md,docs/ARCHITECTURE.md
Filed by repo-audit/full-audit at 35948f7. Severity: low. Effort: M. audit-key: enhancement|internal/dast/client.go|ClientOptions.Headers
- 主要语言
- Go
- 星标
- 0
- 派生
- 1
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 提供 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
TMHSDigital/Spackle 的其他 Issue
-
enhancement good first issue severity: low
难度 2/5 半天 新手友好度 72/100
TMHSDigital/Spackle#139 ·
-
enhancement good first issue severity: low
难度 2/5 1-3 小时 新手友好度 72/100
TMHSDigital/Spackle#138 ·
-
documentation good first issue severity: low
难度 2/5 1-3 小时 新手友好度 78/100
TMHSDigital/Spackle#135 ·
-
bug good first issue severity: low
难度 2/5 1-3 小时 新手友好度 72/100
TMHSDigital/Spackle#131 ·
-
bug good first issue severity: low
难度 2/5 1-3 小时 新手友好度 78/100
TMHSDigital/Spackle#129 ·
查看 TMHSDigital/Spackle 的全部 Issue
相似的 Issue
-
bug raised-by:reviewer
难度 2/5 1-3 小时 新手友好度 66/100
medici-finance/assay#7655 ·
维护者通常 1 天内回复
-
helm chart: make DaemonSet pod affinity configurable via values.yaml可能已有人在做 @Young-Zen 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 72/100
flannel-io/flannel#2632 ·
维护者通常 6 天内回复
-
go-vulnerability security-scan
难度 1/5 1 小时以内 新手友好度 72/100
teslashibe/agent-go#36 ·
-
enhancement
难度 2/5 1-3 小时 新手友好度 72/100
nwverse/persona#15194 · 1 条评论 ·
维护者通常 1 天内回复
-
bug flaky-test
难度 2/5 1-3 小时 新手友好度 78/100
rosskukulinski/tailworks#411 ·
维护者通常 1 天内回复