pub struct Pr {
pub number: u64,
pub head_sha: String,
}Expand description
An open pull request as the queue sees it.
This struct is a security boundary, not a convenience. The queue
reads pull requests from an upstream forge (untrusted input), holds a
GitHub App private key (privileged credential), and with --land
fast-forwards a base branch (external write) — all three legs of the
prompt-injection lethal trifecta in one process. The Rule-of-Two
mitigation is that no untrusted text may reach a decision path, and
this type is where that is enforced: it carries a number and an oid,
both structured, and deliberately carries no title, body, branch
name, or author.
Adding a text field here is not a cosmetic change. A PR title in a
status description is a channel from attacker-controlled text into
the bot’s own output, and a PR body reaching any conditional is the
vulnerability itself. bridge_trifecta.rs fails if this type starts
carrying attacker-controlled text.
Fields§
§number: u64PR number.
head_sha: StringHead commit sha (what the verdict status is posted on).