verify turns a baseline-accepted finding back to open

Ouverte
#193 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

Personne n'a encore pris cette issue.

Évaluation

Difficulté
3/5
Temps estimé
1-2 jours
Accessibilité débutants
78/100
Type d'issue
Bug
Clarté
Clairement spécifiée
Activité
Active
Stack technique
go
Domaine
cli, security

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

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

Langage dominant
Go
Étoiles
0
Forks
1
Merge moyen
8 h 14 min
PR mergées (30 j)
3

Préparer son environnement

Ouvrir dans Codespaces

Lance le conteneur de développement du projet dans votre navigateur, avec votre propre compte GitHub.

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de TMHSDigital/Spackle

Toutes les issues de TMHSDigital/Spackle

Issues similaires

Plus d'issues Go

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.