Skip to content

Commit 7fb2457

Browse files
committed
rebrand the codebase to codebadger
1 parent 16c66bb commit 7fb2457

23 files changed

+50
-79
lines changed

.env.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ QUERY_CACHE_ENABLED=true
3636
QUERY_CACHE_TTL=300
3737

3838
# Storage
39-
WORKSPACE_ROOT=/tmp/codebadger-toolkit
39+
WORKSPACE_ROOT=/tmp/codebadger
4040
CLEANUP_ON_SHUTDOWN=true
4141

4242
# GitHub (optional)

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ dmypy.json
122122
# Pyre type checker
123123
.pyre/
124124

125-
# CodeBadger Toolkit specific
125+
# CodeBadger specific
126126
/tmp/joern_*
127127
*.cpg
128128
*.bin

README.md

Lines changed: 4 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# 🦡 codebadger-toolkit
1+
# 🦡 codebadger
22

33
A containerized Model Context Protocol (MCP) server providing static code analysis using Joern's Code Property Graph (CPG) technology with support for Java, C/C++, JavaScript, Python, Go, Kotlin, C#, Ghidra, Jimple, PHP, Ruby, and Swift.
44

@@ -25,16 +25,12 @@ python --version
2525
```bash
2626
# Create a virtual environment (optional but recommended)
2727
python -m venv venv
28-
source venv/bin/activate # On Windows: venv\Scripts\activate
2928

3029
# Install dependencies
3130
pip install -r requirements.txt
3231
```
3332

3433
### 2. Start the Docker Services (Joern)
35-
36-
```bash
37-
docker compose up -d
3834
```
3935
4036
This starts:
@@ -64,7 +60,6 @@ The MCP server will be available at `http://localhost:4242`.
6460

6561
# Stop Docker services
6662
docker-compose down
67-
6863
# Optional: Clean up everything
6964
bash cleanup.sh
7065
```
@@ -101,19 +96,17 @@ Edit the MCP configuration file for VS Code (GitHub Copilot):
10196
{
10297
"inputs": [],
10398
"servers": {
104-
"codebadger-toolkit": {
10599
"url": "http://localhost:4242/mcp",
106100
"type": "http"
107101
}
108102
}
109103
}
110104
```
111-
112105
---
113106

114107
### Claude Code Integration
115108

116-
To integrate `codebadger-toolkit` into **Claude Desktop**, edit:
109+
To integrate `codebadger` into **Claude Desktop**, edit:
117110

118111
**Path:**
119112

@@ -126,7 +119,7 @@ Add the following:
126119
```json
127120
{
128121
"mcpServers": {
129-
"codebadger-toolkit": {
122+
"codebadger": {
130123
"url": "http://localhost:4242/mcp",
131124
"type": "http"
132125
}
@@ -135,7 +128,6 @@ Add the following:
135128
```
136129

137130
## Available Tools
138-
139131
### Core Tools (hash-based)
140132
- `generate_cpg`: Generate a CPG for a codebase (from local path or GitHub URL)
141133
- `get_cpg_status`: Get status and existence of a CPG by `codebase_hash`
@@ -152,7 +144,7 @@ Add the following:
152144
- `find_literals`: Search for hardcoded values
153145
- `get_code_snippet`: Retrieve code snippets
154146

155-
### Security Analysis Tools
147+
"codebadger": {
156148
- `find_taint_sources`: Locate external input points
157149
- `find_taint_sinks`: Locate dangerous sinks
158150
- `find_taint_flows`: Find dataflow paths
@@ -163,38 +155,17 @@ Add the following:
163155

164156
## Contributing & Tests
165157

166-
Thanks for contributing! Here's a quick guide to get started with running tests and contributing code.
167-
168-
### Prerequisites
169158

170159
- Python 3.10+ (3.13 is used in CI)
171-
- Docker and Docker Compose (for integration tests)
172-
173-
### Local Development Setup
174-
175-
1. Create a virtual environment and install dependencies
176-
177-
```bash
178-
python -m venv venv
179-
pip install -r requirements.txt
180-
```
181-
182-
2. Start Docker services (for integration tests)
183-
184-
```bash
185-
docker-compose up -d
186160
```
187161
188-
3. Run unit tests
189162
190163
```bash
191164
pytest tests/ -q
192165
```
193166

194167
4. Run integration tests (requires Docker Compose running)
195168

196-
```bash
197-
# Start MCP server in background
198169
python main.py &
199170

200171
# Run integration tests

cleanup.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
# Minimal cleanup script for CodeBadger Toolkit
2+
# Minimal cleanup script for CodeBadger
33
# Cleans codebases (except core) and CPGs
44

55
set -e
@@ -8,7 +8,7 @@ PLAYGROUND_PATH="./playground"
88
CODEBASES_PATH="$PLAYGROUND_PATH/codebases"
99
CPGS_PATH="$PLAYGROUND_PATH/cpgs"
1010

11-
echo "🧹 CodeBadger Toolkit Cleanup"
11+
echo "🧹 CodeBadger Cleanup"
1212
echo "=============================="
1313

1414
# Clean codebases (except core)

config.example.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -943,6 +943,6 @@ query:
943943
cache_ttl: ${QUERY_CACHE_TTL:300}
944944

945945
storage:
946-
workspace_root: ${WORKSPACE_ROOT:/tmp/codebadger-toolkit}
946+
workspace_root: ${WORKSPACE_ROOT:/tmp/codebadger}
947947
cleanup_on_shutdown: ${CLEANUP_ON_SHUTDOWN:true}
948948

examples/sample_client.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#!/usr/bin/env python3
22
"""
3-
Sample Client for CodeBadger Toolkit Server
3+
Sample Client for CodeBadger Server
44
5-
This client demonstrates basic usage of the CodeBadger Toolkit MCP server:
5+
This client demonstrates basic usage of the CodeBadger MCP server:
66
1. Generate a CPG for a local codebase
77
2. List methods in the codebase
88
3. Run a simple CPGQL query
@@ -72,7 +72,7 @@ async def main():
7272
codebase_path = "/app/playground/codebases/core"
7373

7474
logger.info("="*60)
75-
logger.info("CODEBADGER TOOLKIT SAMPLE CLIENT")
75+
logger.info("CODEBADGER SAMPLE CLIENT")
7676
logger.info("="*60)
7777
logger.info(f"Server URL: {server_url}")
7878
logger.info(f"Codebase: {codebase_path}")

main.py

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#!/usr/bin/env python3
22
"""
3-
CodeBadger Toolkit Server - Main entry point using FastMCP
3+
CodeBadger Server - Main entry point using FastMCP
44
5-
This is the main entry point for the CodeBadger Toolkit Server that provides static code analysis
5+
This is the main entry point for the CodeBadger Server that provides static code analysis
66
capabilities through the Model Context Protocol (MCP) using Joern's Code Property Graph.
77
"""
88

@@ -43,7 +43,7 @@ async def lifespan(mcp: FastMCP):
4343
# Load configuration
4444
config = load_config("config.yaml")
4545
setup_logging(config.server.log_level)
46-
logger.info("Starting CodeBadger Toolkit Server")
46+
logger.info("Starting CodeBadger Server")
4747

4848
# Ensure required directories exist
4949
import os
@@ -98,16 +98,16 @@ async def lifespan(mcp: FastMCP):
9898
register_tools(mcp, services)
9999

100100
logger.info("All services initialized")
101-
logger.info("CodeBadger Toolkit Server is ready")
102-
101+
logger.info("CodeBadger Server is ready")
102+
103103
yield
104-
104+
105105
# Shutdown
106-
logger.info("Shutting down CodeBadger Toolkit Server")
107-
106+
logger.info("Shutting down CodeBadger Server")
107+
108108
# Close connections
109-
110-
logger.info("CodeBadger Toolkit Server shutdown complete")
109+
110+
logger.info("CodeBadger Server shutdown complete")
111111

112112
except Exception as e:
113113
logger.error(f"Error during server lifecycle: {e}", exc_info=True)
@@ -116,7 +116,7 @@ async def lifespan(mcp: FastMCP):
116116

117117
# Initialize FastMCP server
118118
mcp = FastMCP(
119-
"CodeBadger Toolkit Server",
119+
"CodeBadger Server",
120120
lifespan=lifespan
121121
)
122122

@@ -130,7 +130,7 @@ async def health_check(request):
130130
"""Health check endpoint for monitoring server status"""
131131
return JSONResponse({
132132
"status": "healthy",
133-
"service": "codebadger-toolkit",
133+
"service": "codebadger",
134134
"version": VERSION
135135
})
136136

@@ -140,8 +140,8 @@ async def health_check(request):
140140
async def root(request):
141141
"""Root endpoint providing basic server information"""
142142
return JSONResponse({
143-
"service": "codebadger-toolkit",
144-
"description": "CodeBadger Toolkit for static code analysis using Code Property Graph technology",
143+
"service": "codebadger",
144+
"description": "CodeBadger for static code analysis using Code Property Graph technology",
145145
"version": VERSION,
146146
"endpoints": {
147147
"health": "/health",
@@ -157,7 +157,7 @@ async def root(request):
157157
host = config_data.server.host
158158
port = config_data.server.port
159159

160-
logger.info(f"Starting CodeBadger Toolkit Server with HTTP transport on {host}:{port}")
160+
logger.info(f"Starting CodeBadger Server with HTTP transport on {host}:{port}")
161161

162162
# Use HTTP transport (Streamable HTTP) for production deployment
163163
# This enables network accessibility, multiple concurrent clients,

src/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"""CodeBadger Toolkit Server - A Model Context Protocol server for static code analysis using Joern."""
1+
"""CodeBadger Server - A Model Context Protocol server for static code analysis using Joern."""
22

33
__version__ = "0.2.0"
44
__author__ = "Ahmed Lekssays"

src/config.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"""Configuration management for the CodeBadger Toolkit Server."""
1+
"""Configuration management for the CodeBadger Server."""
22

33
import os
44
from typing import Optional
@@ -135,7 +135,7 @@ def load_config(config_path: Optional[str] = None) -> Config:
135135
cache_ttl=int(os.getenv("QUERY_CACHE_TTL", "300")),
136136
),
137137
storage=StorageConfig(
138-
workspace_root=os.getenv("WORKSPACE_ROOT", "/tmp/codebadger-toolkit"),
138+
workspace_root=os.getenv("WORKSPACE_ROOT", "/tmp/codebadger"),
139139
cleanup_on_shutdown=os.getenv("CLEANUP_ON_SHUTDOWN", "true").lower()
140140
== "true",
141141
),

src/exceptions.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
"""
2-
Custom exceptions for CodeBadger Toolkit Server
2+
Custom exceptions for CodeBadger Server
33
"""
44

55

66
class JoernMCPException(Exception):
7-
"""Base exception for CodeBadger Toolkit"""
7+
"""Base exception for CodeBadger"""
88

99
pass
1010

0 commit comments

Comments
 (0)