[Bug]: RSS feed reuses guids and ignores PATCHCALL_URL
維護者通常 1 天內回覆
評估
研究方向
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.
由索引模型根據 Issue 內容生成。
描述
What happened?
Three small slips in the RSS feed at /feed.xml:
- 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
- The channel link is
http://plus whatever Host header the request came in with, not thePATCHCALL_URLyou set, so it's alwayshttp://even when you're on https, and it's whatever host the request happened to use - 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
- Set
PATCHCALL_URL=https://patchcall.example.com, then openhttp://localhost:<port>/feed.xml- the channel<link>ishttp://localhost:<port>/ - 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 - 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
- Guid:
internal/web/web.go:301usesit.App + " " + it.Hit.ID. Add the version, to match the alert key ininternal/check/check.go:263(app, version, advisory) - Link:
internal/web/web.go:193passes"http://"+r.Host+"/". Use the public URL (opts.PublicURL, which the alerts already use ininternal/check/report.go:97) when it's set, and only fall back to the Host header without it - Empty start:
Runininternal/check/check.go:112-116returns beforereport.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.
- 主要語言
- Go
- 星號
- 3
- 分支
- 1
- 平均合併
- 1 小時 11 分鐘
- 30 天內合併 PR
- 10
環境準備
- 提供 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
NotAFlightRisk/patchcall 的其他 Issue
-
bug good first issue
難度 2/5 1-3 小時 新手友好度 90/100
NotAFlightRisk/patchcall#11 ·
維護者通常 1 天內回覆
查看 NotAFlightRisk/patchcall 的全部 Issue
相似的 Issue
-
internal/core: cleanAttachmentName splits a rune at the 255-byte cap and stores invalid UTF-8可能已有人在做 @pacwestnobody 今天認領。 未關閉go good first issue help wanted
難度 2/5 1-3 小時 新手友好度 88/100
維護者通常 1 天內回覆
-
TestLaunchGolden spends about 98 seconds on fake-agent exit delays under -race可能已有人在做 關聯的 PR 仍在進行中或已合併。 未關閉
難度 2/5 1-3 小時 新手友好度 76/100
維護者通常 1 天內回覆
-
factory:subtask
難度 1/5 1 小時以內 新手友好度 95/100
維護者通常 1 天內回覆
-
documentation enhancement good first issue
難度 2/5 1-3 小時 新手友好度 78/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 76/100
limelit-co/open#75 ·