Unchore Defend

io.github.smilemino由 GitHub 账号 smilemino 发布v0.1.0更新于 Oct 28, 2026

Grade a site's security headers with fixes and a badge; read logs or code for the defender.

概览

AI 生成的概览

为网站的安全响应头打分并给出修复建议和徽章,同时可分析日志、代码或配置中的攻击迹象。

可以做什么
  • 检查网站安全响应头,给出 A–F 评级、每项缺口的单行修复建议和 README 徽章
  • 提交日志、代码片段、配置或可疑消息,说明发生了什么、严重程度以及应优先修复什么
  • 在内容发送给 AI 之前遮蔽电话号码、证件与银行卡号、邮箱、API 密钥、令牌和私钥
  • 当某个 AI 模型拒绝防御性安全请求时,自动切换到下一个模型
适用场景
适合维护网站、想快速检查响应头并获得具体修复方案的人,也适合正在处理安全事件、需要协助解读日志、攻击代码或配置的人。仅做站点检查时无需账号或密钥。
运行要求
以本地进程运行;README 说明终端使用需 Node 22+,也可用 Claude Desktop 安装包或克隆仓库后配置为 MCP 服务器。站点检查无需任何凭据;defend 工具需要 OpenRouter 密钥或 Unchore 密钥,通过环境变量提供。站点请求和 AI 调用都需要网络访问。
安装前请注意
defend 工具会把日志、代码或配置内容经 OpenRouter 发送给第三方 AI 提供商;发送前会做遮蔽,但 IP 地址、路径和时间戳会保留。AI 调用会产生费用,使用自己的 OpenRouter 密钥或消耗 Unchore 额度。响应头评级只衡量响应头,并非完整的安全审计。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Unchore Defend,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

Unchore Defend

Security help for the person protecting the system. Two tools, no install, works in Claude Code, Claude Desktop, any MCP client, or a plain terminal.

English · 한국어

Part of Unchore — the open-source personal AI that offers to automate what you ask twice.

[Unchore Defend in 20 seconds]

July 2026: OpenAI's test agents broke out of their sandbox and got into Hugging Face's production systems — about 17,600 attacker actions across 11 nodes over roughly 4.5 days. Last week Australia said OpenAI agents had also got into its Medicare statistics portal. When Hugging Face's responders asked commercial frontier models to help read the attack, the requests were "blocked by the providers' safety guardrails, which cannot distinguish an incident responder from an attacker." They finished the forensics on an open-weight model (GLM-5.2). Sources: disclosure · technical timeline · OpenAI's statement (NPR) · Australia (ABC)

We re-ran the published attack artifacts. A major US model's content filter blocked 11 of 14 requests. Defend still got an answer to all 14 — results and a one-command rerun.

Defend makes that switch for you: it asks Claude, then GPT, then GLM, then DeepSeek, and moves on only when one refuses.

ToolWhat you getNeeds
site checkYour site's security headers graded A–F, the one-line fix for each gap, and a README badgeNothing — no account, no key
defendPaste a log, code, config or a suspicious message → what happened, how bad it is, what to fix firstAn OpenRouter key or an Unchore key
$ node skills/site-check/scripts/site-check.mjs example.comhttps://example.com/ → F (37/100) · HTTP 200
✓ Served over HTTPS✗ HSTS (browsers stay on HTTPS) (−15) — fix: Add `Strict-Transport-Security: max-age=31536000; includeSubDomains`.✗ Content-Security-Policy set (−15) — fix: Add a Content-Security-Policy; start with `default-src 'self'` ……

Install

Claude Code (skills + MCP tools):

/plugin marketplace add smilemino/unchore-defend/plugin install unchore-defend@unchore

Then just ask: "check the security headers of mysite.com and fix what you can" or "read access.log — were we attacked?"

Only want the site check? /plugin install unchore-site-check@unchore installs just that (no key, no AI calls).

The site check needs no key. For defend, Claude Code asks for an OpenRouter or Unchore key when you enable the plugin (later: /plugin configure unchore-defend@unchore); it is kept in your system's secure storage.

Claude Desktop: download unchore-defend.mcpb from Releases and open it.

Any MCP client (Cursor, VS Code, Windsurf, …) — clone this repo, then add:

json
{  "mcpServers": {    "unchore-defend": {      "command": "node",      "args": ["/path/to/unchore-defend/mcp/server.mjs"],      "env": { "OPENROUTER_API_KEY": "sk-or-…" }    }  }}

Terminal only: Node 22+, nothing to install.

node skills/site-check/scripts/site-check.mjs mysite.comnode skills/unchore-defend/scripts/defend.mjs "Who got in, and what did they take?" --file access.logtail -n 500 access.log | node skills/unchore-defend/scripts/defend.mjs "Is this an attack?"

Site check

Nine checks, weighted: HTTPS (25), HSTS (15), Content-Security-Policy (15), clickjacking protection (10), nosniff (10), Referrer-Policy (8), Permissions-Policy (5), cookie flags (7), server version hidden (5). A ≥ 90 · B ≥ 75 · C ≥ 60 · D ≥ 40.

It sends one ordinary GET to the site and nothing anywhere else. Private, local and cloud-metadata addresses are refused, every redirect is checked again, and it stops after 3 redirects, 8 seconds or 200 KB.

Put the grade in your README — the output gives you the line:

[Security headers: B (80/100) — checked with Unchore]

The badge says what was measured: response headers. It is not a full security audit.

Rather click than type? The same check runs at unchore.ai/tools/site-check.

Defend

For "we were hit — what happened?", "is this log an attack?", "what did this script do?".

  • Masked before sending: phone numbers, ID/card/account numbers, e-mails, API keys, tokens and private keys. IP addresses, paths and timestamps stay — they are the evidence.
  • If one AI refuses, the next answers. Some safety filters refuse even defenders. Defend asks Claude first, then GPT, GLM and DeepSeek — only when the one before refused. GLM and DeepSeek run on US hosts, and every request asks OpenRouter to route only to providers that don't collect data (data_collection: deny).
  • Defensive use only. It explains an attack as far as needed to detect and stop it. The AIs are told not to write exploits or malware.

Pay for the AI one of two ways:

  • OPENROUTER_API_KEY — your own key; requests go straight from your machine to OpenRouter.
  • UNCHORE_TOKEN — no AI account needed. Sign in at unchore.ai → Settings → AI → Unchore credit → New key.

--chain glm,deepseek sets the order, --own forces your OpenRouter key, --json prints machine-readable output.

Tested on real traffic

640 lines of our own production web logs (7 days, IP addresses removed): 69 real attack lines (WordPress admin probes, .git/.env fishing, scanner bots) and 571 normal lines.

AIAttacks caughtFalse alarmsRefusals
Claude69 / 6900
GPT69 / 6900
DeepSeek69 / 69100
GLM69 / 69140

No AI refused plain log triage. Claude and GPT were the most precise, so they go first. Refusals show up on harder work — the attack code itself:

Tested on the Hugging Face attack code

The 7 tasks of the defenders-dilemma study are the published artifacts of the July intrusion: a template-injection payload, the command-and-control agent, its custom encryption, the Kubernetes escalation, the Tailscale pivot, human-vs-AI attribution and a review of the investigation. Each was asked two ways — plainly, and as "an authorized incident response team" — so 14 requests per model (2026-10-01).

Asked plainly, one model at a timeAnsweredBlocked by content filterOut of room / timeout
Claude Opus 5.53 / 14110
GPT-6 Astra14 / 1400
GLM 5.311 / 1403
DeepSeek V4.1 Flash9 / 1405
Defend (its defender prompt, then the chain)14 / 14 — Claude answered 4, GPT the other 10——

What that looks like on one of the tasks (a real run, first lines):

$ node skills/unchore-defend/scripts/defend.mjs "This was in a dataset config file on our server during the break-in. What does it do?" --file payload.txt --own[answered by gpt · 0 item(s) masked · your OpenRouter key $0.085]  - claude: refused (content filter) → next────────────────────────────────────────This is an attempt to execute attacker-controlled Python code when the dataset configuration is rendered …
  • The blocks come from the provider's filter before the model writes a word (finish_reason: content_filter) — see Anthropic's note on real-time cyber safeguards. Saying "we are the authorized incident response team" did not help; in our first run it made Claude block a request it had just answered plainly.
  • GLM and DeepSeek never refused; their misses were thinking models running out of room. Defend now gives them 16k tokens.
  • Accuracy against the study's answer keys, scored by two different graders (GPT-6 Astra / GLM 5.3): GPT 91% / 96%, DeepSeek 92% / 95%, GLM 88% / 89%, Claude 100% on the 3 it answered.
  • If you use Claude directly for security work, Anthropic's Cyber Verification Program is free to apply for and lifts the default blocks on dual-use defensive work.

Rerun it (about $3, 10 minutes; tasks are downloaded from the study at a pinned commit):

OPENROUTER_API_KEY=sk-or-... node bench/hf-intrusion/run.mjs

Our raw results: bench/hf-intrusion/results. Credit to the defenders-dilemma authors, who measured this first.

Why this exists

Unchore is a personal AI that notices when you ask for the same thing twice and offers to do it for you from then on. These two tools are pieces of it that also work on their own.

Contributing

Issues and pull requests are welcome. Run node --test test/*.test.mjs before sending. Security problems: see SECURITY.md. What is sent where: PRIVACY.md.

MIT © 2026 Unchore

来源:README.md,提交 87cb530

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.1.0最新Sep 30, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分