grgalex/pyxray
GitHub: grgalex/pyxray
PyXray 通过混合静态与动态分析为含原生扩展的 Python 包构建跨语言调用图,支持漏洞可达性分析和依赖膨胀量化。
Stars: 5 | Forks: 0
[](https://doi.org/10.1145/3744916.3764555)
[](https://doi.org/10.5281/zenodo.18009456)
[](https://www.gnu.org/licenses/agpl-3.0)
[](https://hub.docker.com/r/grgalex/pyxray)
# PyXray:实用的 Python 跨语言调用图
PyXray 是一款混合(静态/动态)分析工具,用于构建带有原生扩展的 Python 包的跨语言调用图 (XLCG)。
它随 ICSE'26 论文[*PyXray: Practical Cross-Language Call Graph Construction through Object Layout Analysis*](https://doi.org/10.1145/3744916.3764555)([PDF](https://grgalex.gr/assets/pdf/pyxray_icse26.pdf))一同发布。
[PACKAGE...] [options]
Commands:
bridges Find Python-to-native bridges of the package itself (deps excluded)
bridge-reach Compute native reachability from ANY bridge (baseline for CVE reachability)
xlcg Compute cross-language call graph (XLCG)
bloat Calculate dependency bloat (requires prior xlcg)
Package sources:
PACKAGE One or more packages as name:version (e.g. numpy:1.26.4)
or just name (e.g. pillow) to use the latest PyPI version
-i, --input-file CSV file with name:version entries (one per line)
--source-dir DIR Source project directory (auto-detect & install)
--install-dir DIR Pre-installed site-packages directory
--requirements FILE Requirements file (name:version per line) for --source-dir deps
Options:
--version Show version and exit
-j, --jobs N Number of parallel workers (default: 1)
-A, --always Force regeneration of all artifacts
-B, --binary-always Force binary CG regeneration via Ghidra (xlcg/bridge-reach)
-W, --wheel-only Use pre-built wheels instead of source builds
-T, --table Print ASCII summary table (bloat only)
-v, --verbose Stream subprocess output in real time
--log LEVEL Logging level (debug, info, warning, error)
```
## 文档
- **[docs/installation.md](docs/installation.md)**:通过 Docker 安装(拉取或在本地构建)或不使用 Docker 的手动设置。
- **[docs/advanced-usage.md](docs/advanced-usage.md)**:完整的 CLI 参考、所有子命令、批处理、并行机制、仅 wheel 模式、source-dir 与 install-dir 分析、架构、数据布局、开发与测试。
## 许可证
Copyright (C) 2026 Georgios Alexopoulos
该项目基于 GNU Affero General Public License v3.0 (AGPLv3) 授权。
详情请参阅 [LICENSE](LICENSE) 文件。
## 相关出版物
* Georgios Alexopoulos, Thodoris Sotiropoulos, Georgios Gousios, Zhendong Su, and Dimitris Mitropoulos.
[PyXray: Practical Cross-Language Call Graph Construction through Object Layout Analysis](https://grgalex.gr/assets/pdf/pyxray_icse26.pdf).
In Proceedings of the 48th International Conference on Software Engineering (ICSE '26), April 2026.
标签:Python, UML, WebSocket, 云安全监控, 依赖分析, 无后门, 漏洞可达性分析, 请求拦截, 调用图, 逆向工具, 静态分析