Record external scanner versions in runs and warn in doctor when they differ from the tested pins

未關閉
#140 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

評估

難度
3/5
預估耗時
1-2 天
新手友好度
62/100
Issue 類型
功能
描述清晰度
基本清楚
活躍度
活躍
技術堆疊
github-actions, go
領域
cli, security

研究方向

Start with the seed.Status struct in internal/seed/seed.go (around lines 70-77) and the scanner checks in internal/cli/doctor.go (around lines 122-129), then read .github/workflows/scanners.yml to see how the pinned versions are tested. Add a Version field to the status, fill it from each adapter's version command in internal/seed/external.go with a short timeout, and move the pins into one Go table. Done means the version shows in doctor's text and JSON output and doctor warns when an installed scanner differs from its pin; run go test ./internal/seed ./internal/cli.

由索引模型根據 Issue 內容生成。

描述

enhancement help wanted severity: low

Summary

Runs and spackle doctor do not record which external scanner versions produced the leads. .github/workflows/scanners.yml explains that a scanner release that renames a flag or field makes the adapter "return nothing", and the adapters are only tested against the pinned versions.

Where

  • internal/seed/seed.go:70-77 (seed.Status: name, availability, note, lead count, error; no version)
  • internal/cli/doctor.go:122-129 (a scanner is ok when exec.LookPath finds it)
  • .github/workflows/scanners.yml:3-15

Impact

Two runs of the same commit can differ because a scanner was upgraded, and nothing in the ledger or report shows it. Users on an untested scanner version get silently empty adapter output with no hint from doctor.

Suggested fix

Add Version string to seed.Status, filled once per run from each adapter's version command (gitleaks version, trivy --version, and so on) with a short timeout and the same output scrubbing. In doctor, show it with a warn when it differs from the tested pin, keeping the pins in one Go table that scanners.yml and the tool-versions check read. Print it on the report's seeder lines.

Acceptance criteria

  • Each external scanner's version appears in the run's seeder statuses and in doctor (text and JSON).
  • doctor warns when an installed scanner differs from the tested version.

Getting started

  • Relevant files: internal/seed/seed.go, internal/seed/external.go, internal/cli/doctor.go, .github/workflows/scanners.yml
  • How to run tests: go test ./internal/seed ./internal/cli

Filed by repo-audit/full-audit at fffef43. Severity: low. Effort: M. audit-key: enhancement|internal/seed/seed.go|Status

主要語言
Go
星號
0
分支
1
PR 合併指標
30 天內沒有已合併 PR

環境準備

在 Codespaces 中開啟

在瀏覽器裡用你自己的 GitHub 帳號啟動這個專案的開發容器。

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

TMHSDigital/Spackle 的其他 Issue

查看 TMHSDigital/Spackle 的全部 Issue

相似的 Issue

更多 Go Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。