From 4e443febd7d69a556da19a587027a116477f14ac Mon Sep 17 00:00:00 2001 From: crozzy Date: Thu, 26 Mar 2026 09:29:20 -0700 Subject: [PATCH] photon: reconstruct URL from release string Using the raw release string wasn't yielding the correct updater URL, this change converts the release into the correct photon OVAL URL format. Signed-off-by: crozzy --- photon/photon.go | 3 ++- photon/updaterset.go | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/photon/photon.go b/photon/photon.go index ad27585f0..2e098ca84 100644 --- a/photon/photon.go +++ b/photon/photon.go @@ -3,6 +3,7 @@ package photon import ( "fmt" "net/url" + "strings" "github.com/quay/claircore/libvuln/driver" "github.com/quay/claircore/pkg/ovalutil" @@ -44,7 +45,7 @@ func NewUpdater(r Release, opts ...Option) (*Updater, error) { } if u.Fetcher.URL == nil { var err error - u.Fetcher.URL, err = upstreamBase.Parse("com.vmware.phsa-" + string(u.release) + ".xml") + u.Fetcher.URL, err = upstreamBase.Parse("com.vmware.phsa-photon" + strings.TrimSuffix(string(u.release), ".0") + ".xml") if err != nil { return nil, err } diff --git a/photon/updaterset.go b/photon/updaterset.go index 14c41a259..3a6596181 100644 --- a/photon/updaterset.go +++ b/photon/updaterset.go @@ -11,6 +11,8 @@ var photonReleases = []Release{ Photon1, Photon2, Photon3, + Photon4, + Photon5, } func UpdaterSet(_ context.Context) (driver.UpdaterSet, error) {