Repository navigation
Stop tracked repository metadata from redirecting hosted ledger reads (VERIA-27) - #176
Draft
veria-ai[bot] wants to merge 4 commits into
Draft
veria-ai[bot] wants to merge 4 commits into
veria-ai[bot] wants to merge 4 commits into
Conversation
|
Important Review skippedBot user detected. Ask an organization administrator to verify that this bot has an active assigned CodeRabbit review seat. See the seat-assignment guide. After the seat is confirmed, request a review again.
|
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> # Conflicts: # CHANGELOG.md
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> # Conflicts: # CHANGELOG.md
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.
Security fix: Tracked Repository Metadata Can Redirect Hosted Ledger Reads
What was wrong
binding()inpackages/core/src/team-server.tsaccepted the SageOx repository ID from tracked.sageox/config.jsonwithout requiring an operator-controlled repository pin. A checkout with an approved Git origin could therefore select another same-team repository for hosted ledger sync and reads when the team-levelrepopin was absent.What changed
parseReposConf()inpackages/cli/src/repos.tsadded support for a validatedrepo=repo_<id>suffix, stored asexpectedRepoId;packages/cli/src/cli.tspassed that pin to the team server.binding()now rejects hosted access unless the tracked ID matchesexpectedRepoId, falling back to the team-levelrepopin when no entry-specific pin exists. When both pins are set, both must match.packages/cli/test/repos.test.tsandpackages/core/test/team-server.test.tsadded coverage for pin parsing, missing and conflicting pins, fallback behavior, and same-team ID substitution before initial sync and during refresh. Deployment documentation andCHANGELOG.mddocumented the configuration requirement.Why this is safe
Tracked metadata alone can no longer choose the repository offered the team credential: missing or mismatched trusted bindings block hosted sync and reads. Existing origin, team, ID syntax, authorization, and response checks remain in place. Correctly pinned hosted callers continue working; unpinned hosted access is now refused, while code indexing and explicit
ledgerSyncbehavior remain unchanged.Before merging
Configure
repo=repo_<id>for each repository requiring hosted ledger reads inrepos.conf, or use the existing team-levelrepopin for a single-repository scope. Obtain IDs from trusted deployment information, not the checkout's tracked.sageox/config.json.Fixes VERIA-27
This PR was generated by Veria AI.
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.