fix(gittensor-impact-card): encodeURIComponent + XML-escape API values#4124
Conversation
#4121 auto-merged before two follow-up fixes could land on that branch (a merge-timing race, not a revert): repo.replace("/", "%2F") only replaces the first slash (works today by luck; encodeURIComponent is the correct general encoding), and api.gittensor.io response values were interpolated into SVG <text> nodes without XML-escaping (Superagent P2 finding on the sibling awesome-claude PR — a future non-numeric API field could break the generated SVG's XML structure).
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4124 +/- ##
=======================================
Coverage 93.65% 93.65%
=======================================
Files 384 384
Lines 35865 35865
Branches 13160 13160
=======================================
Hits 33589 33589
Misses 1618 1618
Partials 658 658 🚀 New features to boost your workflow:
|
|
Warning 🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 ⏸️ Gittensory review result - manual review recommendedReview updated: 2026-07-08 03:15:10 UTC
⏸️ Suggested Action - Manual Review
Review summary Nits — 6 non-blocking
Concerns raised — review before merging
Review context
Contributor next steps
Signal definitions
🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers.
|
Summary
#4121 auto-merged before two follow-up fixes landed on that branch (a merge-timing race — not a revert of anything). Both are already-fixed on the sibling metagraphed/awesome-claude PRs; this brings gittensory's copy in line:
repo.replace("/", "%2F")only replaces the first/— works today by luck (owner/repo has exactly one slash), butencodeURIComponent(repo)is the correct, general fix.api.gittensor.ioresponse values (impact.totalPRs, etc., formatted intos.value/s.label) and the repo name were interpolated into SVG<text>nodes without XML-escaping — a Superagent P2 finding on the sibling awesome-claude PR. AddsescapeXml()and applies it at every interpolation point carrying external/CLI data, so a future non-numeric API field can't break the generated SVG's XML structure.Scope
type(scope): short summaryConventional Commit format.CONTRIBUTING.mdand does not reintroduce GitHub Pages, VitePress,site/, orCNAME.Validation
node --check scripts/gittensor-impact-card.mjsnpm run actionlintgit diff --checkSafety