beachf2lightning/claude-osint-agentic-starter

GitHub: beachf2lightning/claude-osint-agentic-starter

一个将 Claude Code 智能体集成到防御性 OSINT 自动化工作流中的起始模板,提供安全护栏、离线目标规范化和多 IDE 开发环境支持。

Stars: 0 | Forks: 0

# Claude OSINT Agentic Starter 一个开箱即用的 GitHub 初始仓库,用于在 VS Code、Cursor、Kali Linux、Docker 和 MCP 导向的工作流中,将 Claude Code 作为智能体助手,用于防御性网络安全、OSINT 自动化和侦察工具开发。 该模板包含: - 针对防御性安全自动化、错误修复、重构和功能开发进行了优化的根目录 `CLAUDE.md`。 - `.claude/commands/` 中的可复用 Claude Code 命令提示词。 - 带有明确授权护栏的 OSINT 和侦察工作流提示词。 - 适配 Kali 的安装说明。 - Docker 和 MCP 脚手架。 - Cursor 项目规则。 - VS Code 设置和扩展推荐。 - GitHub Issue 模板和 CI。 - 一个小型的带类型的 Python 包,包含离线安全的目标规范化测试,确保仓库开箱即用。 ## 快速开始 ``` git init git add . git commit -m "Initial Claude OSINT agentic starter" python -m venv .venv source .venv/bin/activate python -m pip install -e ".[dev]" python -m pytest ``` 在 Windows PowerShell 中: ``` python -m venv .venv .\.venv\Scripts\Activate.ps1 python -m pip install -e ".[dev]" python -m pytest ``` ## 命令行用法 安装后,`osint-agentic-starter` 脚本会暴露两个子命令。 将字符串规范化为稳定的标识符: ``` osint-agentic-starter normalize "Hello, World" # hello-world ``` 加载并规范化授权范围文件(离线;无 DNS 或网络访问): ``` osint-agentic-starter scope examples/osint-targets/authorized-scope.example.txt osint-agentic-starter scope path/to/scope.txt --format jsonl ``` `--format jsonl` 中的 `source` 字段反映了已加载文件的解析绝对路径;以编程方式使用 `load_targets_from_file` 的调用者可以通过 `source` 关键字覆盖它。 使用 `--allowed-root` 将读取操作限制在受信任的目录内,并拒绝符号链接逃逸或其外部的绝对路径: ``` osint-agentic-starter scope ./scope/targets.txt --allowed-root ./scope ``` 裸形式(无子命令)为保持向后兼容而保留,其行为与 `normalize` 相同: ``` osint-agentic-starter "Hello, World" ``` ## 在 VS Code 中配合 Claude Code 使用 1. 在 VS Code 中打开此文件夹。 2. 在出现提示时安装推荐的扩展。 3. 打开集成终端。 4. 从仓库根目录运行 `claude`。 5. 要求 Claude 阅读 `CLAUDE.md` 并按照您任务的工作流进行操作。 示例提示词: ``` Read CLAUDE.md, then inspect the failing tests and fix the smallest bug that explains them. ``` ``` Use /recon-pipeline to add a passive subdomain normalization stage. Keep it offline-testable, add fixtures, and run validation. ``` ``` Use /mcp-tooling to design a safe MCP tool manifest for passive DNS enrichment. Use environment variables for secrets and mark network-touching tools clearly. ``` ## 在 Cursor 中使用 1. 在 Cursor 中打开此文件夹。 2. 保持启用 `.cursor/rules/claude-agentic-starter.mdc`。 3. 针对多文件任务使用 Agent 模式。 4. 在开始大型工作时,将 Cursor 指向 `CLAUDE.md`。 5. 在进行大范围编辑之前先要求提供计划,然后让 Agent 逐步实施和测试。 示例 Cursor 提示词: ``` Follow CLAUDE.md and the Cursor project rules. Implement the defensive OSINT feature described in docs/feature-brief.md, add tests, and summarize the verification commands. ``` ## Kali Linux 快速开始 ``` sudo apt update sudo apt install -y python3-venv python3-pip git docker.io docker-compose-plugin python3 -m venv .venv source .venv/bin/activate python -m pip install -e ".[dev]" ./scripts/check.sh ``` 如果您在虚拟机中使用 Kali,请尽可能将此仓库保留在您的主目录中,而不是共享文件夹中。共享文件夹可能会给 Python 虚拟环境、Docker 绑定挂载和测试缓存带来文件权限问题。 有关 Kali 上日常操作员工作流的详细信息,请参阅 [`docs/OPERATOR_RUNBOOK.md`](docs/OPERATOR_RUNBOOK.md)。 ## Docker 快速开始 ``` docker compose -f docker/docker-compose.yml build docker compose -f docker/docker-compose.yml run --rm osint-agent ./scripts/check.sh ``` Docker 脚手架默认有意设为非特权且离线友好的模式。 ## MCP 快速开始 从 `mcp/server-template.json` 开始,用您实际的本地 MCP 服务器入口点替换占位符命令。将密钥保存在 `.env` 中,而不是 JSON 配置文件中。 ## 安全地让 Claude 扮演智能体 要获得可靠的自主编程会话: - 给 Claude 明确的目标、成功标准和验证命令。 - 保持任务规模适中以便于审查。 - 要求 Claude 在更改行为之前编写或更新测试。 - 让 Claude 运行本地测试和代码检查工具。 - 在合并之前审查生成的差异。 - 确保仓库和提示词中不包含密钥。 - 明确声明侦察逻辑必须是仅被动、仅限实验室还是仅限授权范围。 - 在测试中使用 `examples/osint-targets/` 下的测试夹具,而不是真实的第三方目标。 ## 建议的首要任务 - 用您真实的应用程序代码替换示例包。 - 使用您特定技术栈的命令更新 `CLAUDE.md`。 - 在 `docs/` 下添加架构说明。 - 为您自己的实验室域名或范围添加授权范围模板。 - 为仅限本地的安全工具添加 MCP 服务器配置。 - 在 `.claude/commands/` 下添加项目特定的斜杠命令。 - 收紧 CI 以符合您的生产标准。
标签:Claude Code, Cursor, Docker, ESC4, GitHub模板, MCP, OSINT, Python, Subfinder, VS Code, 安全护栏, 安全测试, 安全防御评估, 攻击性安全, 数字取证, 无后门, 无线安全, 目标标准化, 网络安全, 网络调试, 脚手架, 自动化, 自动化脚本, 请求拦截, 逆向工具, 防御性安全, 隐私保护