fix(security): guard skills.sh sitemap and detail HTTP fetches - #70336
fix(security): guard skills.sh sitemap and detail HTTP fetches#70336zapabob wants to merge 2 commits into
Conversation
Route skills.sh search/sitemap/featured/detail through _guarded_http_get and only follow sitemap locs that remain on skills.sh hosts. Co-authored-by: Cursor <cursoragent@cursor.com>
Related to #63920, which already routes the Skills Hub fetch family through the guarded redirect path more broadly. This narrower skills.sh-focused hardening may be useful to consolidate with that work. |
Co-authored-by: Cursor <cursoragent@cursor.com>
|
Thanks for narrowing the skills.sh SSRF hardening. Problems
Suggested changes
The production direction fits the existing |
|
This is a slice of #63920, not a leftover. #63920 already routes skills.sh search / sitemap / detail / featured through "Not merged yet" is not the same as "skills.sh is unguarded." Please don't land this as the skills.sh fix over #63920. |
Match the NousResearch#70336 mock pattern: SkillsSh search/sitemap/featured/detail now call _guarded_http_get so TestSkillsShSource patches of _ssrf_safe_http_get intercept instead of leaking live catalog data. Keep root contents discovery on httpx.get with a dual mock where needed. Co-authored-by: Cursor <cursoragent@cursor.com>
## Summary - Move LobeHub index/agent fetches onto `_guarded_http_get` (SSRF + redirect hop checks). - Sanitize `agent_id` to reject path traversal / scheme-bearing identifiers. - Add unit tests for sanitization and guarded-fetch wiring. ## Salvage / credit Skills Hub SSRF campaign siblings (NousResearch#70334 ClawHub, NousResearch#70336 skills.sh, NousResearch#70343 GitHub hub) — LobeHub still used raw `httpx.get`.
|
Closing this overlapping skills.sh slice in favor of consolidated survivor #70343. The skills.sh search, sitemap, featured, and detail fetches now use the existing guarded transport in #70343, alongside the related GitHub, ClawHub, and LobeHub routes. The survivor is rebased onto official |
Summary
httpx.get(..., follow_redirects=True)without host allowlisting, so a malicioussitemap-skillsloc (or redirect hop) could target private/link-local addresses._guarded_http_get(SSRF + hop re-validation).skills.sh/www.skills.sh.Test plan
pytest tests/tools/test_skills_sh_ssrf.py(2 passed)