mirror of
https://github.com/OpenHands/OpenHands.git
synced 2026-03-22 05:37:20 +08:00
fix(security): extend action type coverage in security check (#12870)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: Engel Nyst <engel.nyst@gmail.com>
This commit is contained in:
@@ -64,11 +64,14 @@ from openhands.events.action import (
|
|||||||
AgentFinishAction,
|
AgentFinishAction,
|
||||||
AgentRejectAction,
|
AgentRejectAction,
|
||||||
BrowseInteractiveAction,
|
BrowseInteractiveAction,
|
||||||
|
BrowseURLAction,
|
||||||
ChangeAgentStateAction,
|
ChangeAgentStateAction,
|
||||||
CmdRunAction,
|
CmdRunAction,
|
||||||
FileEditAction,
|
FileEditAction,
|
||||||
FileReadAction,
|
FileReadAction,
|
||||||
|
FileWriteAction,
|
||||||
IPythonRunCellAction,
|
IPythonRunCellAction,
|
||||||
|
MCPAction,
|
||||||
MessageAction,
|
MessageAction,
|
||||||
NullAction,
|
NullAction,
|
||||||
SystemMessageAction,
|
SystemMessageAction,
|
||||||
@@ -977,8 +980,11 @@ class AgentController:
|
|||||||
type(action) is CmdRunAction
|
type(action) is CmdRunAction
|
||||||
or type(action) is IPythonRunCellAction
|
or type(action) is IPythonRunCellAction
|
||||||
or type(action) is BrowseInteractiveAction
|
or type(action) is BrowseInteractiveAction
|
||||||
|
or type(action) is BrowseURLAction
|
||||||
or type(action) is FileEditAction
|
or type(action) is FileEditAction
|
||||||
or type(action) is FileReadAction
|
or type(action) is FileReadAction
|
||||||
|
or type(action) is FileWriteAction
|
||||||
|
or type(action) is MCPAction
|
||||||
):
|
):
|
||||||
# Handle security risk analysis using the dedicated method
|
# Handle security risk analysis using the dedicated method
|
||||||
await self._handle_security_analyzer(action)
|
await self._handle_security_analyzer(action)
|
||||||
|
|||||||
Reference in New Issue
Block a user