fix(ai-review): neutralize public markdown output - #902
Conversation
|
Note Gittensory Gate skippedPR closed before full evaluation. No late first comment was created.
💰 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. |
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
|
gittensory · advisory review Reviewed 3 changed file(s) — two independent AI reviewers. Changed files: Suggested action: ✅ Safe to merge — both reviewers found no blocking issues. Reviewer A · Suggestions
Worth double-checking
Reviewer B · Suggestions
Worth double-checking
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #902 +/- ##
=======================================
Coverage 96.71% 96.71%
=======================================
Files 108 108
Lines 14641 14642 +1
Branches 5298 5298
=======================================
+ Hits 14160 14161 +1
Misses 102 102
Partials 379 379 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Motivation
Description
neutralizePublicMarkdownhelper that flattens control characters/extra whitespace, defangs mentions and://sequences, and escapes common Markdown metacharacters.toPublicSafeafter the existingsanitizePublicCommentcheck so only allowed content is published and any remaining Markdown/mentions/URLs are neutralized.buildPublicPrIntelligenceCommentto document that notes are markdown-neutralized upstream while keeping the final angle-bracket escaping guard.test/unit/ai-review.test.tsto assert neutralization of links, image syntax, mentions, and newline/list injection.Testing
npm test -- --run test/unit/ai-review.test.tsand all unit tests passed (31/31).npm run typecheck(tsc --noEmit) and type checking succeeded.Codex Task