[Bug]: RSS feed reuses guids and ignores PATCHCALL_URL

Offen
#12 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

@amroquqa99-art arbeitet bereits daran.

Seit 29.11.2026.

  • #13 von @amroquqa99-art — offen

Bewertung

Schwierigkeit
3/5
Geschätzter Aufwand
Ein halber Tag
Anfängerfreundlichkeit
35/100
Issue-Typ
Bug
Klarheit
Klar beschrieben
Aktivitätsstatus
Veraltet
Tech-Stack
docker, go, xml
Bereich
backend

Rechercherichtung

Start with internal/web/web.go and internal/check/check.go, where the issue identifies the guid, channel link, and early-return paths. Review open PR #13 before starting to avoid duplicating work. Done means each feed item has a unique app/version/advisory guid, the channel uses the configured public URL when available, saved alerts populate the feed despite Docker startup failures, and the existing web and check tests cover all three cases.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

bug good first issue
What happened?

Three small slips in the RSS feed at /feed.xml:

  1. When an app moves to another version that's still caught by the same advisory, the new item gets the same guid as the old one, so feed readers think they've seen it and drop it. The guid is app plus advisory, but an alert is per app, version and advisory
  2. The channel link is http:// plus whatever Host header the request came in with, not the PATCHCALL_URL you set, so it's always http:// even when you're on https, and it's whatever host the request happened to use
  3. If Docker can't be listed when Patchcall starts, the feed's empty until Docker answers, even though the saved alerts are there
Steps to reproduce
  1. Set PATCHCALL_URL=https://patchcall.example.com, then open http://localhost:<port>/feed.xml - the channel <link> is http://localhost:<port>/
  2. For the guid, have an app caught by an advisory, then move it to another version that's also affected - the second alert's <guid> matches the first
  3. For the empty start, stop Docker (or point Patchcall at a socket that isn't there), restart Patchcall, and open /feed.xml
Version

1.0.0, and still there on main at 31c39ef

How are you running it?

Docker

Environment

Linux, Docker Engine

Relevant log output

None, nothing's logged for any of them.

Before submitting
  • I have searched existing issues for duplicates
  • I am running the latest version
  • I agree to follow this project's Code of Conduct
Fix
  1. Guid: internal/web/web.go:301 uses it.App + " " + it.Hit.ID. Add the version, to match the alert key in internal/check/check.go:263 (app, version, advisory)
  2. Link: internal/web/web.go:193 passes "http://"+r.Host+"/". Use the public URL (opts.PublicURL, which the alerts already use in internal/check/report.go:97) when it's set, and only fall back to the Host header without it
  3. Empty start: Run in internal/check/check.go:112-116 returns before report.Feed = c.state.Feed (line 151) when listing fails. Set the feed before that early return

A test for each in the existing web and check tests would be neat.

Vorherrschende Sprache
Go
Sterne
3
Forks
1
Ø Merge
1 Std. 11 Min.
Gemergte PRs (30 T.)
10

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus NotAFlightRisk/patchcall

Alle Issues in NotAFlightRisk/patchcall

Ähnliche Issues

Weitere Issues zu Go

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.