Repository navigation
[android-tools] Suppress Google SDK SHA-1 checksum alert - #12526
Merged
jonathanpeppers merged 3 commits intoAug 26, 2026
Merged
jonathanpeppers merged 3 commits into
jonathanpeppers merged 3 commits into
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds a targeted CodeQL suppression for the single SHA1.Create() usage in DownloadUtils, preserving compatibility with upstream Android SDK repository metadata that only provides SHA-1 checksums, and adds a unit test covering SHA-1 verification.
Changes:
- Add an inline
CodeQL [SM02196]suppression atSHA1.Create()to avoid global rule suppression while keeping SHA-1 manifest compatibility. - Add a unit test ensuring
VerifyChecksumsucceeds when using a SHA-1 checksum type with a matching hash.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| tests/Xamarin.Android.Tools.AndroidSdk-Tests/DownloadUtilsTests.cs | Adds a SHA-1 VerifyChecksum test case intended to mirror Google manifest SHA-1 usage. |
| src/Xamarin.Android.Tools.AndroidSdk/DownloadUtils.cs | Adds an inline CodeQL suppression and explanatory comment for SHA-1 compatibility in hash algorithm creation. |
simonrozsival
approved these changes
Aug 26, 2026
simonrozsival
pushed a commit
that referenced
this pull request
Aug 27, 2026
Google's current [`repository2-3.xml`](https://dl.google.com/android/repository/repository2-3.xml) has 854 checksum nodes, all `type="sha1"`; the pinned `cmdline-tools;19.0` values match our feed. Google's [`repo-common-02.xsd`](https://android.googlesource.com/platform/tools/base/+/refs/heads/mirror-goog-studio-main/repository/src/main/resources/xsd/repo-common-02.xsd#257) defines one required checksum per archive and no parallel stronger field. This adds a finding-specific `CodeQL [SM02196]` suppression to the single SHA-1 construction used to compare SDK archives with Google's manifest. It is not used for authentication, signing, passwords, or authorization; SHA-256 remains the default. Review this suppression when Google provides stronger checksums. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
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.
Google's current
repository2-3.xmlhas 854 checksum nodes, alltype="sha1"; the pinnedcmdline-tools;19.0values match our feed. Google'srepo-common-02.xsddefines one required checksum per archive and no parallel stronger field.This adds a finding-specific
CodeQL [SM02196]suppression to the single SHA-1 construction used to compare SDK archives with Google's manifest. It is not used for authentication, signing, passwords, or authorization; SHA-256 remains the default. Review this suppression when Google provides stronger checksums.Validation: 55 focused
DownloadUtilsTests/SdkManagerTestspassed;git diff --checkpassed.