cognis-digital/sentrylog

GitHub: cognis-digital/sentrylog

面向小型团队的单文件 SIEM 工具,通过 Sigma 规则对多源日志进行安全检测与优先级排序,无需搭建重型基础设施。

Stars: 0 | Forks: 0

SENTRYLOG # SENTRYLOG ### 面向小型团队的单文件 SIEM — Sigma 规则 + 多源日志接入 [![PyPI](https://img.shields.io/pypi/v/cognis-sentrylog.svg?color=6b46c1)](https://pypi.org/project/cognis-sentrylog/) [![CI](https://static.pigsec.cn/wp-content/uploads/repos/2026/06/413c53b8b2181350.svg)](https://github.com/cognis-digital/sentrylog/actions) [![License: COCL 1.0](https://img.shields.io/badge/License-COCL%201.0-2b6cb0.svg)](LICENSE) [![Suite](https://img.shields.io/badge/Cognis-Neural%20Suite-6b46c1.svg)](https://github.com/cognis-digital) *蓝队 / 防御 — 面向小型团队的检测、欺骗与监控。*
``` pip install cognis-sentrylog sentrylog scan . # → prioritized findings in seconds ``` ## 使用说明 — 分步指南 1. **安装** CLI(控制台脚本 `sentrylog`): pip install cognis-sentrylog 2. **使用内置的 Sigma 风格规则扫描日志** — `scan` 支持 JSON、JSON-lines 或 CSV(`-` 代表 stdin),并在发现结果时以 `1` 退出: sentrylog scan events.jsonl 3. **缩小规则集 / 检查规则** — 按最低严重程度过滤,列出内置规则,或加载自定义规则包: sentrylog rules --level high sentrylog rule sentrylog scan events.jsonl --rules my_rules.yml --level medium 4. **汇总并读取输出** — `summary` 按 MITRE 技术和级别汇总发现结果;输出 JSON 供 SIEM 使用: sentrylog summary events.jsonl --format json | jq '.by_technique' 5. **在 CI 中实现自动化** — 基于检测结果进行拦截(非零退出代表有发现): - run: pip install cognis-sentrylog - run: sentrylog scan logs/*.jsonl --level high ## 目录 - [为什么选择 sentrylog?](#why) · [功能](#features) · [快速开始](#quick-start) · [示例](#example) · [架构](#architecture) · [AI 技术栈](#ai-stack) · [对比分析](#how-it-compares) · [集成](#integrations) · [任意平台安装](#install-anywhere) · [相关项目](#related) · [贡献指南](#contributing) ## 为什么选择 sentrylog? 面向小型团队的单文件 SIEM — Sigma 规则 + 多源日志接入 — 无需搭建重型基础设施。 `sentrylog` 是单一用途、可脚本化且可自托管的:将其指向目标,以您的工作流已支持的格式(表格 · JSON · SARIF)获取优先级排序的结果,通过它拦截 CI,并让代理通过 MCP 驱动它。
↑ 回到顶部
## 功能 - ✅ 加载规则文本 - ✅ 解析规则 - ✅ 接入单行 - ✅ 接入多行文本 - ✅ 检测 - ✅ 支持 Linux/macOS/Windows · Docker · devcontainer 运行 - ✅ 提供 Python、JavaScript、Go 和 Rust 多语言移植版本 (`ports/`)
↑ 回到顶部
## 快速开始 ``` pip install cognis-sentrylog sentrylog --version sentrylog scan . # scan current project sentrylog scan . --format json # machine-readable sentrylog scan . --fail-on high # CI gate (non-zero exit) ```
↑ 回到顶部
## 示例 ``` $ sentrylog scan . [HIGH ] SEN-001 example finding (./src/app.py) [MEDIUM ] SEN-002 another signal (./config.yaml) 2 findings · risk score 5 · 38ms ```
↑ 回到顶部
## 架构 ``` flowchart LR IN[input] --> P[sentrylog
analyze + score] P --> OUT[report] ```
↑ 回到顶部
## 从任何 AI 技术栈中使用 `sentrylog` 可与所有流行的 AI 使用方式互操作: - **MCP server** — `sentrylog mcp` (Claude Desktop、Cursor、Cognis.Studio、[uncensored-fleet](https://github.com/cognis-digital/uncensored-fleet)) - **OpenAI 兼容 / JSON** — 通过管道将 `sentrylog scan . --format json` 传给任何代理或 LLM - **LangChain · CrewAI · AutoGen · LlamaIndex** — 一行代码即可将 CLI/JSON 封装为工具 - **CI / 脚本** — 为非 AI 流水线提供退出码 + SARIF
↑ 回到顶部
## 对比分析 | | **Cognis sentrylog** | SigmaHQ | |---|:---:|:---:| | 可自托管,无需账号 | ✅ | 视情况而定 | | 单一命令,零配置 | ✅ | ⚠️ | | 面向 CI 的 JSON + SARIF | ✅ | 视情况而定 | | MCP 原生 (AI 代理) | ✅ | ❌ | | 多语言移植 (JS/Go/Rust) | ✅ | ❌ | | 开源协议 | ✅ COCL | 视情况而定 | *秉承 **SigmaHQ/sigma** 的精神,以 Cognis 的方式重新构建。遗漏了致谢?欢迎提交 PR。*
↑ 回到顶部
## 集成 可无缝接入您的技术栈:用于代码扫描的 **SARIF**,用于任何场景的 **JSON**,面向 AI 代理的 **MCP server** (`sentrylog mcp`),以及用于 SIEM/Slack/Jira 的 webhook 转发器。详见 [`docs/INTEGRATIONS.md`](docs/INTEGRATIONS.md)。
↑ 回到顶部
## 安装 — 全方式、全平台支持 ``` pip install "git+https://github.com/cognis-digital/sentrylog.git" # pip (works today) pipx install "git+https://github.com/cognis-digital/sentrylog.git" # isolated CLI uv tool install "git+https://github.com/cognis-digital/sentrylog.git" # uv pip install cognis-sentrylog # PyPI (when published) docker run --rm ghcr.io/cognis-digital/sentrylog:latest --help # Docker brew install cognis-digital/tap/sentrylog # Homebrew tap curl -fsSL https://raw.githubusercontent.com/cognis-digital/sentrylog/main/install.sh | sh ``` | Linux | macOS | Windows | Docker | 云平台 | |---|---|---|---|---| | `scripts/setup-linux.sh` | `scripts/setup-macos.sh` | `scripts/setup-windows.ps1` | `docker run ghcr.io/cognis-digital/sentrylog` | [DEPLOY.md](docs/DEPLOY.md) (AWS/Azure/GCP/k8s) |
↑ 回到顶部
## 相关 Cognis 工具 - [`edrgap`](https://github.com/cognis-digital/edrgap) — EDR 覆盖与绕过检测器 — 核对 MDM + EDR + AD 清单 - [`canarynet`](https://github.com/cognis-digital/canarynet) — 自托管 canary token 网络 — AWS 密钥、DNS、文档、web URL - [`phishforge`](https://github.com/cognis-digital/phishforge) — 开源网络钓鱼模拟 — 活动、模板、培训 - [`sbomgate`](https://github.com/cognis-digital/sbomgate) — 持续 SBOM 差异与漏洞监控,带有维护者变更追踪 - [`honeytrace`](https://github.com/cognis-digital/honeytrace) — 主动诱饵网络诱捕系统 — SSH、RDP、SMB、web 蜜罐 **探索全套工具 →** [🗂️ 全部 170+ 工具](https://github.com/cognis-digital/cognis-neural-suite) · [⭐ awesome-cognis](https://github.com/cognis-digital/awesome-cognis) · [🔗 cognis-sources](https://github.com/cognis-digital/cognis-sources) · [🤖 uncensored-fleet](https://github.com/cognis-digital/uncensored-fleet) · [🧠 engram](https://github.com/cognis-digital/engram)
↑ 回到顶部
## 互操作性 `{}` 可与 300+ 工具的 Cognis 套件组合 — JSON 输入/输出以及共享的 OpenAI 兼容 `/v1` 骨干网络。有关套件图谱、组合模式和参考技术栈, 请参阅 **[INTEROP.md](INTEROP.md)**。 ## 许可证 在 **Cognis Open Collaboration License (COCL) v1.0** 下开源可见 — 个人、内部评估、研究和教育用途免费;**商业 / 生产环境使用需要获取许可证** (licensing@cognis.digital)。详见 [LICENSE](LICENSE)。
Cognis Digital · Cognis Neural Suite 中 170+ 工具之一 · 让明天更美好,从今天开始
标签:AMSI绕过, Python, Sigma规则, 可视化界面, 威胁检测, 安全运营, 扫描框架, 数据可视化, 无后门, 日志审计, 目标导入, 请求拦截, 逆向工具