Skip to content

feat(demo): Docker demo with 6 attack scenarios - #67

Open
Pranjal0410 wants to merge 2 commits into
c2siorg:mainfrom
Pranjal0410:feat/docker-demo
Open

feat(demo): Docker demo with 6 attack scenarios#67
Pranjal0410 wants to merge 2 commits into
c2siorg:mainfrom
Pranjal0410:feat/docker-demo

Conversation

@Pranjal0410

Copy link
Copy Markdown
Contributor

Clone-and-run demo. One command, six scenarios across all four hooks.

Quick start

cd demo
docker compose up --build

What it shows

# Scenario Hook Decision
1 Direct prompt injection on_prompt BLOCK
2 Clean user prompt on_prompt ALLOW
3 Paraphrased injection on_prompt BLOCK
4 Poisoned RAG chunk on_context SANITISE
5 Tool not on allowlist on_tool_call BLOCK
6 Memory poisoning on_memory SANITISE

Scenario 3 has zero lexical overlap with any pattern in the library. The sentence-transformer backend catches it by meaning alone.

How it works

Single container, two processes. Go sidecar starts first, Python agent waits for the socket, runs six scenarios through the SDK. Model pre-downloaded in the image so first run is instant.

Colored output with per-scenario timing and summary table.

Timing

Total across 6 scenarios: ~87ms. Individual calls: 6-28ms.

Sentence-transformer: 20/47 attacks caught, 0 false positives. TF-IDF: 12/47, 1 false positive. 67% more attacks, zero noise.
Single container runs Go sidecar + Python agent. Six scenarios across all four hooks including a paraphrased injection caught only by the semantic scanner. Sentence-transformer model pre-downloaded so first run is instant. docker compose up and see ALLOW/SANITISE/BLOCK in under 2 minutes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant