Add GitHub Copilot SDK as an AI provider option#222
Open
AyushIIITU wants to merge 3 commits intoKeygraphHQ:mainfrom
Open
Add GitHub Copilot SDK as an AI provider option#222AyushIIITU wants to merge 3 commits intoKeygraphHQ:mainfrom
AyushIIITU wants to merge 3 commits intoKeygraphHQ:mainfrom
Conversation
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 : Support of Github Copilot
Summary
Integrates GitHub Copilot SDK (
@github/copilot-sdk ^0.1.30) into Shannon to provide multi-model routing and enhanced code analysis capabilities. Copilot is optional and fully backward compatible—Claude Agent SDK remains the default. This enables intelligent model selection for vulnerability detection and improved analysis coverage for security assessments.Root Cause
Shannon currently relies solely on Claude Agent SDK. By adding Copilot SDK support, we can:
Fix
@github/copilot-sdk(^0.1.30) to dependenciessrc/ai/claude-executor.tsto support Copilot integrationsrc/session-manager.tsGITHUB_TOKENenvironment variable for Copilot authenticationConfiguration
Add to
.env:Test Plan
Prerequisites
1. Claude Agent SDK (Default Behavior)
Verify backward compatibility with no GitHub token:
unset GITHUB_TOKEN ./shannon start URL=http://example.com REPO=test-repoExpected: Agent execution completes using Claude only, no errors.
2. Copilot Integration (With Token)
Test Copilot-enabled execution:
Expected: Worker logs show "✓ Copilot SDK initialized" and agent execution completes.
3. Authentication Flow
Expected: Successfully validates GitHub token (if set) and Copilot SDK readiness.
4. With Custom Config
Create
configs/test-copilot.yaml:Run:
Expected: Uses Copilot settings from config file, generates deliverables correctly.
5. Graceful Fallback
Test fallback when Copilot is unavailable:
export GITHUB_TOKEN=invalid_token ./shannon start URL=http://example.com REPO=test-repoExpected: Logs warning, falls back to Claude, completes successfully.
6. Verification
After any test run, verify:
docker compose logs -f worker | grep -i copilotShould show integration status messages.
Check deliverables generated:
Expected: Report, vulnerability analysis, and exploit findings.
Backward Compatibility
✅ Fully backward compatible - Copilot is optional
✅ Claude Agent SDK remains the default
✅ No breaking changes to existing workflows
✅ Works with or without
GITHUB_TOKENsetNotes
PIPELINE_TESTING=truefor local development without external APIsCloses #193