Add binary name retrieval for project files#63
Open
jeffmcjunkin wants to merge 2 commits into
Open
Conversation
Extract original binary name from BinaryView.file.project_file.name, stripping .bndb suffix when present. This fixes display issues when using Binary Ninja projects (.bnpr) where file.filename returns internal project paths instead of the original binary name. Changes: - Add _get_binary_name() helper in binary_operations.py - Include binary_name in get_status() and list_open_binaries() - Update MCP tools to prominently display binary names Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds functionality to extract and display original binary names from Binary Ninja project files, fixing display issues where internal project paths (ending in .bndb) were shown instead of the original binary names.
Changes:
- Added
_get_binary_name()helper method that extracts original binary names from project files by stripping .bndb suffix - Updated status and binary listing endpoints to include binary_name field
- Enhanced MCP tools to prominently display original binary names instead of project file paths
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| plugin/core/binary_operations.py | Added _get_binary_name() method and updated list_open_binaries() to include binary_name in returned data |
| plugin/api/endpoints.py | Updated get_status() to include binary_name and added binary_name to binary listing selectors |
| bridge/binja_mcp_bridge.py | Enhanced get_binary_status() and list_binaries() MCP tools to display binary names prominently |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Author
|
The Copilot suggestion is reasonable, I suppose. @fosdickio , are you open to this small PR? When doing agentic workflows it seems odd that, for example, Claude Code can't reliably determine the binary's name. |
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.
Summary
Changes
Test plan
Generated with Claude Code (https://claude.ai/claude-code)