Skip to content

fix: backport Java/PHP doc-comment security fix to 1.29.x - #8355

Merged
Vincent Biret (baywet) merged 4 commits into
security/1.29.Xfrom
fix/8017-to-1-29
Oct 8, 2026
Merged

Vincent Biret (baywet) merged 4 commits into
security/1.29.Xfrom
fix/8017-to-1-29

Conversation

@baywet

Copy link
Copy Markdown
Member

Summary

  • Backport fix(java,php): neutralize doc-comment delimiters instead of deleting them #8017 to the 1.29.x security branch via a clean cherry-pick, preserving the original Java/PHP doc-comment delimiter fix and regression tests.
  • Add the v1.29.2 changelog entry and update the Builder and CLI package versions.
  • Align existing GitHub Actions with main's SHA-pinned action versions, remove SonarCloud, use reproducible VS Code installs, and backport the integration timeout and merge-group artifact guard.

No NuGet or npm dependency versions are upgraded. Microsoft.OpenApi remains at 2.12.0, and the existing .NET 8/9 targets, solution format, and Azure DevOps pipeline are retained.

Fixes #8352.

Validation

  • Builder and CLI builds passed for their existing target frameworks.
  • Builder tests: 1,980 passed, 2 skipped. Local test execution used .NET 10 runtime roll-forward because .NET 9 is not installed.
  • Workflow linting passed; all 54 active action steps match main's exact SHA pins and version comments, with no JavaScript actions declaring Node 20.
  • npm ci dry-run checks passed after release-version rewriting for v1.29.2 and v1.35.0.

…them (#8017)

The Java and PHP doc-comment sanitizers deleted the `*/` terminator via Replace(*/, empty). Deleting a two-character sequence lets the surrounding characters re-form it (e.g. **// collapses to */), allowing a hostile schema description to break out of a generated doc comment and inject code into the generated client.

The Java sanitizer additionally ran the delimiter strip before the non-ASCII strip, so *e/ (with a non-ASCII char between) re-formed */ after the non-ASCII char was removed.

Replace delimiters instead of deleting (/* -> //*, */ -> * /) via a new shared NeutralizeBlockCommentDelimiters helper, matching TypeScriptConventionService, and run the Java neutralization after the non-ASCII strip. Adds regression tests.

Co-authored-by: Copilot App <[email protected]>

Co-authored-by: Copilot <[email protected]>
Copilot-Session: 46cae41e-552d-41ca-ae7e-93e248779da5
Co-authored-by: Copilot <[email protected]>
Copilot-Session: 46cae41e-552d-41ca-ae7e-93e248779da5
Co-authored-by: Copilot <[email protected]>
Copilot-Session: 46cae41e-552d-41ca-ae7e-93e248779da5
@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Thanks for opening this pull request! Please link it to an issue by adding the fixes syntax to the pull request description, for example: Fixes #1234.

@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Thanks for opening this pull request! Please add a changelog entry under ## [Unreleased] in CHANGELOG.md, before the first released version section, so users can see what changed. Add bug fixes under ### Changed and new features under ### Added.

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.

3 participants