test(connection-tools): add robustness checks for malformed configuration state - #7047
Closed
pedrofrxncx wants to merge 1 commit into
Closed
pedrofrxncx wants to merge 1 commit into
pedrofrxncx wants to merge 1 commit into
Conversation
…tion state Add two edge-case tests to catch malformed configuration_state data: 1. Validates that configuration_state keys must be objects with 'value' field when referenced by configuration_scopes (not plain strings or other types) 2. Prevents cross-org credential grants by rejecting scopes that reference connections from other organizations These tests strengthen the test suite to catch potential issues where: - Configuration state shape doesn't match scope expectations - Calls could accidentally grant cross-org access - State modifications fail during validation rollback
pedrofrxncx
enabled auto-merge (squash)
September 9, 2026 12:53
Collaborator
Author
|
Closing as stale: this PR sat past the bot's 48h merge window, main has moved on, and its CI results no longer reflect the current base. This is a housekeeping close, not a rejection of the change — if the underlying problem still exists, the bot will find it again and open a fresh, rebased PR. [studio-bot:stale-close] |
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.
Add two edge-case tests to strengthen the connection-tools integration test suite and catch potential robustness issues.
Changes:
{value: id}shape)Why: These edge cases are real robustness risks: configuration_state validation checks key existence but not shape, and there's a trust boundary where scopes could accidentally reference another org's connections without validation. Adding these tests closes gaps in the test suite.
Verification:
bun run fmt)bunx oxlint)bunx tsc --noEmitinapps/api)Net delta: +96 lines of test code covering two critical edge cases.
Summary by cubic
Adds two edge-case tests to the connection-tools integration suite to catch malformed configuration state and cross-org credential grant issues. The tests verify that configuration_state values must be objects with a
valuefield when referenced by scopes, and that scopes referencing connections from other organizations are rejected.Written for commit 8e9c58c. Summary will update on new commits.