cognis-digital/dnsaudit

GitHub: cognis-digital/dnsaudit

一款轻量级 DNS 安全态势扫描工具,用于检测域名的 SPF/DKIM/DMARC/DNSSEC/CAA 等邮件与 DNS 安全配置是否存在缺陷。

Stars: 0 | Forks: 0

DNSAUDIT # DNSAUDIT ### DNS 资产态势与错误配置扫描器 — SPF/DKIM/DMARC/DNSSEC/CAA [![PyPI](https://img.shields.io/pypi/v/cognis-dnsaudit.svg?color=6b46c1)](https://pypi.org/project/cognis-dnsaudit/) [![CI](https://static.pigsec.cn/wp-content/uploads/repos/2026/06/0f73c2a3be082109.svg)](https://github.com/cognis-digital/dnsaudit/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) *网络 / 基础设施 — DNS、TLS 和出口流量安全态势。*
``` pip install cognis-dnsaudit dnsaudit scan . # → prioritized findings in seconds ``` ## 使用说明 — 分步指南 1. **安装** CLI: pip install dnsaudit 2. **审计域名的 DNS/邮件安全态势** (SPF/DKIM/DMARC/DNSSEC)。直接传入原始记录,或者通过 `--input` 指定一个 JSON 文件: dnsaudit audit --domain example.com --spf "v=spf1 include:_spf.example.com -all" --dmarc "v=DMARC1; p=reject" --dnssec 3. 跨 TLD **搜寻您的域名的拼写错误域名** (typosquats): dnsaudit typosquat --domain example.com --tld com --tld net --limit 50 4. **查看输出。** 使用 `--format json` 和 `--output` 来保存一份机器可读的报告: dnsaudit audit --domain example.com --format json --output dns.json 5. **将其集成到 CI 中**,以拦截安全态势倒退: dnsaudit audit --input records.json --format json || exit 1 ## 目录 - [为什么选择 dnsaudit?](#why) · [功能](#features) · [快速开始](#quick-start) · [示例](#example) · [架构](#architecture) · [AI 技术栈](#ai-stack) · [对比](#how-it-compares) · [集成](#integrations) · [随处安装](#install-anywhere) · [相关项目](#related) · [贡献](#contributing) ## 为什么选择 dnsaudit? DNS 资产态势与错误配置扫描器 — SPF/DKIM/DMARC/DNSSEC/CAA — 无需搭建繁重的基础设施。 `dnsaudit` 是单一用途、可脚本化且可自托管的:将其指向目标,以您的工作流已支持的格式(table · JSON · SARIF)获取按优先级排序的结果,在 CI 中对其进行拦截,并让 agent 通过 MCP 驱动它。
↑ 回到顶部
## 功能 - ✅ 评级 (Grade) - ✅ 解析 SPF - ✅ 解析 DMARC - ✅ 审计域名 - ✅ 可在 Linux/macOS/Windows · Docker · devcontainer 上运行 - ✅ 提供 Python、JavaScript、Go 和 Rust 版本 (`ports/`)
↑ 回到顶部
## 快速开始 ``` pip install cognis-dnsaudit dnsaudit --version dnsaudit scan . # scan current project dnsaudit scan . --format json # machine-readable dnsaudit scan . --fail-on high # CI gate (non-zero exit) ```
↑ 回到顶部
## 示例 ``` $ dnsaudit scan . [HIGH ] DNS-001 example finding (./src/app.py) [MEDIUM ] DNS-002 another signal (./config.yaml) 2 findings · risk score 5 · 38ms ```
↑ 回到顶部
## 架构 ``` flowchart LR IN[target / export] --> P[dnsaudit
collect + correlate] P --> OUT[ranked findings] ```
↑ 回到顶部
## 从任何 AI 技术栈中使用 `dnsaudit` 可以与所有流行的 AI 使用方式互操作: - **MCP server** — `dnsaudit mcp` (Claude Desktop, Cursor, Cognis.Studio, [uncensored-fleet](https://github.com/cognis-digital/uncensored-fleet)) - **兼容 OpenAI / JSON** — 通过管道将 `dnsaudit scan . --format json` 传递给任何 agent 或 LLM - **LangChain · CrewAI · AutoGen · LlamaIndex** — 用一行代码将 CLI/JSON 封装为工具 - **CI / 脚本** — 为非 AI pipeline 提供 exit code + SARIF
↑ 回到顶部
## 对比 | | **Cognis dnsaudit** | globalcyberalliance | |---|:---:|:---:| | 可自托管,无需账号 | ✅ | 视情况而定 | | 单条命令,零配置 | ✅ | ⚠️ | | 支持用于 CI 的 JSON + SARIF | ✅ | 视情况而定 | | 原生支持 MCP (AI agents) | ✅ | ❌ | | 多语言移植版 (JS/Go/Rust) | ✅ | ❌ | | 开放许可协议 | ✅ COCL | 视情况而定 | *秉承 **globalcyberalliance/domain-security-scanner** 的精神,以 Cognis 的方式重新构建。遗漏了致谢?欢迎提交 PR。*
↑ 回到顶部
## 集成 可接入您的技术栈:用于代码扫描的 **SARIF**,用于任何场景的 **JSON**,用于 AI agent 的 **MCP server** (`dnsaudit mcp`),以及用于 SIEM/Slack/Jira 的 webhook 转发器。详见 [`docs/INTEGRATIONS.md`](docs/INTEGRATIONS.md)。
↑ 回到顶部
## 安装 — 各种方式,全平台 ``` pip install "git+https://github.com/cognis-digital/dnsaudit.git" # pip (works today) pipx install "git+https://github.com/cognis-digital/dnsaudit.git" # isolated CLI uv tool install "git+https://github.com/cognis-digital/dnsaudit.git" # uv pip install cognis-dnsaudit # PyPI (when published) docker run --rm ghcr.io/cognis-digital/dnsaudit:latest --help # Docker brew install cognis-digital/tap/dnsaudit # Homebrew tap curl -fsSL https://raw.githubusercontent.com/cognis-digital/dnsaudit/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/dnsaudit` | [DEPLOY.md](docs/DEPLOY.md) (AWS/Azure/GCP/k8s) |
↑ 回到顶部
## 相关 Cognis 工具 - [`certpatrol`](https://github.com/cognis-digital/certpatrol) — 通过证书透明度 (Certificate Transparency) 进行 TLS 证书生命周期与非法签发监控 - [`egresswatch`](https://github.com/cognis-digital/egresswatch) — 服务器端出站连接审计器 — eBPF/Falco 包装器 **探索整个工具套件 →** [🗂️ 所有 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+ 工具之一 · Making Tomorrow Better Today
标签:DNS, Python, 可视化界面, 域名防伪, 数据可视化, 无后门, 日志审计, 请求拦截, 逆向工具, 邮件安全, 配置检查