openhuman icon indicating copy to clipboard operation
openhuman copied to clipboard

Security: Full command leaked in error messages returned to frontend (policy.rs)

Open Liohtml opened this issue 6 months ago • 0 comments

Summary

src/openhuman/security/policy.rs — validate_command_execution() truncates the command to 80 chars in log statements but the Err(format!(...)) return value contains the full untruncated command. This can leak sensitive data (passwords in CLI arguments) to the frontend.

Impact

Low — Command arguments containing secrets (e.g., curl -H "Authorization: Bearer secret123") are exposed in error responses.

Suggested Fix

Truncate the command in Err(...) returns as well, not just in log statements.

Liohtml avatar May 16 '26 14:05 Liohtml