G findings: distribution and gitea's package registry delete their old finding keys once at start
Builds: design 47 G A-31, A-14, A-22 Claude-Session: https://claude.ai/code/session_01JG73KEq4zoDfM9WtYpcQgZ
This commit is contained in:
@@ -517,6 +517,10 @@ func main() {
|
||||
// the runtime answers the writer's subscription only once Serve has its channel
|
||||
go func() {
|
||||
<-stdio.Served()
|
||||
// the keys of the older form end in no kind the writer owns, so it does not clear them (A-31)
|
||||
if err := holder.DeleteOldFindings(stdio.State("findings"), holder.Self, holder.TransferFindingKinds); err != nil {
|
||||
logf("the old findings are not deleted: %v", err)
|
||||
}
|
||||
if err := w.Start(context.Background()); err != nil {
|
||||
logf("%v", err)
|
||||
os.Exit(1)
|
||||
|
||||
@@ -74,6 +74,10 @@ func run(ctx context.Context, getenv func(string) string) error {
|
||||
return err
|
||||
}
|
||||
findings.Writer = w
|
||||
// the keys of the older form end in no kind the writer owns, so it does not clear them (A-31)
|
||||
if err := holder.DeleteOldFindings(calls.State("findings"), holder.Self, holder.DriverFindingKinds); err != nil {
|
||||
logger.Printf("the old findings are not deleted: %v", err)
|
||||
}
|
||||
if err := w.Start(ctx); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user