Hoshina
0066602294
fix: golangci-lint run --fix
2026-02-21 16:20:15 +08:00
Hoshina
3df7f70540
fix: golangci-lint fmt
2026-02-21 16:05:39 +08:00
Goksu Ceylan
244eb0b47d
fix (security): ExecTool working_dir sandbox escape ( #478 )
...
* fix (security) Shell working_dir bypass
* Feedback from @mengzhuo & Discord
- reuse internal security package to validate path
- add tests for workspace escape
2026-02-21 08:15:46 +08:00
Artem Yadelskyi
9e120f90ea
feat(fmt): Run formatters
2026-02-18 21:48:23 +02:00
yinwm
ab20314882
Merge upstream/main into ralph/tool-result-refactor
...
Resolved conflicts:
- pkg/heartbeat/service.go: merged both 'started' field and 'onHeartbeatWithTools'
- pkg/tools/edit.go: use validatePath() with ToolResult return
- pkg/tools/filesystem.go: fixed return values to use ToolResult
- cmd/picoclaw/main.go: kept active setupCronTool, fixed toolsPkg import
- pkg/tools/cron.go: fixed Execute return value handling
Fixed tests for new function signatures (NewEditFileTool, NewAppendFileTool, NewExecTool)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-02-13 01:00:26 +08:00
yinwm
e7e3f95ebe
feat: US-012 - Add ShellTool tests
...
Added comprehensive test coverage for ShellTool (ExecTool) with 9 test cases:
- TestShellTool_Success: Verifies successful command execution
- TestShellTool_Failure: Verifies failed command execution with IsError flag
- TestShellTool_Timeout: Verifies command timeout handling
- TestShellTool_WorkingDir: Verifies custom working directory support
- TestShellTool_DangerousCommand: Verifies safety guard blocks dangerous commands
- TestShellTool_MissingCommand: Verifies error handling for missing command
- TestShellTool_StderrCapture: Verifies stderr is captured and included
- TestShellTool_OutputTruncation: Verifies long output is truncated
- TestShellTool_RestrictToWorkspace: Verifies workspace restriction
ShellTool implementation already conforms to ToolResult specification:
- Success returns ForUser = command output
- Failure returns IsError = true
- ForLLM contains full output and exit code
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-02-12 19:52:16 +08:00