agentscope-ai / agentscope-ai/agentscope

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

未關閉
#1,976 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
stale-issue
主要語言
Python
星號
31.6k
分支
3.5k
平均合併
1 天 16 小時
30 天內合併 PR
103

描述

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.

貢獻指南

開啟貢獻指南

研究方向

Start in the Middleware System docs, especially the sections mentioning `on_model_call` and `on_acting`, since those are the only integration points named. Then inspect prior middleware examples (BudgetControlMiddleware, mem0 long-term memory middleware in v2.0.3) to infer the expected middleware shape and registration style. No file or test names are provided in the issue; success is a maintainer-approved decision on whether this belongs here, plus either a PoC middleware path plus docs example or clear guidance to keep it external.

由索引模型根據 Issue 內容生成。

評估

技術堆疊
python
領域
backend-api-design, documentation, security
Issue 類型
功能
難度
4/5
預估耗時
3-5 天
活躍度
活躍
描述清晰度
需要釐清
新手友好度
33/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。