seqra/opentaint

GitHub: seqra/opentaint

面向 AI 时代的开源污点分析引擎,通过过程间数据流追踪精准检测 Java/Kotlin 应用中的安全漏洞。

Stars: 32 | Forks: 2

OpenTaint

面向 AI 时代的开源污点分析引擎

企业级数据流分析,采用代码原生规则 —— 无付费墙,无模式匹配妥协。

GitHub release Go Report Card License: Apache 2.0 Go Version Discord

OpenTaint summary output

Supported technologies and integrations

Java     Kotlin     Spring     GitHub      GitLab

Roadmap

Python     Go     C#     JavaScript     TypeScript

More screenshots

OpenTaint scan output

OpenTaint summary output

OpenTaint summary output

OpenTaint summary output

## 为什么选择 OpenTaint - **AI Agent 就绪。** Agent 可操作规则、CLI 和输出。扫描代码、分类结果、修复漏洞、优化规则。 - **尖端数据流分析。** 跨端点、持久层、别名和异步代码的过程间污点追踪。 - **企业级,挖掘真实宝藏。** 强大、精准且大规模高性能。捕获可利用的漏洞。 - **规则即代码。** 像编写应用程序代码一样编写和优化污点规则 —— 或者让您的 AI Agent 代劳。 - **开源,开箱即用。** 引擎、CLI、GitHub Action、GitLab CI、规则。Apache 2.0 和 MIT 许可。 ## 快速开始 **通过 Homebrew 安装 (Linux/macOS):** ``` brew install --cask seqra/tap/opentaint ``` **安装脚本** ``` irm https://raw.githubusercontent.com/seqra/opentaint/main/scripts/install/install.ps1 | iex ``` **安装脚本** ``` curl -fsSL https://raw.githubusercontent.com/seqra/opentaint/main/scripts/install/install.sh | bash ``` **扫描您的项目:** ``` opentaint scan --output results.sarif /path/to/your/spring/project ``` **或使用 Docker:** ``` docker run --rm -v $(pwd):/project -v $(pwd):/output \ ghcr.io/seqra/opentaint:latest \ opentaint scan --output /output/results.sarif /project ``` 更多选项,请参阅 [安装](#installation) 和 [使用](#usage)。 ## 关于 OpenTaint AI 生成的代码正快速扩展代码库。模式匹配器产生太多误报。有效的企业级污点分析器被付费墙阻挡。担任安全角色的 AI Agent 无法提供形式化保证。 OpenTaint 执行真正的过程间污点分析。基于 IFDS 归纳 (IFDS-with-abduction) 引擎。追踪从 HTTP 输入到危险 API 的不可信数据 —— 跨越端点、持久层、对象字段、别名引用、异步代码。建模 Spring 数据流及完整的 Boot 生态系统。字节码级别的 Java 和 Kotlin 支持。更多语言即将推出。 企业级。强大、精准、大规模高性能。处理大型 monorepo 代码库。追踪复杂的多跳攻击路径 —— 跨端点流、经由持久层的数据、存储型注入。 规则看起来像代码。人类和 AI Agent 阅读、编写和调整它们 —— 无需专有 DSL。引擎将规则转化为完整的污点配置:source、sink、sanitizer、propagator、污点标记。 完全开源。CLI、GitHub Action、GitLab CI、规则 —— 全部包含。[Apache 2.0](LICENSE.md) 和 [MIT](cli/LICENSE) 许可。 ## OpenTaint 能检测什么 OpenTaint 追踪数据从控制器参数通过您的 Web 应用程序流向危险的 sink。 **通过 JdbcTemplate 的 SQL 注入** ``` @GetMapping("/users/search") public List searchUsers(@RequestParam String name) { String sql = "SELECT * FROM users WHERE name = '" + name + "'"; return jdbcTemplate.query(sql, userRowMapper); } ``` OpenTaint 报告:`GET /users/search` 处的 `sql-injection-in-spring-app` —— 不可信输入流向 SQL 查询。 **Controller 响应中的 XSS** ``` @GetMapping("/greet") @ResponseBody public String greet(@RequestParam String name) { return "

Hello, " + name + "!

"; } ``` OpenTaint 报告:`GET /greet` 处的 `xss-in-spring-app` —— 用户输入在未经 HTML 转义的情况下返回。 **通过 RestTemplate 的 SSRF** ``` @GetMapping("/fetch") public String fetchUrl(@RequestParam String url) { return restTemplate.getForObject(url, String.class); } ``` OpenTaint 报告:`GET /fetch` 处的 `ssrf-in-spring-app` —— 用户控制的 URL 传递给 HTTP 客户端。 每个发现都包含 HTTP 端点,便于理解应用程序的攻击面。 ## 安装 | 方法 | 命令 | |--------|---------| | **Homebrew** (Linux/macOS) | `brew install --cask seqra/tap/opentaint` | | **安装脚本** (Linux/macOS) | `curl -fsSL https://raw.githubusercontent.com/seqra/opentaint/main/scripts/install/install.sh \| bash` | | **安装脚本** | `irm https://raw.githubusercontent.com/seqra/opentaint/main/scripts/install/install.ps1 \| iex` | | **安装脚本** (Windows CMD) | `curl -fsSL https://raw.githubusercontent.com/seqra/opentaint/main/scripts/install/install.cmd -o install.cmd && install.cmd && del install.cmd` | | **Docker** | 参见 [快速开始](#quick-start) 或 [Docker 文档](docs/docker.md) | | **Binary** | [从 releases 下载](https://github.com/seqra/opentaint/releases/latest) | 发布包有三种变体:**`opentaint-full`** (binary + JARs + rules + JRE)、**`opentaint`** (binary + JARs + rules) 和 **`opentaint-cli`** (仅 binary)。Homebrew 和安装脚本默认使用 `full`。 详细说明请参阅 [安装指南](docs/installation.md)。 ## 使用 ``` opentaint scan --output results.sarif /path/to/project # Scan project opentaint summary --show-findings results.sarif # View results opentaint summary --show-findings --verbose-flow --show-code-snippets results.sarif # Full detail ``` | 命令 | 描述 | |---------|-------------| | `opentaint scan` | 分析项目 (自动检测 Maven/Gradle) | | `opentaint compile` | 单独构建项目模型 | | `opentaint project` | 从预编译的 JAR 创建模型 | | `opentaint summary` | 查看 SARIF 结果 | | `opentaint pull` | 下载依赖 | | `opentaint update` | 更新到最新版本 | | `opentaint prune` | 删除过时的下载构件 | **选项:** `--max-memory 16G`, `--timeout 5m`, `--severity error`, `--config config.yaml` 详细用法请参阅 [使用指南](docs/usage.md)。 ## 配置 ``` scan: timeout: 15m max_memory: 16G log: verbosity: info # info, debug color: auto # auto, always, never ``` 或使用环境变量:`OPENTAINT_SCAN_TIMEOUT=30m`, `OPENTAINT_SCAN_MAX_MEMORY=16G` 详细配置请参阅 [配置指南](docs/configuration.md)。 ## CI/CD 集成 - **GitHub Actions:** [seqra/opentaint/github](https://github.com/seqra/opentaint/tree/main/github) - **GitLab CI:** [seqra/opentaint/gitlab](https://github.com/seqra/opentaint/tree/main/gitlab) ## 故障排除 | 问题 | 解决方案 | |-------|----------| | 构建失败 | 确保 `mvn compile` 或 `gradle build` 正常工作;设置 `JAVA_HOME` | | 内存不足 | 使用 `--max-memory 16G` | | 超时 | 使用 `--timeout 20m` | | 重新下载依赖 | `opentaint prune --yes && opentaint pull` | | 调试 | 使用 `--verbosity debug` | 详细故障排除请参阅 [故障排除指南](docs/troubleshooting.md)。 ## 文档 有关所有功能的综合指南,请参阅完整 [文档](docs/README.md)。 ## 支持 - **问题:** [GitHub Issues](https://github.com/seqra/opentaint/issues) - **社区:** [Discord](https://discord.gg/6BXDfbP4p9) - **邮箱:** [seqradev@gmail.com](mailto:seqradev@gmail.com) - **FAQ:** [FAQ](docs/faq.md) ## 许可证 [核心分析引擎](core/) 根据 [Apache 2.0 License](LICENSE.md) 发布。[CLI](cli/)、[GitHub Action](github/)、[GitLab CI 模板](gitlab/) 和 [规则](rules/) 根据 [MIT License](cli/LICENSE) 发布。
标签:CISA项目, DevSecOps, DNS 反向解析, DOE合作, Go, JS文件枚举, Kotlin, Ruby工具, SAST, Spring Boot, 上游代理, 云计算, 人工智能, 企业级安全, 图数据库, 开源安全工具, 日志审计, 用户模式Hook绕过, 盲注攻击, 网络安全, 规则引擎, 请求拦截, 逆向工程平台, 错误基检测, 隐私保护, 静态代码分析