Lagune helps your AI agent make a project more secure. You point it at your code, and the agent figures out what your system actually does, then guides you through the security work that matters for it. Lagune is the first project of the Security-Driven Hardening (SDH) methodology.
Love Lagune? Give us a ⭐ on GitHub
Pick your agent
- Lagune runs on Node.js under the hood, but you use whatever language you want.
- To run completely offline, install Lagune in your project with
npm i -D lagune@0.21.0.
Categories
Lagune's security knowledge comes as specializations, grouped into categories.
npx lagune write add --categories owaspA project starts with owasp, and /lagune-charter adds the categories its reading of the project supports.
Requirements
You will need Node.js (LTS) installed on your system.
Use a badge ✨
Using Lagune? Add one to your README:
- Two tones
- Solid
Next
See what each of Lagune's Skills does.
Frequently Asked Questions
Lagune is an open-source, defense-only security workflow that helps your AI agent harden any codebase. You point it at your code, it detects what your system actually does, then it guides the security fixes that matter for that context.
Pick your agent: Claude Code, GitHub Copilot CLI, Muse Code, Antigravity CLI, Cursor, Kimi Code, OpenCode, Codex CLI, Factory Droid, Grok Build, Devin CLI, and Hermes Agent install Lagune as a plugin, Gemini CLI and Qwen Code as an extension, Pi as a package, and any other agent with npx skills add wellwelwel/lagune -y. It works in both new and existing projects.
No. It runs through your own AI agent, so no API keys are required.
You need Node.js (LTS) installed on your system.
Any. Lagune runs on Node.js under the hood, but it audits and hardens projects written in any programming language.
A .lagune/ directory with your project's security state, created by the first command that writes. The skills CLI also installs the slash commands in the project, where your agent reads them, while a plugin keeps them inside the agent.
The same way you installed it. Each agent's install page shows how to update Lagune there, and the skills CLI updates it with npx skills update. Your charter, phase artifacts, and own specializations stay untouched.
The built-in ones of its categories, plus its own. The charter records the categories its reading of the project supports, and npx lagune write add --categories changes them.
No. The /lagune command hardens work as it is written: it takes any prompt, builds what you asked, and hardens it with safe defaults, guided by the charter. The five-phase Blue Team flow audits what already exists.
Yes. The five-phase Blue Team flow audits what already exists: charter sets your security rules, detect maps what the system does and where the risks are, plan scores each finding and pairs it with a fix, harden applies the fixes, and verify proves they hold and closes them.
An agent reading on its own finds what looks like a vulnerability and skips what looks like a control. A list of blocked addresses reads as though someone already handled the risk, so nobody checks that it misses most of them, and the code ships. Lagune inverts that default: a guard already in the code is presumed unproven until it is checked, every specialization in the catalog gets an explicit verdict, and verify asks whether the risk is gone, not whether a control is there. Each finding also stays one tracked item across runs, so it can be proven closed and stood down, where a plain request gives you a different report every time with nothing to compare.
Asking for secure code leaves the definition of secure to the agent, and it assumes you know what to ask for. The requirement is usually already inside your request without either of you seeing it: asking for a page that shows the courses a user has access to states an authorization rule, and a check that is never written leaves nothing in the code to notice. The /lagune command loads your charter and the specializations that match what is about to be built before the first line is written, then re-reads the result against the defense it used. The safe shape rarely costs more than the unsafe one, so what decides the outcome is knowing which one to reach for, and that is what arrives up front.
No. Lagune reads code and never runs your system or sends it crafted requests. Verify confirms a control is present and correct in the source, which is a different question from whether it survives an attack on a live target, so "cannot tell from the code" is a legitimate verdict instead of a quiet pass. DAST answers the runtime question and Lagune answers the source question, so neither replaces the other. Even the optional prove command holds this line: its tests assert the safe behavior, never an attack payload.
No, definitely not! A pentest is an authorized engagement where a professional exercises judgment against your live system, chaining findings and probing the business logic that no per-surface rule describes. Findings from a pentest can enter the Lagune Blue Team flow as concerns you hand to detect, so what a professional reports gets planned, hardened, and verified.
Security Policy
Please check the SECURITY.md.
License
Lagune is under the Apache License 2.0.
Copyright © 2026-present Weslley Araújo and contributors.
