BlendFileAnalyzer is a security and code analysis tool for Blender .blend files. It extracts embedded Python scripts from .blend files and analyzes them for suspicious or potentially malicious code using local or remote AI models.
- Drag-and-drop GUI: Easily analyze
.blendfiles with a user-friendly interface. - Script Extraction: Uses Blender in headless mode to extract all embedded Python scripts from a
.blendfile in a safe way. - AI-Powered Security Analysis: Analyzes extracted scripts for suspicious patterns using a local LLM (Llama.cpp) or LMStudio API.
- HTML Reports: Generates detailed HTML reports with security scores and analysis for each script.
- Cross-platform: Works on Windows and Linux/macOS.
- Blender (must be installed and accessible in your PATH or specified manually)
- Python 3.11+
- virtualenv
- LMStudio for LLM analysis
git clone https://github.com/jfranmatheu/BlendFileAnalyzer.git
cd BlendFileAnalyzerOn Windows
setup_env.batOn Linux/macOS
source setup_env.shThis will create a virtual environment and install all required dependencies, including llama-cpp-python , huggingface_hub , openai , and tkinterdnd2.
- Ensure Blender is installed and accessible in your system PATH, or use the GUI to select the Blender executable.
- For remote LLM analysis, install and run LMStudio, and provide its API URL and model name in the GUI.
On Windows
run_gui.batOn Linux/macOS
./run_ui.sh- Open the GUI.
- (Optional) Select your Blender executable and configure LMStudio API/model if desired.
- Drag and drop a .blend file onto the window.
- Wait for the analysis to complete. An HTML report will be generated in the project directory.
You can also run the analysis directly:
python main.py --filepath <path-to-blend-file> [--blender-exec <path-to-blender>] [--lmstudio-api <url>] [--lmstudio-model <model>]- Extracted scripts are saved in the extracted_scripts/ directory.
- HTML reports are generated as report__{blendfilename}.html.
- main.py - Main entry point for script extraction and analysis.
- extract_scripts.py - Script run by Blender to extract embedded scripts.
- gui_analyzer.py - Tkinter-based drag-and-drop GUI.
- setup_env.bat / setup_env.sh - Environment setup scripts.
- run_ui.bat / run_ui.sh - Scripts to launch the GUI.
- .gitignore - Ignores virtual environment, models, and temporary files.
GPLv3 License
Disclaimer:
This tool is intended for security research and educational purposes. Always review the analysis results and use caution when running scripts extracted from unknown .blend files.