This is a standalone xbin plugin designed to be developed and managed in its own repository, independent of the main xbin source tree.
cfg_worker.py: The analysis logic. Note thatcategory="cfg_generation"is defined in the@xbin.plugindecorator.Dockerfile: Defines the environment. The orchestrator automatically injects thexbinSDK during the build.
You can point the orchestrator directly to this directory:
xbin-orchestrator --plugin [path where plugin is checked out]Example path can be:
xbin-orchestrator --plugin ~/xbin_external_exampleThe orchestrator will:
- Discover: Identify the plugin and its name from the directory.
- Categorize: Scan
cfg_worker.pyand place it in thecfg_generationcategory. - Build: Use the local
Dockerfileto build a container while injecting thexbinSDKβno manual copying required!
When writing your own standalone plugin, simply import xbin and use the module-level methods:
import xbin
@xbin.plugin(name="my_tool", category="cfg_generation")
class MyTool:
def on_new_binary(self, path, goals):
xbin.post_result(item_key="0x400", data={"nodes":[]}, confidence=1.0)