Skip to content

Commit 0612c34

Browse files
jgravelleclaude
andcommitted
Bump version to 0.2.18 — file-level summaries
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 941dd38 commit 0612c34

3 files changed

Lines changed: 7 additions & 8 deletions

File tree

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "jcodemunch-mcp"
3-
version = "0.2.17"
3+
version = "0.2.18"
44
description = "Token-efficient MCP server for source code exploration via tree-sitter AST parsing"
55
readme = "README.md"
66
requires-python = ">=3.10"

src/jcodemunch_mcp/storage/index_store.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,11 @@ def _content_dir(self, owner: str, name: str) -> Path:
174174
return self.base_path / self._repo_slug(owner, name)
175175

176176
def _safe_content_path(self, content_dir: Path, relative_path: str) -> Optional[Path]:
177-
"""Resolve a content path and ensure it stays within content_dir."""
177+
"""Resolve a content path and ensure it stays within content_dir.
178+
179+
Prevents path traversal when writing/reading cached raw files from
180+
untrusted repository paths.
181+
"""
178182
try:
179183
base = content_dir.resolve()
180184
candidate = (content_dir / relative_path).resolve()

src/jcodemunch_mcp/tools/get_file_outline.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,7 @@ def get_file_outline(
7373
tokens_saved = estimate_savings(raw_bytes, response_bytes)
7474
total_saved = record_savings(tokens_saved)
7575

76-
# File-level summary
77-
file_summary = ""
78-
if hasattr(index, "file_summaries") and index.file_summaries:
79-
file_summary = index.file_summaries.get(file_path, "")
80-
elif isinstance(getattr(index, "file_summaries", None), dict):
81-
file_summary = index.file_summaries.get(file_path, "")
76+
file_summary = index.file_summaries.get(file_path, "")
8277

8378
return {
8479
"repo": f"{owner}/{name}",

0 commit comments

Comments
 (0)