Redact PR web-link URL fields from gitea_list_prs / gitea_view_pr MCP output #125
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
The #120 redaction work (merged in PR #121) hides service endpoint URLs, Keychain IDs, and token values from normal LLM-facing MCP output (
gitea_whoami,gitea_get_profile,gitea_audit_config). However, an MCP-only connectivity proof on 2026-07-03 confirmed that the raw payloads returned bygitea_list_prsandgitea_view_prstill expose PR web-linkurlfields (and possibly relatedhtml_url-style link fields) pointing at the Gitea host.This is inconsistent with the rules in the live config:
hide_service_urls_from_llm: truemcp_resolves_endpoints: trueLLM sessions should identify PRs by number/branch/head SHA, not by URL. The MCP layer resolves endpoints; URLs in tool output are unnecessary and leak the service host.
Scope
gitea_list_prsandgitea_view_proutput: strip or omiturl/ web-link fields from normal LLM-facing responses.gitea_view_issue,gitea_list_issues,gitea_create_issue,gitea_create_prresponses, etc.) for the same leak and cover them in the same pass.GITEA_MCP_REVEAL_ENDPOINTS=1) to include the link fields when explicitly requested.Acceptance criteria
gitea_list_prs/gitea_view_pr(and any other tools found in the audit) contains no URLs pointing at configured Gitea hosts.References