The Blue Team Flow

/lagune-detect: Map Your System and Its Risks

Read your code and map what your system does and where the risks are.

🔬 Find out what your system really does and where the risks are.

Detect reads the code and records only what it actually finds, with the evidence the later phases need. Its governing instruction is detection, not invention.

Run it​

/lagune-detect

What it maps​

Lagune reads the code and maps what it finds. Each finding carries what it is, why it matters, and the evidence. For example:

  • File uploads, the system accepts files from users:
    • Why it matters: a file disguised as an image can hide malicious code.
    • Evidence: the POST /upload handler trusts the MIME type the client sends, without checking the file's real type.
  • Login and sessions, users sign in to reach their account:
    • Why it matters: weak session handling lets one account be taken over by another.
    • Evidence: the session issuance logic, where sessions are issued with no expiry set.

Along the way, detect gives every specialization in your project's catalog a verdict against the code, applies the ones whose context is present, and records them under Applied specializations, the list harden and verify reuse.

From there, you have a clear map of what your system does and where the risks live, ready for the next steps to act on.

tip
  • Running it again updates the map: solved findings drop off, new ones come in.

  • The detect map lives in .lagune/memory/detect.md.

  • In a public repository, keep your open findings out of it by adding these lines to your .gitignore:

    /.lagune/memory/detect.md
    /.lagune/memory/plan.md
    /.lagune/memory/harden.md
    /.lagune/tracking.json
    • Keep .lagune/memory/history.md committed, both for transparency and as a record of past flaws for Lagune to learn from.

Next​

Turn the map into a plan: /lagune-plan.

Frequently Asked Questions

It reads your code and maps what your system does and where the risks are, recording only what it actually finds. Its rule is detection, not invention.

A finding is one detected risk, carrying what it is, why it matters, and the evidence in code. It is the tracked unit that plan, harden, and verify carry forward.

At .lagune/memory/detect.md.

Every one in your project's catalog gets a verdict against the code. Detect applies the ones whose context is present and records them under Applied specializations.