Skip to content

fix(github): sanitize release and project status-update bodies on read paths - #3040

Open
SashaMIT wants to merge 1 commit into
github:mainfrom
SashaMIT:fix/sanitize-release-status-update-bodies
Open

fix(github): sanitize release and project status-update bodies on read paths#3040
SashaMIT wants to merge 1 commit into
github:mainfrom
SashaMIT:fix/sanitize-release-status-update-bodies

Conversation

@SashaMIT

@SashaMIT SashaMIT commented Aug 8, 2026

Copy link
Copy Markdown

Problem

Issue/PR/review/Discussion read paths already run through sanitize.Sanitize (invisible Unicode tags, BiDi overrides, HTML, code-fence metadata) before content reaches the model (#3035 / #3039). Two sibling user-authored surfaces still returned raw text:

  1. Releases (convertToMinimalRelease) — name and body verbatim.
  2. Project status updates (convertToMinimalStatusUpdate) — body verbatim.

A hostile release note or status-update body could therefore carry hidden prompt-injection payloads into the context window, bypassing the baseline control its siblings apply.

Fix

Apply the same sanitize.Sanitize on those converters. No behavior change for clean content.

Testing

go test ./pkg/github/ -run 'TestConvertToMinimal(Release|StatusUpdate)_Sanitizes'

Also: go test ./pkg/github/ ./pkg/sanitize/ locally green for the touched packages.

Made with Cursor

…d paths

Sibling of github#3035/github#3039: convertToMinimalRelease and
convertToMinimalStatusUpdate still returned raw user-authored text to the
model. Apply sanitize.Sanitize to release name/body and status-update body.

Signed-off-by: Sasha Mitchell <sash.t.mitchell@gmail.com>
@SashaMIT
SashaMIT requested a review from a team as a code owner August 8, 2026 11:20

@alirezainanlosalehi7-lgtm alirezainanlosalehi7-lgtm left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi i am
ali

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants