Repository navigation
fix(integrations): one integration-access verdict across the catalog, @ menus and search, enforced by an audit - #9457
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
[High impact] The PR appears safe to merge; no blocking issues remain. SummaryThe PR gives integration listings one shared access decision across permission groups, deployment restrictions, and OAuth setup.
Reviews (7) · Last reviewed commit: "fix(integrations): treat an untraceable ..." · Reviewed by Greptile |
There was a problem hiding this comment.
All reported issues were addressed across 6 files
Reply with feedback, questions, or to request a fix.
Turn on auto-fix | Re-trigger cubic
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
There was a problem hiding this comment.
All reported issues were addressed across 6 files
Reply with feedback, questions, or to request a fix.
Turn on auto-fix | Re-trigger cubic
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
There was a problem hiding this comment.
1 issue found across 10 files
Confidence score: 5/5
available-resources.tsfetches deployment availability even when the menu is closed or integrations aren’t included, bypassing the hook’s lazy-loading behavior. Gate the fetch on the effective enabled and included configuration.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="apps/sim/app/workspace/[workspaceId]/home/components/mothership-view/components/add-resource-dropdown/available-resources.ts">
<violation number="1" location="apps/sim/app/workspace/[workspaceId]/home/components/mothership-view/components/add-resource-dropdown/available-resources.ts:194">
P3: This unconditionally fetches deployment availability even for closed menus and inventories that do not include integrations, defeating the hook's documented lazy-loading behavior. Pass the effective enabled/included condition to the availability query and preserve the existing cache semantics.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Turn on auto-fix | Re-trigger cubic
… gate @ mentions by policy
…isting, enforced by check:integration-access
a6ba85a to
47fc03c
Compare
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
There was a problem hiding this comment.
All reported issues were addressed across 21 files
You've manually re-run cubic several times on this PR. Each manual re-review checks the full PR again and counts toward your usage quota. To preserve your usage limits, we recommend letting cubic automatically review new commits.
Turn on auto-fix | Re-trigger cubic
…space imports in check:integration-access
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
There was a problem hiding this comment.
No issues found across 21 files
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
You've manually re-run cubic several times on this PR. Each manual re-review checks the full PR again and counts toward your usage quota. To preserve your usage limits, we recommend letting cubic automatically review new commits.
Turn on auto-fix | Re-trigger cubic
…ry export in check:integration-access
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
There was a problem hiding this comment.
No issues found across 21 files
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
You've manually re-run cubic several times on this PR. Each manual re-review checks the full PR again and counts toward your usage quota. To preserve your usage limits, we recommend letting cubic automatically review new commits.
Turn on auto-fix | Re-trigger cubic
Summary
resolveIntegrationAccess(lib/integrations/access.ts) returnsavailable | unconfigured | requestable | deniedfrom the permission group ∩ deploymentALLOWED_INTEGRATIONS, then deployment OAuth configuration (policy judged first, so a restricted integration is never advertised as merely unconfigured)useIntegrationAccess(workspaceId)returns that verdict, or none until both policies load, so listings fail closed by construction; takes the workspace explicitly because groups can target individual workspaces.usePermissionConfigdelegates to the same policy and keeps its fail-openisBlockAllowed/filterBlocksfor the toolbar and tool pickers unchangedcheck:integration-access: a module that imports a raw integration catalog must also readuseIntegrationAccess(or be exempt with a reason; stale exemptions fail), and the fail-openuseIntegrationAccessPolicyis refused outsideusePermissionConfig. Guidance added to CLAUDE.md/AGENTS.mdType of Change
Testing
lib/integrations/access.test.ts: six failure modes (deployment ceiling, policy-before-unconfigured ordering, unconfigured, successor ids in either policy, exempt entry point, credential-group gate); each verified red by reverting its guardhooks/use-permission-config.test.tsx: no verdict before the permission group loads while the legacy gate stays fail-open; existing requestable tests pass through the new pathorganization-resource-inventory.test.ts: cross-workspace intersection and missing-workspace cases (red first)scripts/check-integration-access.test.ts: 8 cases incl. renamed/namespace imports, type-only imports, stale exemptions, fail-open hook outside its reader; audit verified to fail when a real gate is removedChecklist
test-auditauthoring gate)🤖 Generated with Claude Code