agentscope-ai / agentscope-ai/agentscope

Would a community security middleware backed by an open rule set be useful?

Open
#1,976 1 comment 0 reactions 0 assignees View on GitHub
stale-issue
Dominant language
Python
Stars
31.5k
Forks
3.5k
Avg merge
1d 23h
Merged PRs (30d)
95

Description

We maintain Agent Threat Rules (ATR, github.com/Agent-Threat-Rule/agent-threat-rules), an open-source, MIT-licensed rule set for detecting prompt injection and other agent-facing attack patterns — 655 rules across 10 threat categories as of this writing, similar in spirit to Sigma rules for SIEM but aimed at agent/LLM content instead of log lines.

Reading the Middleware System docs, `on_model_call` and `on_acting` look like a natural place to run this kind of content check — you already get `messages: list[Msg]` before it hits the model, and the maintainers have merged community-contributed middleware before (BudgetControlMiddleware, the mem0 long-term memory middleware in v2.0.3), so this isn't a new pattern for the project.

The docs currently don't have a reference security/content-filtering middleware example. Before we spend time building one, we wanted to ask:

- Is this something the project would want, or is content-safety intentionally left to users/downstream tools?
- Is there an existing pattern (even unmerged/WIP) for this kind of check we should follow instead of inventing our own shape?
- If useful, would it belong in this repo, or is a separate community-middleware package the expected home?

Happy to put together a small PoC middleware against the rule set if there's interest — wanted to check first rather than show up with a large PR.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.