From 44c4e605f5e278224a0828053ca8ba3818da2e62 Mon Sep 17 00:00:00 2001 From: dawn Date: Sat, 04 Jul 2026 15:19:38 +0000 Subject: [PATCH] appview/pipelines: ignore any pipelines returned that arent from the repo we requested Signed-off-by: dawn --- appview/pipelines/pipelines.go | 10 ++++++++++ 1 file(s) changed, 10 insertion(s)(+), 0 deletion(s)(-) diff --git a/appview/pipelines/pipelines.go b/appview/pipelines/pipelines.go --- a/appview/pipelines/pipelines.go +++ b/appview/pipelines/pipelines.go @@ -142,6 +142,11 @@ var pipelines []types.Pipeline for _, pipeline := range out.Pipelines { + if pipeline.Repo == nil || *pipeline.Repo != f.RepoDid { + l.Warn("spindle returned pipeline for unexpected repo", + "want", f.RepoDid, "got", pipeline.Repo, "spindle", f.Spindle) + continue + } pipelines = append(pipelines, types.Pipeline{CiPipeline: pipeline}) } @@ -205,6 +210,11 @@ return } + if out.Repo == nil || *out.Repo != f.RepoDid { + l.Debug("spindle returned pipeline for unexpected repo", "want", f.RepoDid, "got", out.Repo) + p.pages.Error404(w) + return + } // ensure workflow exists exist := false for _, workflow := range out.Workflows { -- tangled.sh