Skip to content

fix(calm-hub): default GitHub clone-directory to user home and verify origin remote - #3622

Open
CG-5228 wants to merge 1 commit into
finos:mainfrom
CG-5228:fix/issue-3086-github-clone-dir-and-origin-check
Open

CG-5228 wants to merge 1 commit into
finos:mainfrom
CG-5228:fix/issue-3086-github-clone-dir-and-origin-check

Conversation

@CG-5228

@CG-5228 CG-5228 commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Description

  • Default calm.github.clone-directory in GitHubStoreConfig to ${user.home}/.calm-hub/clones (matching calm.standalone.data-directory=${user.home}/.calm-hub/data) instead of world-writable /tmp/calm-hub-clones, and create clone directories with 0700 (rwx------) permissions on POSIX filesystems.
  • Tighten GitHubRepoSync.isValidRepo so it verifies the directory is a real JGit repository and, when given the configured repoFullName, checks that remote.origin.url matches githubBaseUrl + "/" + repoFullName + ".git" before trusting an existing checkout.
  • If a pre-existing directory is invalid or points to a mismatched origin remote, GitHubCloneManager falls back to cloneRepo, which cleans and recreates the target directory with owner-only permissions.

Closes #3086

Type of Change

  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • ✅ Test additions or updates

Affected Components

  • CALM Hub (calm-hub/)

Testing

  • I have tested my changes locally
  • I have added/updated unit tests
  • All existing tests pass

Checklist

  • My commits follow the conventional commit format
  • I have updated documentation if necessary
  • I have added tests for my changes (if applicable)
  • My changes follow the project's coding standards

… origin remote

Signed-off-by: CG-5228 <g15222152017@gmail.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

calm-hub Affects `calm-hub`

Projects

None yet

Development

Successfully merging this pull request may close these issues.

calm-hub: GitHub clone-directory defaults to /tmp and isValidRepo trusts any pre-existing .git dir

1 participant