verify turns a baseline-accepted finding back to open

Aberta
#193 0 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
3/5
Tempo estimado
1-2 dias
Facilidade para iniciantes
78/100
Tipo de issue
Bug
Clareza
Claramente especificada
Status de atividade
Ativa
Stack de tecnologia
go
Domínio
cli, security

Direção de pesquisa

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.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

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

Linguagem predominante
Go
Estrelas
0
Forks
1
Merge médio
8h 14min
PRs com merge (30d)
3

Preparar o ambiente

Abrir no Codespaces

Inicia o contêiner de desenvolvimento do projeto no navegador, com a sua própria conta do GitHub.

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de TMHSDigital/Spackle

Todas as issues de TMHSDigital/Spackle

Issues semelhantes

Mais issues de Go

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.