Add a baseline file so accepted findings stop failing builds
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 40/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- go
調査の方向性
Start at exitFor in internal/cli/scan.go:167 and the status definitions in internal/finding/finding.go, then read how findings are serialized in internal/report/sarif.go. The issue leaves design choices open (line-dependent id vs. fingerprint, inline ignore syntax), so a first pass should settle those before coding. Done means the four acceptance criteria hold: baseline-matching findings exit 0, accepted findings appear in reports, stale entries are listed, and docs/ci.md and docs/config.md describe the workflow.
索引モデルが issue の本文から書いたものです。
説明
Summary
There is no way to accept a known finding. exitFor fails the run for any open or patch-available finding at or above fail_on, so teams adopting Spackle on an existing codebase must choose between fail-on: never (no gate) and a check that stays red.
Where
internal/cli/scan.go:167(exitFor)internal/finding/finding.go:30-40(statuses: open, dismissed, patch-available, fixed)docs/ci.md:113,docs/ci.md:136ROADMAP.md:37(lists baseline files as an intention; no issue tracks it)
Details
for _, f := range run.Findings {
unresolved := f.Status == finding.StatusOpen || f.Status == finding.StatusPatchAvailable
if unresolved && finding.LabelRank(f.Severity.Label) >= threshold {
return ExitFindings
}
}
docs/ci.md says the first PR on an existing codebase fails on old findings and that findings that predate the change "are not accepted or recorded anywhere". --since filters by file, so a PR that touches a file with an old finding still fails on it. A false positive can only be silenced for a whole rule (disable_rules) or path (exclude).
Suggested fix
spackle baseline <run-id> [--out .spackle-baseline.json]writes the run's active findings (id, title, location, optionalreason, optionalexpires).[scan] baseline = "path"and--baselineload it. Matching findings get a new status such asaccepted: kept in reports, emitted in SARIF assuppressionswithkind: external, and excluded fromexitFor.- Report baseline entries that no longer match anything.
- Open questions: match on the current line-dependent id or on a line-stable fingerprint (see the related fingerprint issue filed in this audit); whether an inline
spackle:ignore <rule>comment is also wanted.
Acceptance criteria
- A run with every finding in the baseline exits 0 under
--fail-on high. - Accepted findings still appear in every report format, marked as accepted.
- Stale baseline entries are listed.
- docs/ci.md and docs/config.md describe the workflow.
Getting started
- Relevant files:
internal/cli/scan.go,internal/finding/finding.go,internal/report/sarif.go,docs/ci.md - How to run tests:
make test(Unix) or.\make.ps1 test(Windows PowerShell); one package:go test ./internal/<pkg> - Related docs:
docs/ci.md,ROADMAP.md
Filed by repo-audit/full-audit at a7f6edc. Severity: high. Effort: M. audit-key: enhancement|internal/cli/scan.go|exitFor
- 主要言語
- Go
- スター
- 0
- フォーク
- 1
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- 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 日以内に返信