Skip to main content
Redhat Developers  Logo
  • AI

    Get started with AI

    • Red Hat AI
      Accelerate the development and deployment of enterprise AI solutions.
    • AI learning hub
      Explore learning materials and tools, organized by task.
    • AI interactive demos
      Click through scenarios with Red Hat AI, including training LLMs and more.
    • AI/ML learning paths
      Expand your OpenShift AI knowledge using these learning resources.
    • AI quickstarts
      Focused AI use cases designed for fast deployment on Red Hat AI platforms.
    • No-cost AI training
      Foundational Red Hat AI training.

    Featured resources

    • OpenShift AI learning
    • Open source AI for developers
    • AI product application development
    • Open source-powered AI/ML for hybrid cloud
    • AI and Node.js cheat sheet

    Red Hat AI Factory with NVIDIA

    • Red Hat AI Factory with NVIDIA is a co-engineered, enterprise-grade AI solution for building, deploying, and managing AI at scale across hybrid cloud environments.
    • Explore the solution
  • Learn

    Self-guided

    • Documentation
      Find answers, get step-by-step guidance, and learn how to use Red Hat products.
    • Learning paths
      Explore curated walkthroughs for common development tasks.
    • Guided learning
      Receive custom learning paths powered by our AI assistant.
    • See all learning

    Hands-on

    • Developer Sandbox
      Spin up Red Hat's products and technologies without setup or configuration.
    • Interactive labs
      Learn by doing in these hands-on, browser-based experiences.
    • Interactive demos
      Click through product features in these guided tours.

    Browse by topic

    • AI/ML
    • Automation
    • Java
    • Kubernetes
    • Linux
    • See all topics

    Training & certifications

    • Courses and exams
    • Certifications
    • Skills assessments
    • Red Hat Academy
    • Learning subscription
    • Explore training
  • Build

    Get started

    • Red Hat build of Podman Desktop
      A downloadable, local development hub to experiment with our products and builds.
    • Developer Sandbox
      Spin up Red Hat's products and technologies without setup or configuration.

    Download products

    • Access product downloads to start building and testing right away.
    • Red Hat Enterprise Linux
    • Red Hat AI
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform
    • See all products

    Featured

    • Red Hat build of OpenJDK
    • Red Hat JBoss Enterprise Application Platform
    • Red Hat OpenShift Dev Spaces
    • Red Hat Developer Toolset

    References

    • E-books
    • Documentation
    • Cheat sheets
    • Architecture center
  • Community

    Get involved

    • Events
    • Live AI events
    • Red Hat Summit
    • Red Hat Accelerators
    • Community discussions

    Follow along

    • Articles & blogs
    • Developer newsletter
    • Videos
    • Github

    Get help

    • Customer service
    • Customer support
    • Regional contacts
    • Find a partner

    Join the Red Hat Developer program

    • Download Red Hat products and project builds, access support documentation, learning content, and more.
    • Explore the benefits

AI threat modeling shouldn't be a bottleneck, so we open sourced ours

Open Source AI-Assisted Threat Modeling with the agentic-threat-modeling Lola module

September 21, 2026
Katie Mulliken Jon Weiser Judy Kelly
Related topics:
Developer productivity
Related products:
Red Hat Advanced Developer Suite

    More code is shipping faster than ever. AI is writing a growing share of it, and AI-powered scanners are finding more issues in it than any human team can review by hand. That problem existed before AI. Security teams have never scaled linearly with engineering headcount and AI code generation has dramatically accelerated that imbalance. The security team's review calendar is a queue that keeps growing, so we built a way for engineers to threat model their own code without waiting in that queue.

    Agentic-threat-modeling is an open source AI-assisted threat-modeling module for Claude Code, Cursor, and Gemini CLI, and we've open sourced it for all to use.

    Architecturally, this runs on Lola, an open source package manager for AI contexts. If you're not familiar, our team wrote a full introduction about it in the article Manage AI context with the Lola package manager. The short version: Write a skill once as a Lola module, and it installs and runs identically across Claude Code, Cursor, Gemini CLI, and whatever your team standardizes on next, no re-writing prompts per tool.

    Introducing the agentic-threat-modeling Lola module

    Point agentic-threat-modeling at a feature or service, and it profiles who's likely to attack it, and then writes out narrative attack scenarios grounded in your actual code, checked against 6 different and structured threat modeling frameworks (STRIDE, PASTA, LINDDUN, attack trees, and more).

    This isn't the same as pasting a file into a chat window and asking "is this secure?"

    Instead, this is grounded in your real code paths, and it runs multiple structured frameworks instead of one generic pass. Rather than producing a paragraph of general advice, it ties every finding to a specific file and line of code. Here's a trimmed real-world example, run against a file upload endpoint:

    $ /threat-model-quick
    
    Actor Profile: Opportunistic external attacker, no authentication
    required to reach this endpoint.
    
    Scenario (STRIDE: Tampering / Elevation of Privilege):
    The upload handler accepts a user-supplied filename and writes
    it directly to disk without sanitizing path separators. An
    attacker uploads a file named "../../etc/cron.d/malicious" to
    write outside the intended upload directory, achieving code
    execution on the next cron tick.
    
    Affected: src/handlers/upload.py:47
    Suggested mitigation: Reject or normalize path separators in
    filenames before use; write to a randomly generated filename and
    store the original name as metadata instead.

    That's a full attacker profile and a specific, exploitable finding tied to an exact line of code, in under a minute, with no security team involvement. Run /threat-model instead of /threat-model-quick for a guided, interactive session that walks through your design decisions rather than autopiloting the scan.

    Where this goes next

    A Software Bill of Materials (SBOM) instantly tells you which components are affected when a new CVE is released. It can't tell you whether that vulnerable code path is actually reachable by an attacker, or already covered by a compensating control. That's the exact context a threat model captures, which is why we built ours to produce structured output rather than just a document a human reads once and files away.

    It's a natural fit for AI-assisted triage down the line: Don't just answer "does this CVE exist?" but "Does it sit on a path we already flagged as attacker-reachable?" We haven't built that triage pipeline yet, but what we have built is the missing input for it.

    Try it

    Run the following command to install:

    uv tool install lola-ai
    lola market add prodsec https://raw.githubusercontent.com/RedHatProductSecurity/lola-market/main/general-market.yml
    
    lola install agentic-threat-modeling -a cursor  # or claude-code, gemini-cli

    Then run /threat-model for a guided session, or /threat-model-quick for a fast autopilot scan, as shown above.

    Conclusion

    None of this replaces human judgment. A threat model, AI-generated or not, is a starting point for a conversation and gives engineers an initial diagnostic to review, not an unquestionable verdict. However, it's a conversation every engineer can now start themselves, on their own code, in minutes, instead of waiting in a queue that only gets longer as AI writes more code and finds more vulnerabilities.

    We built this to solve these issues for ourselves first. We've made it open source because the problem isn't unique to us, and we hope to help other engineering teams unblock their pipelines too.

    Ready to unblock your workflow? Run the install commands above. Everything is open in RedHatProductSecurity/agentic-threat-modeling and LobsterTrap/lola. Try running a scan and let us know what you discover. Issues, feedback, and contributions are always welcome.

    Related Posts

    • Agent Skills: Explore security threats and controls

    • Staying ahead of artificial intelligence threats

    • Red Hat Developer Hub: Preventing compliance violations with AI coding agents

    • OpenCode: A model-neutral AI coding assistant for OpenShift Dev Spaces

    Recent Posts

    • Comparison of Cluster Autoscaler and KEDA MachineSet Autoscaling on Red Hat OpenShift

    • Scaling localnet user-defined networks (CUDNs) in Red Hat OpenShift to 3,500 networks

    • AI threat modeling shouldn't be a bottleneck, so we open sourced ours

    • Red Hat OpenShift networking: Default OVN-Kubernetes vs. Cilium operator

    • Matching OpenShift edge topologies to your physical footprint

    Red Hat Developers logo LinkedIn YouTube Twitter Facebook

    Platforms

    • Red Hat AI
    • Red Hat Enterprise Linux
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform
    • See all products

    Build

    • Developer Sandbox
    • Developer tools
    • Interactive tutorials
    • API catalog

    Quicklinks

    • Learning resources
    • E-books
    • Cheat sheets
    • Blog
    • Events
    • Newsletter

    Communicate

    • About us
    • Contact sales
    • Find a partner
    • Report a website issue
    • Site status dashboard
    • Report a security problem

    RED HAT DEVELOPER

    Build here. Go anywhere.

    We serve the builders. The problem solvers who create careers with code.

    Join us if you’re a developer, software engineer, web designer, front-end designer, UX designer, computer scientist, architect, tester, product manager, project manager or team lead.

    Sign me up

    Red Hat legal and privacy links

    • About Red Hat
    • Jobs
    • Events
    • Locations
    • Contact Red Hat
    • Red Hat Blog
    • Inclusion at Red Hat
    • Cool Stuff Store
    • Red Hat Summit
    © 2026 Red Hat

    Red Hat legal and privacy links

    • Privacy statement
    • Terms of use
    • All policies and guidelines
    • Digital accessibility
    Ask AI