OpenHands icon indicating copy to clipboard operation
OpenHands copied to clipboard

[Bug]: SecurityAnalyzer is broken and not called on tool calls

Open openhands-agent opened this issue 6 months ago • 1 comments

Describe the bug and reproduction steps The SecurityAnalyzer appears to receive the event with the malicious prompt only after a completion is done. The tool call has already issued a command without proper security checks, showcasing that the SecurityAnalyzer is broken. Additionally, invariant analyzers won't launch due to permission issues.

Potential solutions Robert Brennan mentioned investigating why the tests are not identifying this issue. Meanwhile, Peter Hamilton suggested that introducing a simple analyzer using Gemini Flash might act as a safeguard. However, additional discussion is required for concrete solutions.

Logs, Errors, Screenshots, and Additional Context Attached logs from Slack revealed the issue clearly:

The invariant analyzer won't even launch. Can't fetch the container image (permission denied).

This is further supported by the discussion threads across the team validating the broken SecurityAnalyzer functionality and its outdated testing coverage.

Issue Created By: Joe Pelletier on Slack Link to Slack Thread: https://openhands-ai.slack.com/archives/C06U8UTKSAD/p1748465541550359?thread_ts=1748465541.550359&cid=C06U8UTKSAD

openhands-agent avatar Jun 16 '25 12:06 openhands-agent

We should also verify this works with the self-hosted version of OpenHands.

jpelletier1 avatar Jun 16 '25 12:06 jpelletier1

This issue is stale because it has been open for 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] avatar Jul 17 '25 02:07 github-actions[bot]

Received feedback this may still be broken. Elevating to roadmap for now.

jpelletier1 avatar Jul 28 '25 12:07 jpelletier1

Hi @jpelletier1, I'll look into the issue this week.

ryanhoangt avatar Jul 28 '25 14:07 ryanhoangt

@xingyaoww I think we decided to prioritize #10194 over this issue, correct?

jpelletier1 avatar Aug 22 '25 12:08 jpelletier1

yes!

xingyaoww avatar Aug 22 '25 12:08 xingyaoww

Closing this as duplicate of https://github.com/All-Hands-AI/OpenHands/issues/10194 - we have update the LLM Risk Analyzer in OpenHands with a new approach.

jpelletier1 avatar Sep 08 '25 14:09 jpelletier1