Skip to content

Add submodule verification to git sanity checks#6

Merged
adrelanos merged 1 commit intoKicksecure:masterfrom
assisted-by-ai:claude/add-submodule-verification-Ux9ny
Apr 1, 2026
Merged

Add submodule verification to git sanity checks#6
adrelanos merged 1 commit intoKicksecure:masterfrom
assisted-by-ai:claude/add-submodule-verification-Ux9ny

Conversation

@assisted-by-ai
Copy link
Copy Markdown

Summary

This PR adds verification of git submodules to the sanity check and update workflows. A new git_submodule_verify() function is introduced to validate the integrity of all initialized submodules in the repository.

Key Changes

  • New git_submodule_verify() function: Iterates through all submodules defined in .gitmodules, verifies that they are initialized, and validates the signature of each submodule's HEAD commit using the parent repository's centralized signing policy
  • Integration into git_sanity_test_main(): Added submodule verification as part of the standard git sanity checks
  • Integration into update_repo(): Added submodule verification in two locations:
    • After submodule updates when no specific target ref is provided
    • After submodule updates when a target ref is being checked out

Implementation Details

  • The function gracefully skips uninitialized submodules with an informational message rather than failing
  • Uses the parent repository's openpgp-policy.toml for all submodule verification, maintaining a centralized signing policy across all repositories
  • Properly handles directory navigation with pushd/popd and includes error handling for failed operations
  • Extracts submodule paths from .gitmodules using grep and awk

https://claude.ai/code/session_01KXLzqaVR92tYzqpg6Cpatq

Verify each submodule's HEAD commit using sq-git after the main
repository checks pass. The parent repository's policy file and trust
root are reused for submodule verification, keeping signing policy
centralized.

Also verify submodules in derivative-update after submodule update
steps (both tag checkout and branch merge paths).

https://claude.ai/code/session_01KXLzqaVR92tYzqpg6Cpatq
@adrelanos adrelanos merged commit 6981a19 into Kicksecure:master Apr 1, 2026
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