j3ssie/osmedeus
GitHub: j3ssie/osmedeus
一个现代化的安全工作流编排引擎,通过声明式YAML将多种安全工具串联成可审计、可分布执行的自动化流水线。
Stars: 6139 | Forks: 965
# Osmedeus
## 什么是 Osmedeus?
[Osmedeus](https://www.osmedeus.org) 是一个专注于安全的声明式编排引擎,它将复杂的工作流自动化简化为可审计的 YAML 定义,并具备加密数据处理、安全凭证管理和沙箱执行功能。
该工具专为初学者和专家打造,在不牺牲基础设施完整性和安全性的前提下,提供强大且可组合的自动化能力。
## 主要特性
- **声明式 YAML 工作流** - 通过 hooks、决策路由、模块排除和跨多种 runner(host、Docker、SSH)的条件分支来定义 pipeline
- **分布式执行** - 基于 Redis 的 master-worker 模式,包含队列系统、webhook 触发器和 worker 间的文件同步
- **丰富的函数库** - 80 多个实用函数,包括 nmap 集成、tmux 会话、SSH 执行、TypeScript/Python 脚本、SARIF 解析以及 CDN/WAF 分类
- **事件驱动调度** - 支持 Cron、文件监视和事件触发,具备过滤、去重和延迟任务队列功能
- **Agentic LLM Steps** - 工具调用 agent 循环,支持 sub-agent 编排、内存管理和结构化输出;以及 ACP 子进程 agent(Claude Code、Codex、OpenCode、Gemini)
- **云基础设施** - 在 DigitalOcean、AWS、GCP、Linode 和 Azure 上配置并运行扫描,支持成本控制和自动清理
- **丰富的 CLI 界面** - 交互式数据库查询、批量函数评估、工作流 linting、进度条和全面的使用示例
- **REST API 与 Web UI** - 完整的 API 服务器,支持 webhook 触发、数据库查询和嵌入式可视化仪表板
更多详情请参阅 [文档页面](https://docs.osmedeus.org/)。
## 安装
```
curl -sSL http://www.osmedeus.org/install.sh | bash
```
快速设置请参阅 [快速入门](https://docs.osmedeus.org/quickstart/),高级配置请参阅 [安装说明](https://docs.osmedeus.org/installation/)。
| CLI 用法 | Web UI 资源 | 工作流可视化 |
|-----------|--------------|-----------------|
|  |  |  |
## 快速开始
```
# 运行模块工作流
osmedeus run -m recon -t example.com
# 运行 Flow 工作流
osmedeus run -f general -t example.com
# 多目标并发执行
osmedeus run -m recon -T targets.txt -c 5
# Dry-run 模式 (预览)
osmedeus run -f general -t example.com --dry-run
# 启动 API 服务器
osmedeus serve
# 列出可用工作流
osmedeus workflow list
# 查询已发现资产
osmedeus assets -w example.com # List assets for workspace
osmedeus assets --stats # Show unique technologies, sources, types
osmedeus assets --source httpx --type web --json # Filter and output as JSON
# 查询数据库表
osmedeus db list --table runs
osmedeus db list --table event_logs --search "nuclei"
# 评估工具函数
osmedeus func eval 'log_info("hello")'
osmedeus func eval -e 'http_get("https://example.com")' -T targets.txt -c 10
# Eval 中可用的平台变量
osmedeus func eval 'log_info("OS: " + PlatformOS + ", Arch: " + PlatformArch)'
# 从预设仓库安装
osmedeus install base --preset
osmedeus install base --preset --keep-setting # preserve existing osm-settings.yaml
osmedeus install workflow --preset
# 从 Flow 执行中排除模块
osmedeus run -f general -t example.com -x portscan
osmedeus run -f general -t example.com -X vuln # Fuzzy exclude by substring
# Worker 队列系统
osmedeus worker queue new -f general -t example.com # Queue for later
osmedeus worker queue run --concurrency 5 # Process queue
# Worker 管理
osmedeus worker status # Show workers
osmedeus worker eval -e 'ssh_exec("host", "whoami")' # Eval with distributed hooks
# 以交互模式运行 ACP agent
osmedeus agent "analyze this codebase"
osmedeus agent --agent codex "explain main.go"
osmedeus agent --list
# 显示所有用法示例
osmedeus --usage-example
```
## Docker
```
# 显示帮助
docker run --rm j3ssie/osmedeus:latest --help
# 运行扫描
docker run --rm -v $(pwd)/output:/root/workspaces-osmedeus \
j3ssie/osmedeus:latest run -f general -t example.com
```
有关更多 CLI 用法和示例命令,请参阅 [CLI 参考](https://docs.osmedeus.org/getting-started/cli)。
## 高层架构
```
┌───────────────────────────────────────────────────────────────────────────┐
│ Osmedeus Orchestration Engine │
├───────────────────────────────────────────────────────────────────────────┤
│ ENTRY POINTS │
│ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌─────────────┐ │
│ │ CLI │ │ REST API │ │Scheduler │ │ Distributed │ │
│ └────┬─────┘ └────┬─────┘ └────┬─────┘ └─────┬───────┘ │
│ └─────────────┴─────────────┴──────────────┘ │
│ │ │
│ ▼ │
│ ┌─────────────────────────────────────────────────────────────────────┐ │
│ │ CONFIG ──▶ PARSER ──▶ EXECUTOR ──▶ STEP DISPATCHER ──▶ RUNNER │ │
│ │ │ │ │
│ │ Step Executors: bash | function | parallel | foreach | remote-bash │ │
│ │ http | llm | agent | agent-acp | SARIF/SAST │ │
│ │ Hooks: pre_scan_steps → [main steps] → post_scan_steps │ │
│ │ │ │ │
│ │ Runners: HostRunner | DockerRunner | SSHRunner │ │
│ │ Queue: DB + Redis polling → dedup → concurrent execution │ │
│ └─────────────────────────────────────────────────────────────────────┘ │
└───────────────────────────────────────────────────────────────────────────┘
```
有关架构的更多信息,请参阅 [架构文档](https://docs.osmedeus.org/architecture)。
## 路线图与状态
项目的高层级宏伟计划,按顺序排列:
| # | 步骤 | 状态 |
| :-: | --------------------------------------------------------------------------- | :----: |
| 1 | 采用下一代架构重构 Osmedeus 引擎 | ✅ |
| 2 | 灵活的工作流和步骤类型 | ✅ |
| 3 | 事件驱动架构模型及不同的触发事件类别 | ✅ |
| 4 | 用于可视化结果和工作流 diagram 的精美 UI | ✅ |
| 5 | 重写工作流以适应新架构和语法 | ✅ |
| 6 | 测试更多实用函数,如通知功能 | ✅ |
| 7 | 集成 SAST 与 SARIF 解析(Semgrep、Trivy 等) | ✅ |
| 8 | 云集成,支持在云服务商上运行扫描 | 🚧 |
| 9 | 生成差异报告,显示运行之间新增/移除/未更改的资产 | ❌ |
| 10 | 添加可通过 serverless 运行的云服务商步骤类型 | ❌ |
| N | 酷炫功能(稍后讨论) | ❌ |
## 文档
| 主题 | 链接 |
|----------------------|----------------------------------------------------------------------------------------------------------|
| 入门指南 | [docs.osmedeus.org/getting-started](https://docs.osmedeus.org/getting-started) |
| CLI 用法与示例 | [docs.osmedeus.org/getting-started/cli](https://docs.osmedeus.org/getting-started/cli) |
| 编写工作流 | [docs.osmedeus.org/workflows/overview](https://docs.osmedeus.org/workflows/overview) |
| 事件驱动触发| [docs.osmedeus.org/advanced/event-driven](https://docs.osmedeus.org/advanced/event-driven) |
| 部署 | [docs.osmedeus.org/deployment](https://docs.osmedeus.org/deployment) |
| 架构 | [docs.osmedeus.org/concepts/architecture](https://docs.osmedeus.org/concepts/architecture) |
| 开发 | [docs.osmedeus.org/development](https://docs.osmedeus.org/development) 和 [HACKING.md](HACKING.md) |
| 扩展 Osmedeus | [docs.osmedeus.org/development/extending-osmedeus](https://docs.osmedeus.org/development/extending-osmedeus) |
| 完整文档 | [docs.osmedeus.org](https://docs.osmedeus.org) |
## 免责声明
**Osmedeus** 旨在通过 CLI、API 和工作流定义执行来自用户输入的任意代码和命令。这种灵活性是该引擎运行机制的核心,是有意为之。
请参阅 [⚠️ 安全警告](https://docs.osmedeus.org/others/security-warning) 页面,了解更多关于如何保持安全的信息。
**在执行以下操作前请三思:**
- 运行从不信任来源下载的工作流
- 对你不拥有或未经授权测试的目标执行命令或扫描
- 在未审查内容的情况下使用工作流
你需要对自己运行的内容负责。在执行前务必检查工作流 YAML 文件,尤其是来自第三方的文件。
## 许可证
Osmedeus 由 [@j3ssie](https://twitter.com/j3ssie) 用 ♥ 制作,并在 MIT 许可证下发布。
标签:DevSecOps, Docker, EVTX分析, FTP漏洞扫描, GitHub, Go语言, IP 地址批量处理, Redis, YAML, 上游代理, 凭据管理, 分布式执行, 声明式配置, 安全库, 安全测试, 安全编排, 安全防御评估, 密码管理, 工作流自动化, 开源安全工具, 插件系统, 搜索引擎查询, 攻击性安全, 攻击模拟, 日志审计, 程序破解, 网络安全, 网络安全审计, 自动化引擎, 请求拦截, 足迹分析, 逆向工具, 逆向工程平台, 隐私保护, 驱动签名利用
