verify turns a baseline-accepted finding back to open

Offen
#193 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Anfängerfreundlichkeit
78/100
Issue-Typ
Bug
Klarheit
Klar beschrieben
Aktivitätsstatus
Aktiv
Tech-Stack
go
Bereich
cli, security

Rechercherichtung

Read internal/engine/verify.go at the listed Verify locations, then check how baselines are applied in internal/finding/baseline.go and internal/engine/run.go. Add a test for verifying a baseline accepted finding whose proof still succeeds; run make test-short and confirm the finding remains accepted and its SARIF suppression is retained.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

bug severity: low

Summary

spackle verify on a run made with a baseline moves every accepted finding whose proof still reproduces back to open.

Where

  • internal/engine/verify.go:151, :172, :277 (Verify sets StatusOpen unconditionally)
  • internal/finding/baseline.go:144
  • internal/engine/run.go:666 (baseline applied after the proof)

Details

A scan applies the baseline when it writes a finding, after the proof ran, so a finding can be accepted and still have a demonstrated proof and a stored manifest. Verify selects jobs by proof status only and, when the proof still succeeds, sets f.Status = finding.StatusOpen. Verify never loads the baseline, and the accept reason is left on the now-open finding. Read from the code; not executed.

Impact

The report shows the finding as open with an "Accepted because" line, the SARIF suppression is dropped, and gates or comparisons that read the stored run count it again.

Steps to reproduce

  1. Agentic scan with a container runtime and a baseline entry matching a finding that the prover demonstrates; the run stores it as accepted.
  2. Run spackle verify <run> without changing the code.
  3. The stored status becomes open.

Suggested fix

In Verify, keep the accepted status when the proof still succeeds (only update the proof result), or clear the accept reason and re-apply the configured baseline before appending. Decide separately whether an accepted finding whose proof no longer succeeds should become fixed.

Acceptance criteria

  • A test verifies a run with an accepted, demonstrated finding and asserts the status stays accepted
  • The SARIF suppression is still present after verify

Related: #81

Getting started

  • Relevant files: internal/engine/run.go, internal/engine/verify.go, internal/finding/baseline.go
  • How to run tests: make test-short (Unix) or .\make.ps1 test-short (Windows PowerShell); make lint before you call it done
  • Related docs: CONTRIBUTING.md, docs/ARCHITECTURE.md

Filed by repo-audit/full-audit at 50e92ec. Severity: low. Effort: S. audit-key: bug|internal/engine/verify.go|Verify-accepted-status

Vorherrschende Sprache
Go
Sterne
0
Forks
1
Ø Merge
8 Std. 14 Min.
Gemergte PRs (30 T.)
3

Entwicklungsumgebung

In Codespaces öffnen

Startet den Dev-Container des Projekts im Browser, mit Ihrem eigenen GitHub-Konto.

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus TMHSDigital/Spackle

Alle Issues in TMHSDigital/Spackle

Ähnliche Issues

Weitere Issues zu Go

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.