Comparing main...pr-3177-hidden-policy-archive · github/github-mcp-server · GitHub
Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: github/github-mcp-server
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: github/github-mcp-server
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: pr-3177-hidden-policy-archive
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 8 commits
  • 17 files changed
  • 2 contributors

Commits on Sep 1, 2026

  1. fix(sanitize): preserve visible markdown content

    Separate short metadata sanitization from a Markdown-aware content policy.
    Keep code faithful, expose render-hidden constructs, and prevent sanitized
    read-modify-write cycles from silently deleting issue and pull request data.
    
    Refs #2202
    Refs #3165
    
    Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
    Copilot-Session: 69c5ab30-9815-4c07-8385-11a206e68f66
    SamMorrowDrums and Copilot committed Sep 1, 2026
    Configuration menu
    Copy the full SHA
    e65087a View commit details
    Browse the repository at this point in the history
  2. fix(sanitize): close hidden content gaps

    Cover direct release and blame reads, reject visually blank labels and
    selector channels, preserve repository fence aliases, and keep URL query
    syntax out of GitHub math neutralization.
    
    Refs #2202
    Refs #3165
    
    Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
    Copilot-Session: 69c5ab30-9815-4c07-8385-11a206e68f66
    SamMorrowDrums and Copilot committed Sep 1, 2026
    Configuration menu
    Copy the full SHA
    b0e64f5 View commit details
    Browse the repository at this point in the history
  3. fix(sanitize): preserve code and URL boundaries

    Keep fallback entity escaping outside Markdown code, restrict bare URL
    masking to supported schemes, and honor Unicode and mailto boundaries.
    
    Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
    Copilot-Session: 69c5ab30-9815-4c07-8385-11a206e68f66
    SamMorrowDrums and Copilot committed Sep 1, 2026
    Configuration menu
    Copy the full SHA
    8061904 View commit details
    Browse the repository at this point in the history
  4. fix(sanitize): derive exact URL spans

    Use parsed link and autolink destinations for math masking so adjacent
    content remains visible and malformed link candidates stay linear.
    
    Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
    Copilot-Session: 69c5ab30-9815-4c07-8385-11a206e68f66
    SamMorrowDrums and Copilot committed Sep 1, 2026
    Configuration menu
    Copy the full SHA
    5a1a687 View commit details
    Browse the repository at this point in the history
  5. fix(sanitize): mask exact URL destinations

    Replace heuristic URL masking with a code-aware forward scan that preserves
    functional links while exposing adjacent hidden math in linear time.
    
    Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
    Copilot-Session: 69c5ab30-9815-4c07-8385-11a206e68f66
    SamMorrowDrums and Copilot committed Sep 1, 2026
    Configuration menu
    Copy the full SHA
    0069d2d View commit details
    Browse the repository at this point in the history
  6. fix(sanitize): validate destinations for reference links and bare URLs

    Parse reference-link definition destinations with their own grammar
    instead of reusing the inline-destination parser, which requires a
    closing ')' that reference definitions never have. This kept
    destinations like `[query]: /api/$filter$` from being masked, so
    math neutralization corrupted them.
    
    Validate bareHTTPURLSpan matches for a real host via
    linkDestinationIsSafe before masking them, so hostless/malformed
    candidates like `http://?$hidden$` stay available to math
    neutralization instead of being hidden by an unconditional mask.
    
    Add targeted unit tests, a read-modify-write round-trip test through
    the GitHub tool converters, and fuzz/benchmark corpus entries
    exercising large adversarial reference-destination and bare-URL
    inputs to confirm linear-time behavior.
    
    Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
    Copilot-Session: 69c5ab30-9815-4c07-8385-11a206e68f66
    SamMorrowDrums and Copilot committed Sep 1, 2026
    Configuration menu
    Copy the full SHA
    e1a31b8 View commit details
    Browse the repository at this point in the history

Commits on Sep 2, 2026

  1. fix(sanitize): bound destination scans to eliminate quadratic sanitiz…

    …ation
    
    Bound the forward scans in inlineDestinationSpan, referenceLinkDestinationSpan,
    and angleAutoLinkSpan to maxLinkDestinationLength so malformed/unterminated
    candidates fail fast instead of scanning to end-of-input on every call.
    Also reject a reference-link bare destination when parenthesis depth is
    nonzero at termination, so unbalanced destinations are left for hidden-content
    neutralization rather than incorrectly masked.
    
    Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
    Copilot-Session: 69c5ab30-9815-4c07-8385-11a206e68f66
    SamMorrowDrums and Copilot committed Sep 2, 2026
    Configuration menu
    Copy the full SHA
    335eed9 View commit details
    Browse the repository at this point in the history
  2. fix(sanitize): align markdown destination grammar

    Restrict angle masking to supported CommonMark autolinks, reject inline destinations crossing blank paragraphs, and parse reference labels with bounded line-local grammar. Preserve valid links while keeping malformed content available for neutralization.
    
    Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
    
    Copilot-Session: 69c5ab30-9815-4c07-8385-11a206e68f66
    SamMorrowDrums committed Sep 2, 2026
    Configuration menu
    Copy the full SHA
    c37624f View commit details
    Browse the repository at this point in the history
Loading