Findings enter the ledger from two writers kept consistent by a side map
還沒有人認領這個 Issue。
評估
研究方向
Start with recordFindings in internal/engine/run.go (around lines 341-383) and the runner.recorded field at lines 46-49, then read the early append in internal/engine/agentic.go near lines 432-444. Done means one method owns every write of a finding to the ledger, a table test in internal/engine covers the cap when more findings are already recorded than the limit, and the existing max_findings and interrupt tests still pass under go test ./internal/engine.
由索引模型根據 Issue 內容生成。
描述
Summary
recordFindings is documented as "the one place a finding of a code scan or a running-target scan enters the ledger". Since the max_findings and interrupt fixes, investigateOne also appends each finished finding immediately, and a runner.recorded side map tells the cap which findings it must keep. The cap assumes the kept set fits the limit, and nothing enforces that.
Where
internal/engine/run.go:341-383(recordFindings, the doc comment, and "The investigations are planned within the cap, so kept fits")internal/engine/run.go:46-49(runner.recorded)internal/engine/agentic.go:432-444(the early append)
Impact
Every rule about which findings reach the ledger (cap, validation, dedup) has to be reasoned about across two writers and a shared map. The two writers already validate differently: the early path skips an invalid finding silently, and the final path writes a reject. If planning ever stops respecting max_findings (a planner change, or resume carrying more findings), the report silently exceeds the limit.
Suggested fix
- Correct the doc comment at
run.go:341-348to describe both writers. - Move the early append into a
runner.persist(seq, f)method that ownsrecorded, and call it frominvestigateOne. - Take the cap decision from a pure
capFindings(findings, recorded, limit) (kept, dropped)with a table test that coverslen(recorded) > limit. Clamp, or add a note, when the assumption breaks. - Give both writers the same validation outcome.
Acceptance criteria
- One method owns writes of findings to the ledger.
- A table test covers the cap with more already-recorded findings than the limit.
- The existing
max_findingsand interrupt tests still pass.
Getting started
- Relevant files:
internal/engine/run.go,internal/engine/agentic.go - How to run tests:
go test ./internal/engine
Related: #113
Filed by repo-audit/full-audit at fffef43. Severity: low. Effort: S. audit-key: tech-debt|internal/engine/run.go|recordFindings
- 主要語言
- 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 天內回覆