Skip to content

fix: all text from the repo is shown only as code in messages, with link previews off #29

Closed

Description

@groupsky

Why

A commit decides its own file names and subjects, and pullgate shows them in a message from the owner's own bot, next to the Apply button. #23 is one case (a file name became a link). Fixing names one by one leaves the next field open; the rule should hold for every field by construction.

Proposal

  • One function builds every piece of text that comes from the repo (paths, commit subjects, author names, branch names, the summary and check output) and always puts it inside <code> or <pre>, HTML-escaped. Message code may not put repo text into a message any other way (a lint test or a type: for example a repoText type that only this function turns into a string).
  • All messages are sent with link previews off.
  • A test feeds hostile values into every field of every message kind: a URL, a domain-like name (login.example.com), README.md, HTML (<a href=…>), a Telegram entity trick (@username, #tag, /command), right-to-left marks, very long text. It checks that each value appears only inside <code>/<pre> and that the message stays under Telegram's limit.

This includes #23; close #23 with it if the same PR fixes both.

Done when

  • Every message kind builds repo text through the one function; a test fails if a message holds repo text outside <code>/<pre>.
  • The hostile-values test covers every field of every message kind.
  • Link previews are off for every send; a test checks the request body.
  • THREAT-MODEL.md: hostile text from a commit in a trusted message, and how the rule stops it.

Activity

  1. groupsky commented on Nov 17, 2026

    @groupsky
    ContributorAuthor

    Fixed in #37 (squash commit 44afa8b).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpriority: lowDo when nothing else waits

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions