Repository navigation
[release/11.0.1xx] [Xamarin.Installer.Build.Tasks] Validate OpenJDK downloads - #13212
Merged
jonathanpeppers merged 1 commit intoOct 20, 2026
Conversation
Add signature verification to the `InstallAndroidDependencies` target before it extracts and installs a downloaded Microsoft OpenJDK archive. Report `XA5305` and stop installation if verification fails. (cherry picked from commit 11e7609)
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
Security-sensitive verification and the cancellation backport require human review, including production-path rejection coverage and release-branch validation.
1 open issue
1 file not reviewed
src/Xamarin.Installer.Build.Tasks/Properties/Resources.Designer.cs: Generated file
What changed in this PR
Backports OpenJDK signature verification to release/11.0.1xx, protecting dependency installation before archive extraction.
Changes:
- Adds signature verification, trusted-key configuration, and XA5305 diagnostics.
- Adapts cancellation handling and pools download buffers.
- Adds verification tests and maintenance documentation.
| File | Description |
|---|---|
| src/Xamarin.Installer.Build.Tasks/Xamarin.Installer.Common.targets | Forwards verification settings. |
| src/Xamarin.Installer.Build.Tasks/Tasks/InstallAndroidDependencies.cs | Verifies downloads before installation. |
| src/Xamarin.Installer.Build.Tasks/README.md | Documents testing and key maintenance. |
| src/Xamarin.Installer.Build.Tasks/Properties/Resources.resx | Adds XA5305 error text. |
| src/Xamarin.Installer.Build.Tasks/Properties/Resources.Designer.cs | Exposes XA5305 resource. |
| src/Xamarin.Installer.Build.Tasks/Properties/AssemblyInfo.cs | Enables internal access for tests. |
| src/Xamarin.Installer.Build.Tasks/OpenJdkSignatureVerifier.cs | Implements signature and trusted-key verification. |
| src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/Xamarin.Android.Build.Tests.csproj | References installer tasks. |
| src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/Tasks/OpenJdkSignatureTests.cs | Adds verification and installation tests. |
| Documentation/docs-mobile/TOC.yml | Links XA5305 documentation. |
| Documentation/docs-mobile/messages/xa5305.md | Explains verification failures and remedies. |
| Documentation/docs-mobile/messages/index.md | Lists XA5305. |
| Documentation/docs-mobile/building-apps/build-targets.md | Documents installation verification. |
Review effort: Balanced
Comment on lines
+346
to
+347
| if (!await VerifyJavaArchiveAsync (installationContext.HttpClient, jdkToInstall, cancellationToken)) | ||
| return false; |
jonathanpeppers
approved these changes
Oct 20, 2026
jonathanpeppers
left a comment
Member
There was a problem hiding this comment.
Test failures are unrelated.
jonathanpeppers
deleted the
simonrozsival-backport-pr-13172-release-11-0-1xx
branch
October 20, 2026 13:11
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Backport of #13172 to
release/11.0.1xx.Add signature verification to the
InstallAndroidDependenciestarget before it extracts and installs a downloaded Microsoft OpenJDK archive. ReportXA5305and stop installation if verification fails.Backport notes:
InstallAndroidDependencies.csconflicted becauserelease/11.0.1xxhas older cancellation handling thanmain. The conflict was resolved by keeping the release branch's cancellation style around the newVerifyJavaArchiveAsynccall. TheExecutecatch was widened fromTaskCanceledExceptiontoOperationCanceledException, because the verification code throwsOperationCanceledExceptionon cancellation.Validation
Not built or tested locally: no .NET SDK is available in this environment. Relying on CI.
Pull Request
title and
description
should follow the
commit-messages.mdworkflow documentation, and in particular should include: