A scanner that fails but prints parseable JSON is reported as a clean run
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 65/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- go
- 領域
- security, testing-qa
調査の方向性
Read internal/seed/external.go around Run and semgrepReport, then inspect internal/seed/subprocess_test.go and the recorded fixture under internal/seed/testdata/real/. Add the missing valid-empty-report/non-zero-exit case and cover Semgrep error entries and its findings-present exit code. Run make test-short (or .\make.ps1 test-short on Windows) and make lint; done means all acceptance criteria pass.
索引モデルが issue の本文から書いたものです。
説明
Summary
The external scanner adapter looks at the exit status only when the report cannot be decoded. A scanner that exits with a fatal error while still printing an empty, valid report is recorded as available with zero leads and no error.
Where
internal/seed/external.go:382-392(Run:runErrdropped when the report decodes)internal/seed/external.go:628-649(semgrepReportdecodes onlyresults)internal/seed/subprocess_test.go:88(no case for non-zero exit with a valid empty report)
Details
The comment says scanners exit non-zero when they find something, so the exit status is only consulted when the report cannot be read. When the report decodes, the run error is dropped whatever the exit code. Semgrep's top-level errors array (present in the recorded fixture under internal/seed/testdata/real/) is not read.
Assumption (not run during the audit): on a fatal error such as a rule pack that cannot be downloaded or a rule file that does not parse, semgrep prints a report with errors and empty results and exits with a failure code.
Impact
Spackle records semgrep: available, leads 0 with no error, which reads exactly like a scan that found nothing. Per-file scanner errors (timeouts, parse failures) are lost the same way. This contradicts the adapter's own stated rule that dropping results is reported, never silent. Any adapter whose tool exits non-zero for a real failure while writing an empty report has the same hole.
Suggested fix
Give each adapter the exit codes that mean "ran to the end" and return an error, with the scrubbed stderr, for any other code even when stdout decodes. Decode semgrep's errors and count them in the parse statistics so partial failures appear in the seeder note.
Acceptance criteria
- Each adapter declares its success exit codes
- Table case: valid empty report with a failure exit code returns an error
- Semgrep
errorsentries appear in the seeder note - A scanner that exits with its "findings present" code still succeeds
Related: #95, #39
Getting started
- Relevant files: internal/seed/external.go, internal/seed/subprocess_test.go
- How to run tests:
make test-short(Unix) or.\make.ps1 test-short(Windows PowerShell);make lintbefore you call it done - Related docs: CONTRIBUTING.md, docs/ARCHITECTURE.md
Filed by repo-audit/full-audit at 50e92ec. Severity: medium. Effort: M. audit-key: reliability|internal/seed/external.go|external.Run-exit-status
- 主要言語
- Go
- スター
- 0
- フォーク
- 1
- 平均マージ
- 8時間 14分
- マージ済み PR(30日)
- 3
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
TMHSDigital/Spackle のほかの issue
-
ci good first issue severity: low
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
TMHSDigital/Spackle#206 ·
メンテナーはふだん 1 日以内に返信
-
ci severity: low
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
TMHSDigital/Spackle#205 ·
メンテナーはふだん 1 日以内に返信
-
bug good first issue severity: low
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
TMHSDigital/Spackle#199 ·
メンテナーはふだん 1 日以内に返信
-
bug good first issue severity: low
難易度 2/5 1〜3時間 初心者へのやさしさ 87/100
TMHSDigital/Spackle#195 ·
メンテナーはふだん 1 日以内に返信
-
documentation good first issue severity: medium
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
TMHSDigital/Spackle#188 ·
メンテナーはふだん 1 日以内に返信
TMHSDigital/Spackle の issue をすべて見る
似ている issue
-
bug effort:s impact:med raised-by:worker risk:low to:worker
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
medici-finance/assay#8120 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
factory:subtask
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
agent-substrate/substrate#4308 ·
メンテナーはふだん 2 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
celestiaorg/celestia-app#8877 ·
メンテナーはふだん 1 日以内に返信
-
sweep
難易度 1/5 1時間未満 初心者へのやさしさ 84/100
bketelsen/truenas-mcp#112 ·
メンテナーはふだん 1 日以内に返信