Docs: link to a third-party SecurityAnalyzerBase implementation (ACGS rules) in the security guide?
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 1/5
- 预计耗时
- 1 小时以内
- 新手友好度
- 52/100
- Issue 类型
- 文档
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- python
调研方向
Start with sdk/guides/security.mdx and read the “Custom Security Analyzer Implementation” section. Check the guide’s conventions for linking community packages and whether third-party examples belong here or in OpenHands/extensions; the issue asks maintainers to decide before a PR is opened. Done means the link’s placement and wording are agreed on.
由索引模型根据 Issue 内容生成。
描述
The SDK security guide (sdk/guides/security.mdx) shows how to write a custom analyzer by subclassing
SecurityAnalyzerBase ("Custom Security Analyzer Implementation"). I maintain a small community package that
does this, openhands-acgs (Apache-2.0, https://github.com/acgs-ai/openhands-acgs).
It rates each action with declarative ACGS rules:
ACGSSecurityAnalyzer.security_risk(action)returnsHIGHwhen a blocking rule matches, when a rule asks for
human review, or when the action cannot be evaluated, andLOWotherwise.analyze_actionadds the verdict,
the rule IDs and the reason asSecurityAnalysis.details, never argument values.- It is a pydantic model like the built-in analyzers, so it is saved and restored with persisted conversations.
Because an analyzer only rates risk, the package documents that it is a risk signal plus confirmation, not a
hard block. With the default NeverConfirm() policy, a HIGH action still runs. The recommended setup is
therefore:
from openhands.sdk.security.confirmation_policy import ConfirmRisky
from openhands_acgs import ACGSSecurityAnalyzer, resolve_confirmation
analyzer = ACGSSecurityAnalyzer()
conversation.set_security_analyzer(analyzer)
conversation.set_confirmation_policy(ConfirmRisky()) # pause on HIGH
# when execution_status == WAITING_FOR_CONFIRMATION:
resolve_confirmation(conversation, analyzer, approve) # rejects ACGS denials, asks `approve` otherwise
conversation.run()
resolve_confirmation calls reject_pending_actions when any pending action is denied. It is tested offline with
a real LocalConversation and TestLLM against openhands-sdk 1.54.0 and 1.59.0, on Python 3.12 to 3.14.
Question: would a one- or two-sentence link to it be welcome, for example at the end of "Custom Security
Analyzer Implementation"? Something like:
For a community example, see openhands-acgs, which rates actions
with ACGS rules and rejects denied actions while the conversation waits for confirmation.
If links to third-party packages do not belong in this guide, or should live in OpenHands/extensions instead,
that is fine. I would not open a PR before you say where, if anywhere, it fits. The package is not affiliated with
or endorsed by OpenHands.
- 主要语言
- MDX
- 星标
- 19
- 派生
- 104
- 平均合并
- 2 天 12 小时
- 30 天内合并 PR
- 80
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 没有贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
OpenHands/docs 的其他 Issue
-
docs: document FORGEJO_BASE_URL (self-hosted Forgejo host for the backend integration)可能已有人在做 @remote-controlled-man 于 18 天前认领。 未关闭
难度 1/5 1 小时以内 新手友好度 85/100
维护者通常 1 天内回复
-
docs(sdk): custom-tools 'register_tool' example passes a factory function, which raises TypeError未关闭
难度 2/5 1-3 小时 新手友好度 62/100
维护者通常 1 天内回复
-
难度 1/5 1-3 小时 新手友好度 83/100
维护者通常 1 天内回复
-
Docs: Child Conversations incorrectly implies the child's result is returned to the parent可能已有人在做 @sahithib20 于 36 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
enhancement
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
相似的 Issue
-
[Docs] CONTRIBUTING points the Backend Remake milestone at a branch that does not exist可能已有人在做 @franpts2 今天认领。 未关闭docs
难度 1/5 1 小时以内 新手友好度 90/100
维护者通常 3 天内回复
-
postgresql-rules / queue-rules: implicit KEY SHARE before a parent key update, and job self-overlap未关闭
难度 2/5 1-3 小时 新手友好度 82/100
jonathanong/no-mistakes#3879 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 84/100
cloudflare/nimbus#423 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 70/100
NYCPlanning/data-engineering#2996 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 2 天内回复