eek 0.54.0 -> 0.55.0 security: i am doing YOLO mo...
# questions
b
eek 0.54.0 -> 0.55.0 security: i am doing YOLO mode running dockerless as
openhands='uvx --python 3.12 --from openhands-ai openhands'
no worries using
Copy code
> /settings
┌──────────────────────────────────────────────────────────────────────────────────────| Settings |───────────────────────────────────────────────────────────────────────────────────────┐
│   LLM Provider:        moonshot                                                                                                                                                         │
│   LLM Model:           moonshot/kimi-k2-turbo-preview                                                                                                                                   │
│   API Key:             ********                                                                                                                                                         │
│   Agent:               CodeActAgent                                                                                                                                                     │
│   Confirmation Mode:   Enabled                                                                                                                                                          │
│   Memory Condensation: Enabled                                                                                                                                                          │
│   Search API Key:      ********                                                                                                                                                         │
│   Configuration File:  ~/.openhands/settings.json                                                                                                                                       │
└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
when it was 0.54.0 things were great. it seems to have just bumped to 0.55.0 and i hit a ton of
Copy code
┌───────────────────────────────────────────────────────────────────────────────────────| Command |───────────────────────────────────────────────────────────────────────────────────────┐
│$ curl -s http://localhost:8181/api/v4/issues | head -20                                                                                                                                 │
└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘

┌───────────────────────────────────────────────────────────────────────────────────| Command Output |────────────────────────────────────────────────────────────────────────────────────┐
│{"message":"401 Unauthorized"}                                                                                                                                                           │
└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘

Agent running... (Press Ctrl-P to pause)

┌────────────────────────────────────────────────────────────────────────────────────────| Error |────────────────────────────────────────────────────────────────────────────────────────┐
│Missing required parameters for function 'str_replace_editor': {'security_risk'}                                                                                                         │
└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
I tried some searching for how to relax things didn’t get much as i guess things are new. I have flipped back to 0.54.0 for now but is there some docs for how to set up CLI run off of uvx to be more like the claude code disable security
--dangerously-skip-permissions
(aka YOLO mode)?
b
CC @chilly-france-44439 this might be due to the recent changes you made around security here?
w
Yeah it looks like the tool docs being sent to the LLM weren't updated here...
Xingyao, do we a_lways_ ask for a security_risk param, or only when analyzer is enabled?
c
We do actually ask for this -- @best-jelly-33963 could you share the session data for this session that blow-up 👀 should be under
~/openhands/sessions
b
i have DMed @chilly-france-44439 the session logs and terminal - i have not looked at it to see if it is leaking my API key so if you can handle it with care 🫣
c
Upon investigation, it seems the
security_risk
is indeed added as a required argument to the parameters, maybe it is due to kimi-k2 not following this required parameter
Copy code
"parameters": {
                        "type": "object",
                        "properties": {
                            "command": {
                                "description": "The commands to run. Allowed options are: `view`, `create`, `str_replace`, `insert`, `undo_edit`.",
                                "enum": [
                                    "view",
                                    "create",
                                    "str_replace",
                                    "insert",
                                    "undo_edit"
                                ],
                                "type": "string"
                            },
                            "path": {
                                "description": "Absolute path to file or directory, e.g. `/workspace/file.py` or `/workspace`.",
                                "type": "string"
                            },
                            "file_text": {
                                "description": "Required parameter of `create` command, with the content of the file to be created.",
                                "type": "string"
                            },
                            "old_str": {
                                "description": "Required parameter of `str_replace` command containing the string in `path` to replace.",
                                "type": "string"
                            },
                            "new_str": {
                                "description": "Optional parameter of `str_replace` command containing the new string (if not given, no string will be added). Required parameter of `insert` command containing the string to insert.",
                                "type": "string"
                            },
                            "insert_line": {
                                "description": "Required parameter of `insert` command. The `new_str` will be inserted AFTER the line `insert_line` of `path`.",
                                "type": "integer"
                            },
                            "view_range": {
                                "description": "Optional parameter of `view` command when `path` points to a file. If none is given, the full file is shown. If provided, the file will be shown in the indicated line number range, e.g. [11, 12] will show lines 11 and 12. Indexing at 1 to start. Setting `[start_line, -1]` shows all lines from `start_line` to the end of the file.",
                                "items": {
                                    "type": "integer"
                                },
                                "type": "array"
                            },
                            "security_risk": {
                                "type": "string",
                                "description": "The LLM's assessment of the safety risk of this action. See the SECURITY_RISK_ASSESSMENT section in the system prompt for risk level definitions.",
                                "enum": [
                                    "LOW",
                                    "MEDIUM",
                                    "HIGH"
                                ]
                            }
                        },
                        "required": [
                            "command",
                            "path",
                            "security_risk"
                        ]
                    }
though we could silently fail for this error "Missing required parameters for function 'str_replace_editor': {'security_risk'}" @nutritious-balloon-65098 check All-Hands-AI/OpenHands repo and create an issue that describe that we shouldn't fail hard for missing "security_risk" argument from LLM
b
silently failing for security matters sounds risky 🙂 As things are v0.X then breaking changes are allowed my general preference would be to turn on “security by default” while adding “opt out” config file settings that can disable the feature. i know thats is not the sort of effort folks will want to put in today for this logic that has shipped 🙂 so I am bringing it up as a suggestion of how to approach things like this in the future.
🙌 1
c
We are in the process of rewriting OpenHands to OpenHands V1 😄 will certainly consider this as we rewrite our entire system architecture https://github.com/All-Hands-AI/OpenHands/issues/10577 https://github.com/All-Hands-AI/OpenHands/issues/10649
cc @quick-window-91705 who will work on CLI for visibiliy
r
still same issue Error: Missing required parameters for function 'str_replace_editor': {'security_risk'} appear on OpenHands V1 cli
anyone had seen that kind of issues in the new version
q
Hi! Yes this is a known issue will be working to patch this sometime this week