OpenHands / OpenHands/software-agent-sdk
Example proposal: HOL Guard via SecurityAnalyzerBase
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.1k
- Forks
- 539
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 137
Description
Would you be open to a small official standalone-SDK example that plugs HOL Guard directly into the existing SecurityAnalyzerBase / confirmation path?
HOL Guard is a local-first security layer for AI agents (pip install hol-guard): https://github.com/hashgraph-online/hol-guard
The SDK already has the right extension point: SecurityAnalyzerBase.security_risk(ActionEvent), Conversation.set_security_analyzer(...), ConfirmRisky, and the existing WAITING_FOR_CONFIRMATION / reject_pending_actions(...) flow. The current LLM analyzer example in examples/01_standalone_sdk/16_llm_security_analyzer.py looks like a natural model for the placement.
Desired Behavior
Provide one official standalone SDK example that installs and invokes HOL Guard itself through a small SecurityAnalyzerBase adapter, while leaving the SDK's core security interfaces generic.
The example would pass the relevant ActionEvent tool/command context to HOL Guard's runtime policy evaluation path rather than duplicating Guard rules in OpenHands. Safe decisions stay on the normal low-risk path. Guard review/block decisions (and evaluation failures) enter the existing high-risk/confirmation flow. An explicit Guard block must not silently execute; the example should reject the pending action rather than bypass the Guard decision.
The integration should remain optional and local-first, with a short install note and link to HOL Guard. No new public SDK API or HOL Guard-specific core branch is needed.
Acceptance Criteria
- An example under
examples/01_standalone_sdk/installs and invokes thehol-guardpackage through aSecurityAnalyzerBaseadapter. - The example reuses
Conversation.set_security_analyzer(...), the existing confirmation policy, and pending-action rejection flow without adding HOL Guard-specific SDK core behavior. - Safe HOL Guard decisions map to the normal low-risk path; review/block/error paths cannot silently execute the action.
- The example documents the optional
hol-guardinstall step and links to the HOL Guard project. - The repository's example-level validation/tests for the new example pass.
This seems consistent with the contribution guidance to prefer reusable interfaces over client-specific core code: the existing security-analyzer seam stays generic, while the example demonstrates a concrete third-party security backend.
If this landing surface makes sense, I can follow up with the smallest fork-first PR limited to the example/docs/tests.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with examples/01_standalone_sdk/16_llm_security_analyzer.py and trace SecurityAnalyzerBase.security_risk, Conversation.set_security_analyzer(...), ConfirmRisky, and the WAITING_FOR_CONFIRMATION/reject_pending_actions(...) flow. Add the optional HOL Guard adapter and install note in the new example, then run the repository's example-level validation/tests; done means safe decisions remain low-risk and review, block, and error decisions cannot execute silently.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- security
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 72/100