Urgent.News

What's breaking now, across thousands of outlets.

AI

Teaching AI Security: Hands-On LLM Hardening with Docker Desktop and Security Gateways

In August 2026 I delivered a webinar for the NCyTE Center on a question I kept hearing from community college faculty: how do you teach AI security when you don't have a budget, your IT department locks down what you can install, and API costs for a live LLM are unpredictable? The answer I built — and the one this post walks through — is a zero-cost, fully local lab that any instructor can drop…

In August 2026, a webinar was delivered for the NCyTE Center by the author, addressing the question of teaching AI security when budget, IT department restrictions, and unpredictable API costs make it challenging. The answer presented in the webinar is a zero-cost, fully local lab that any instructor can implement in their course the following week.

The lab focuses on Piper, an intentionally vulnerable AI chatbot built for a fictional bank, NorthPeak Credit Union. By using Piper, students can safely attack and defend the system without exposing any real data. The lab architecture consists of a three-service Docker Compose stack running locally on students' machines.

The Docker Compose stack includes Ollama (hosting Piper, the LLM), a Flask security gateway (secure_gateway.py) that inspects and filters prompts, and Open Policy Agent (OPA), a policy-as-code evaluation layer. The traffic flow is from student input to the gateway inspection, then to Ollama, and finally to the response.

The architecture showcases two OWASP Top 10 vulnerabilities by design: Sensitive Information Disclosure and Hidden Context Exposure. By running the lab with different gateway conditions, students can observe how the same prompt behaves with varying levels of defense. For example, an Authority Claim attack, where the user claims to be an IT administrator, demonstrates the importance of a gateway in blocking such attacks.

The lab is divided into two lessons: Lesson 1 (Red Team) focuses on attacking the system, while Lesson 2 (Blue Team) involves fixing the vulnerabilities found. The default filter rules are intentionally incomplete, ensuring that students encounter genuine gaps in the defenses during Lesson 2.

The lab is designed to run smoothly on modest hardware, with the llama3.2 model working fine on an 8GB RAM student laptop. IT departments can easily set up the lab by following the provided setup guide, which includes instructions for enabling required hardware features on different operating systems.

The webinar concludes with a preview of Phase 3, where students will learn how to implement policy-as-code using Open Policy Agent (OPA) to evaluate prompts against a rule set, providing an explainable security reason for blocking or allowing prompts. This advanced topic builds upon the foundational knowledge gained from the initial lessons.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in AI

Countering Developer Burnout with Agentic Test Execution

The QA Fatigue Epidemic: Recent surveys reveal developers feel reduced to "human meat proxies," burning out from manually debugging "almost right" AI code.

  • Developer burnout stems from reduced agency in AI coding workflow.
  • Junior engineers suffer most from overreliance on AI snippets.
  • Agentic test execution tools automate verification to combat burnout.

More from Thursday 8 October →