You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[P1][doc-drift+security] Copilot SDK pinned to a raw git rev — supply chain fragility, no fallback if upstream is yanked #319
src-tauri/crates/mas-ai/Cargo.toml:9 (copilot-sdk = { git = "https://github.com/copilot-community-sdk/...", rev = "2946ba176297acc3cbbc97cf6d526152dad54b62" }). The dependency is git-pinned, no crates.io version, no Cargo.lock audit history. ADR-007 ("GitHub Copilot SDK") describes a Provider Router with (Copilot SDK → HTTP → disable) tiers — implementation hardcodes the SDK with no fallback. Audit finding F12 in docs/audits/ai.md.
Problem
If upstream yanks the repo, breaks compatibility, or ships a tagged release with breaking IPC changes, cargo build fails with no path forward. The lack of a published crates.io version also means cargo audit doesn't see the dep. ADR-007 explicitly listed a Provider Router as part of the architecture ("Copilot SDK ↔ HTTP fallback ↔ disable") but the implementation collapsed this into a single hardcoded SDK. This is also a security risk: a pinned single-commit dep from a third-party org becomes a single point of failure.
Static analysis: grep "rev =" src-tauri/crates/mas-ai/Cargo.toml shows the raw rev pin; grep "ai_provider\|trait.*Provider" src-tauri/crates/mas-ai/ returns no Provider abstraction.
Expected
AiProvider trait with multiple implementations; pinned semver dep; cargo-deny or cargo-audit in CI; fallback chain documented.
Proposed fix
Scope M. (a) Abstract the AI provider behind trait AiProvider defined in mas-ai; CopilotProvider (current) and StubProvider (no-op, returns AIUnavailable) implement it; AiService::new takes Box<dyn AiProvider>. (b) Publish (or vendor) a Cargo semver version of the SDK; pin to a tag/version with a constraint. (c) Add cargo-deny or cargo-audit to CI.
Acceptance
grep "rev =" src-tauri/crates/mas-ai/Cargo.toml returns no matches. AiProvider trait exists with CopilotProvider and StubProvider implementations. The Tauri commands compile when CopilotProvider::new is replaced with StubProvider::new.
Closing as obsolete rather than fixed: this describes the implementation that ADR-011 replaces.
The AI feature is being rebuilt around a decision made in #673 — SQLPilot does not call a model. It exposes the database, under its own policy, to whatever harness the user already runs and pays for. The mas-ai crate, its Copilot SDK session, its system prompt and its tool guards are all going.
What that does to this issue specifically: the pinned git rev goes with the dependency. There is no SDK to pin: the user's own installed, authenticated harness is the dependency, and we never see a credential.
The design is in docs/design/AI_INTEGRATION.md and ADR-011. If any part of this issue survives the redesign in a form I have missed, reopen it — I would rather re-argue it than lose it.
Activity
EVWorth commentedon Sep 12, 2026
Closing as obsolete rather than fixed: this describes the implementation that ADR-011 replaces.
The AI feature is being rebuilt around a decision made in #673 — SQLPilot does not call a model. It exposes the database, under its own policy, to whatever harness the user already runs and pays for. The
mas-aicrate, its Copilot SDK session, its system prompt and its tool guards are all going.What that does to this issue specifically: the pinned git rev goes with the dependency. There is no SDK to pin: the user's own installed, authenticated harness is the dependency, and we never see a credential.
The design is in docs/design/AI_INTEGRATION.md and ADR-011. If any part of this issue survives the redesign in a form I have missed, reopen it — I would rather re-argue it than lose it.