Skip to content

fix(credentials): declare service-account oauth policy on Snowflake, NetSuite, and Managed Agent tools - #9241

Merged
waleedlatif1 merged 2 commits into
stagingfrom
fix/snowflake-credential-provider
Oct 20, 2026
Merged

waleedlatif1 merged 2 commits into
stagingfrom
fix/snowflake-credential-provider

Conversation

@waleedlatif1

@waleedlatif1 waleedlatif1 commented Oct 20, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Snowflake, NetSuite, and Managed Agent tools declared no oauth policy, so the fail-closed credential binding check in resolveCredentialToken rejected every saved credential with "The selected credential does not belong to this tool provider" (70 tools)
  • Declare oauth: { required: true, provider, credentialKind: 'service-account' } on each via a shared constant, matching the Fivetran pattern; add snowflake, netsuite, claude-platform to OAuthService
  • check:tool-param-reachability now fails when a tool with a credential/oauthCredential param has no required oauth policy or its provider matches no service — zero-tolerance invariant rather than a ratchet, since there are no remaining violations
  • add-tools template no longer implies the oauth block is OAuth-only; validate-integration checks it

Type of Change

  • Bug fix

Testing

  • Verified the binding predicate against generated metadata: each tool accepts its own service-account provider and still rejects a foreign one
  • Removed one tool's policy and confirmed check:tool-param-reachability fails, passes with it
  • vitest: lib/oauth/token-resolution.test.ts, tools/{snowflake,netsuite,managed_agent}, tools/metadata.test.ts (183 passing)
  • bun run lint, check:tool-metadata, check:tool-param-reachability, check:comment-hygiene, check:skills, block registry check; full audits/type-check/test via CI

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing (new tests pass the test-audit authoring gate)
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

…NetSuite, and Managed Agent tools

The tool credential binding check fails closed when a tool declares no required oauth policy, so every Snowflake, NetSuite, and Managed Agent tool rejected its own saved credential. Declare the policy with credentialKind service-account (the Fivetran pattern), and refuse to generate tool metadata when a credential-taking tool cannot bind a provider.
@vercel

vercel Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
docs Ready Ready Preview Oct 20, 2026 2:48am UTC

Request Review

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 78 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Turn on auto-fix | Re-trigger cubic

@greptile-apps

greptile-apps Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no blocking issues were found.

Summary

Adds service-account credential policies to 70 Snowflake, NetSuite, and Managed Agent tools.

  • Snowflake, NetSuite, and Managed Agent tools match credentials to their own providers.
  • The tool reachability check requires credential tools to name a known provider.

No actionable new issues were found in the changes since the last review.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  Tools[Tool credential policies] --> Metadata[Generated metadata]
  Metadata --> Binding[Runtime credential checks]
  Tools --> Audit[Tool parameter audit]
  Audit --> CI[Required CI audits]
Loading

Reviews (2) · Last reviewed commit: "improvement(credentials): enforce creden..." · Reviewed by Greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

@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 cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 78 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Turn on auto-fix | Re-trigger cubic

@waleedlatif1
waleedlatif1 merged commit 8b7afed into staging Oct 20, 2026
42 of 44 checks passed
@waleedlatif1
waleedlatif1 deleted the fix/snowflake-credential-provider branch October 20, 2026 02:46

This branch was successfully deployed

1 active deployment
Preview — 47f5ca87 Deployed Oct 20, 2026 by vercel[bot]
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.

1 participant