Repository navigation
🔨 Verify Gradle wrapper and dependency checksums - #54
Merged
Merged
Conversation
Every GitHub Actions `uses:` is now pinned to a 40-character commit sha with the human-readable tag kept as a comment. Each sha was resolved from the tag and independently verified, so a moved or rewritten tag can no longer swap in different code. - actions/checkout v4 and actions/upload-artifact v4 run on the end-of-life node20 runtime; they move to v6.1.0 and v7.0.2 (inputs unchanged). - tools/check_immutable_refs.py fails if any Dockerfile or workflow uses a mutable image tag or action ref; it runs in the new "Pinned refs" workflow on every pull request and push to main. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Wtx3dU8PQvgyubf6ZpNaG3
The guard now clears a pin-exempt at a blank line, joins continuation lines like Docker (honouring a `# escape=` directive), requires a bare or docker:// runs.image to be pinned, reads flow-style and spaced YAML keys, checks every ref on a line and requires owner/repo@<sha>. On pull requests the workflow runs the base branch's copy of the checker. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Wtx3dU8PQvgyubf6ZpNaG3
FROM now resolves only global ARGs (declared before the first FROM), and each stage starts empty, seeing a global value only by redeclaring it without a default, so a pinned stage-level ARG can no longer mask a mutable global default. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Wtx3dU8PQvgyubf6ZpNaG3
`ARG NAME=` now sets the value to "" instead of leaving an earlier default in place, so the empty value fails closed as untagged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Wtx3dU8PQvgyubf6ZpNaG3
Continuation lines of an open `{ ... }` / `[ ... ]` keep flow-style
parsing, so `uses:` after another key on such a line is checked, and a
`*version:` whose value `latest` starts on the next line is flagged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Wtx3dU8PQvgyubf6ZpNaG3
A `*version:` key inside a flow collection whose value starts on the next line is now checked too, and comment lines before the value are skipped. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Wtx3dU8PQvgyubf6ZpNaG3
…blowup
- An anchor or tag before a block key (`- &step uses: x`, `- !!str uses: x`,
`{ &k uses: x }`) no longer hides the key from the check.
- Verbatim tags with commas (`!<tag:yaml.org,2002:seq> [...]`) now open a
flow collection.
- Each node property must end at whitespace or a bracket, so a run like
`&&&&x` has one split instead of exponentially many (the old pattern hung
on 30 characters).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Wtx3dU8PQvgyubf6ZpNaG3
`!<[^>]*>` ran to the end of the line from every comma when the tag was never closed, so a flow line of repeated `,!<` was quadratic (32k repeats took 8s). YAML verbatim tags hold URI characters only, so the tag now stops at whitespace or another `<`; the same line takes 0.04s. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Wtx3dU8PQvgyubf6ZpNaG3
`bun-version: &v latest` (and `&v` with `latest` on the next line) slipped past the `latest` check because the value was taken to be `&v`, and `uses: &pin owner/repo@<sha>` was wrongly rejected for the same reason. Node properties after the colon are now skipped before the value is read, on the key's own line and on the line below it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Wtx3dU8PQvgyubf6ZpNaG3
`container: &c` followed by `{ image: <pinned> }` on the next line was
read as a scalar image and rejected. A continuation that opens a `{` or
`[` collection is now left to the per-line flow scanner, which already
checks the keys inside it, so a mutable image there is still flagged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Wtx3dU8PQvgyubf6ZpNaG3
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Wtx3dU8PQvgyubf6ZpNaG3
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Wtx3dU8PQvgyubf6ZpNaG3
Pin the Gradle 9.5.0 distribution by sha256 and add dependency verification metadata, so a forged TLS certificate (e.g. CVE-2026-91403, distrusted eMudhra intermediates in the JDK trust store) cannot swap a dependency into the APK. Turns the bootstrap workflow into a manual job for regenerating the metadata after dependency bumps. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Wtx3dU8PQvgyubf6ZpNaG3
|
ⓘ Qodo reviews are paused because the subscription is no longer active. Ask your workspace admin to reactivate the subscription to resume reviews. Manage billing |
…in it Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Wtx3dU8PQvgyubf6ZpNaG3
There was a problem hiding this comment.
No issues found across 3 files
Tip: cubic can generate docs of your entire codebase and keep them up to date. Try it here.
View guided diff | Turn on auto-fix | Re-trigger cubic
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
The Android build (CI and
release.yml, which ships the APK) downloaded Gradle and every Maven/Google dependency trusting TLS alone. CVE-2026-91403 (distrusted eMudhra intermediates in the JDK trust store) is exactly the kind of flaw that breaks that. This pins everything by sha256 so a forged certificate can no longer swap code into the APK, regardless of the JDK patch level.Changes
gradle/wrapper/gradle-wrapper.properties:distributionSha256Sumfor Gradle 9.5.0.gradle/verification-metadata.xml: sha256 for all 454 components resolved byassembleDebug testDebugUnitTest lintDebug, generated in CI (the sandbox can't reach Google/Gradle hosts)..github/workflows/gradle-verification.yml: manualworkflow_dispatchjob to regenerate the metadata after a dependency bump. Dependabot Gradle PRs will now fail CI until someone runs it on the bump's branch and commits the result.CLAUDE.md: one line on the above.Testing
./gradlew assembleDebug)./gradlew testDebugUnitTest)./gradlew lintDebug)(All three run in the Android CI check on this PR, now with verification enforced.)
Related Issues
None.
Generated by Claude Code
Summary by cubic
Pins the Gradle wrapper distribution and all 454 resolved dependencies by sha256 so a forged TLS certificate can no longer swap code into the APK (e.g. CVE-2026-91403). Verification is enforced in every CI build; dependency bumps (including Dependabot's) will fail until the metadata is regenerated.
Migration
Run the new "Regenerate Gradle verification metadata" workflow (
workflow_dispatch) on the bump's branch and commit the resultinggradle/verification-metadata.xml. Wrapper upgrades also require updatingdistributionSha256Sumingradle/wrapper/gradle-wrapper.properties.Written for commit e3bab8a. Summary will update on new commits.