verify turns a baseline-accepted finding back to open

Open
#193 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
78/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
go
Domain
cli, security

Research direction

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.

Written by the indexing model from the issue text.

Description

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

Dominant language
Go
Stars
0
Forks
1
Avg merge
8h 14m
Merged PRs (30d)
3

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from TMHSDigital/Spackle

All issues in TMHSDigital/Spackle

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.