Every hop on one machine.
Lab · AI · Security
Security Agent.
A retrieval-augmented pipeline over the OWASP Web Security Testing Guide, running end to end on one machine — no cloud, no API key, no data leaving the box. The diagram above follows a single question through it.
An index built once
Before any question is asked, the OWASP WSTG corpus is split into 2000-character chunks with 300 characters of overlap, so a passage cut mid-sentence still survives whole in its neighbour. Each chunk is embedded with all-MiniLM-L6-v2 and the vectors land in a local ChromaDB index. This happens once; after that the corpus is never read again at question time.
A question takes the same path
A typed question is embedded by the same model, matched against the index, and the three nearest chunks come back. They are assembled into a prompt alongside the question and answered by llama3.1:8b running under Ollama. The answer cites the retrieved material instead of improvising from the model’s training — which is the point of retrieval: the model explains, the corpus grounds.
Where the pipeline sits
Retrieval is one half of the agent. The other is a set of 14 deterministic OWASP patterns that flag vulnerabilities in Python code instantly; the RAG path supplies the context and the suggested fix for what they find. The pipeline itself started life as a retrieval assistant over pharmaceutical PDFs — swapping the corpus for security material re-pointed the whole system without changing its shape.