Vigia
OpenCode plugin that helps web developers find, prove, and fix vulnerabilities with open weights models
1
0
22.4
生态多维模型
13 小时前
2026-10-20
快速安装与配置
opencode.json写入当前项目的 opencode.json,只对这个仓库生效。
opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["opencode-vigia@0.1.1"]
}写入 ~/.config/opencode/opencode.json,对所有项目生效。
~/.config/opencode/opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["opencode-vigia@0.1.1"]
}若你要在本地改造这个插件,先装到项目里再从本地路径引用。
shell
pnpm add -D opencode-vigiaOpenCode 启动时会通过内嵌运行时自动加载 npm 依赖并缓存至本地目录,无需手动在全局环境执行安装。
Vigia is an OpenCode plugin that finds, proves, and helps fix security vulnerabilities in web applications. It runs on open weights models, such as GLM 5.3 and Mistral Large 4.
"Vigia" is Portuguese for "lookout".
[!WARNING] Vigia is in early development. It has run end to end on test projects, but not yet on many real projects. Expect changes.
Why Vigia
Many security tools report every possible bug. Developers get long reports that are mostly noise, and they stop reading them. Vigia follows three rules:
- A finding needs proof. A finding becomes a vulnerability only after a proof of concept (PoC) ran and showed the bug. Until then, it is a hypothesis.
- Ask the real parser. Many web vulnerabilities are parser differentials: a security check reads the input one way, and the browser reads it a different way. Vigia gives the model tools that run the real parsers, so the model does not have to guess.
- Keep the code local. The Vigia agents cannot search the web or contact hosts other than
localhost. You choose the model provider.
Vigia supports JavaScript, TypeScript, and Python web code.
Quick start
You need OpenCode 2.0 or later, Node.js 22 or later, and an API key for a model provider, for example OpenRouter.
Copy the Vigia agents into your project:
npx opencode-vigia initAdd the plugin and a model to
opencode.jsoncin your project. Copy the provider settings fromexamples/opencode.jsonc. The host pin in that file is important. See Configuration.{ "plugins": ["opencode-vigia"], "model": "openrouter/z-ai/glm-5.3" }Make sure that your project is a git repository with at least one commit. OpenCode loads project plugins only in that case.
Start a scan:
opencode --agent vigiaThen ask, for example, "Scan the project" or "Scan
src/server/". To run without the interactive interface:opencode run --agent vigia --auto "Scan src/"With
--auto, OpenCode does not ask before it runs PoCs. Read Safety first.
What you get
Vigia writes its results to .vigia/ in your project. It does not change your code unless you ask.
.vigia/
├── surface.md the attack surface map
├── findings/ one JSON file for each finding
├── pocs/<ID>/ the proof of concept for each finding
└── report.md the report
The report lists the proven findings first, with the PoC command, the observed output, a score, and a proposed fix with a regression test. The hypotheses that a PoC could not prove are listed apart, with the reason. Add .vigia/ to .gitignore if you do not want to commit the results.
A summary from a scan of a small test project:
Proven (reproduced, with runnable PoCs):
- VIGIA-002 P1: "http:evil.com" passes the regex (no "//"), and the WHATWG parser reads it as http://evil.com/.
- VIGIA-003 P1: " //evil.com" and "\t//evil.com": the regex cannot see leading whitespace, and the browser removes it.
- VIGIA-001 P1: "/\evil.com": the WHATWG parser reads "\" as "/" for special schemes.
Rejected: 6. No hypotheses remain open.
How it works
The vigia agent maps the project. It then starts vigia/hunter subagents that find possible bugs, and one vigia/verifier subagent for each possible bug. A verifier writes a PoC, runs it, and records the result. See How it works.
Safety
- Scan only code that you own or have permission to test.
- The verifier runs PoCs on your machine. The scope guard in Vigia is a guard rail, not a sandbox. Scan code that you do not trust in a container.
- The model provider receives the code that the agents read. Choose a provider whose data policy you accept.
See SECURITY.md to report a vulnerability in Vigia.
Documentation
Contributing
See CONTRIBUTING.md.
License
MIT @ Raí Siqueira
同类生态推荐
Rtk
opencode-rtk-plugin
OpenCode v2 plugin that rewrites shell commands through rtk to cut LLM token usage by 60-90%.
Plain English
opencode-plain-english
Plain-English communication mode plugin for opencode
Comment Judge
@smykla-skalski/opencode-plugin-comment-judge
opencode plugin and Claude Code hook that has a model judge every comment an agent writes, and removes or rewrites the ones that do not earn their place