Skip to content

feat: Add GitHub integration, code visualization, security scanning, performance profiling, and custom rules - #667

Open
magic-peach wants to merge 1 commit into
CodeGraphContext:mainfrom
magic-peach:feature/issue-662-github-integration
Open

feat: Add GitHub integration, code visualization, security scanning, performance profiling, and custom rules#667
magic-peach wants to merge 1 commit into
CodeGraphContext:mainfrom
magic-peach:feature/issue-662-github-integration

Conversation

@magic-peach

Copy link
Copy Markdown
Contributor

Summary

This PR implements five major feature requests for CodeGraphContext:

GitHub Integration (Issue #662)

  • OAuth authentication flow
  • Repository import from GitHub
  • Commit history analysis
  • Pull request tracking
  • Issue synchronization

Code Visualization Graphs (Issue #663)

  • Call graph visualization
  • Class diagram visualization
  • Dependency tree visualization
  • Interactive exploration via HTML visualization

Security Vulnerability Scanning (Issue #664)

  • Secret detection (API keys, tokens, passwords, private keys)
  • Vulnerability detection (SQL injection, hardcoded credentials, eval usage, etc.)
  • Dependency scanning for known vulnerabilities
  • Security reports with severity levels

Performance Profiling Tools (Issue #665)

  • Complexity analysis
  • Performance bottleneck detection
  • Optimization suggestions
  • Cyclomatic complexity metrics

Custom Rule Definitions (Issue #666)

  • Rule definition syntax with regex patterns
  • Custom severity levels (error, warning, info)
  • Rule testing and application
  • Rule sharing via JSON export/import

Changes Made

  • Added github_integration.py for GitHub API interactions
  • Added handler modules for each feature:
    • github_handlers.py
    • visualization_handlers.py
    • security_handlers.py
    • performance_handlers.py
    • custom_rules_handlers.py
  • Updated tool_definitions.py with new tools
  • Updated server.py with new tool wrappers and routing
  • Added requests dependency to pyproject.toml

Testing

  • Syntax validated for all new Python files
  • Code follows existing project conventions
  • All tools properly integrated into the MCP server

Closes #662, #663, #664, #665, #666

…performance profiling, and custom rules

- Implement GitHub integration with OAuth, repository import, commit analysis, PR tracking, and issue sync
- Add code visualization graphs: call graphs, class diagrams, dependency trees
- Add security vulnerability scanning: secret detection, vulnerability detection, dependency scanning
- Add performance profiling tools: complexity analysis, bottleneck detection, optimization suggestions
- Add custom rule definitions: rule syntax, pattern matching, severity levels, rule testing, rule sharing

Closes CodeGraphContext#662, CodeGraphContext#663, CodeGraphContext#664, CodeGraphContext#665, CodeGraphContext#666
@vercel

vercel Bot commented Feb 27, 2026

Copy link
Copy Markdown

@magic-peach is attempting to deploy a commit to the shashankss1205's projects Team on Vercel.

A member of the Team first needs to authorize it.

@Shashankss1205

Copy link
Copy Markdown
Collaborator

👋 Thanks for contributing to CodeGraphContext! Since this PR was opened, main has moved forward significantly (we just shipped v0.5.2 and merged ~50 PRs), so this one now has merge conflicts. Could you please rebase onto the latest main and resolve the conflicts? Once it is conflict-free and CI is green, we will review and merge it. Really appreciate your work — thank you! 🙏

@Shashankss1205

Copy link
Copy Markdown
Collaborator

Triage update: this bundles five features (GitHub integration, visualization, security scanning, profiling, custom rules) into one +2k-line PR, which we can't review responsibly as a unit. @magic-peach if any of these is still something you want to land, please split it into one PR per feature against current main — the security scanning piece overlaps with #1313 which we're actively interested in. Thanks for understanding! 🙏

@Shashankss1205

Copy link
Copy Markdown
Collaborator

Keeping this open, but it needs splitting before it can be reviewed.

The PR bundles five unrelated capabilities in one changeset — GitHub integration, code visualization, security scanning, performance profiling and custom rules (+2053/-125 across 9 files). Each is a separate design decision, and a reviewer has to accept or reject all five together. That is the main reason this has sat for 156 days.

It is also currently conflicting with main, which has moved a long way since February.

What would make this land. Split into one PR per capability, smallest first, each with its own issue. Two of the five have a clear path right now:

For the other three, please open an issue describing the design first — particularly GitHub integration, which spans OAuth, repository import, commit history and PR tracking; those are four separate projects.

I reopened #662 earlier because closing it while this PR was open was the wrong call. The issue stands; this PR just needs to arrive in pieces a reviewer can act on.

@Shashankss1205

Copy link
Copy Markdown
Collaborator

Thanks for the substantial work here, and apologies this has been open so long. I attempted the merge and hit 22 conflict regions across server.py and tool_definitions.py, several of them 200-300 lines — both files have been largely rewritten on main since February, so this needs a real rebase rather than a conflict resolution.

Before you spend that effort, though, I'd like to suggest restructuring, because the bundle has partly been overtaken:

This PR carries five independent features (github_integration.py, security_handlers.py, performance_handlers.py, visualization_handlers.py, custom_rules_handlers.py). Two of them now overlap with work already on main:

  • GitHub integrationmain has a PR Reviewer (website/src/components/PRReviewer.tsx, the /pr-reviewer/:owner/:repo/pull/:prNumber route and the PR code-graph GitHub Action). Worth checking what your github_handlers.py adds beyond it.
  • Security scanningfeat: implement secret scanner, redaction utility, and update docs #1313 #1321 just landed a secret scanner (utils/secret_scanner.py) with opt-in redaction at index time. Your security_handlers.py may overlap or may be complementary; I can't tell from a conflicted tree.

My suggestion: split this into one PR per feature against current main, starting with whichever is least overlapping — custom_rules_handlers.py and performance_handlers.py look the most independent. Each will be small enough to review properly and won't rot waiting on the others. A 2000-line five-feature PR is very hard to land, which is largely why it's been stuck.

The new handler modules themselves merge cleanly — it's only the server.py registration and the tool_definitions.py entries that conflict, and those are mechanical to re-add once the branch is rebased.

Let me know which piece you'd like to start with and I'll make sure it gets a fast review. If you'd rather not carry this forward, that's completely fine too — just say so and I'll close it with credit noted on #662.

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.

feat: Add GitHub integration

2 participants