feat: add Hush safety skill and proxy support for OpenClaw#37
Conversation
Coverage Report
File Coverage
|
||||||||||||||||||||||||||||||||||||||
Code Review: OpenClaw Safety Skill IntegrationOverviewSolid implementation of the two-layer defense model (local skill + proxy). The architecture is clean and well-documented. A few items to consider: 1. Redaction LogicGood: Patterns in Potential Gap: CLI table output with fixed-width columns could split PII mid-pattern. Example: The email regex won't match across newlines. Consider whether this is in scope for OpenClaw tool outputs. Minor ( const { content: redacted } = redactor.redact(output.stdout);
if (typeof redacted === 'string') output.stdout = redacted;2. Streaming IntegrityGood: Test Gap: The E2E gateway in 3. SecurityShell Bypass Vectors (
Consider expanding detection or documenting the threat model: // Could add:
if (/\$[A-Z_]+/i.test(cmd)) { /* warn about var expansion */ }Vault Memory Safety: Cleartext values live in memory. On crash/coredump, secrets could leak. This is acceptable given the local-only threat model but worth documenting. 4. ReliabilityMissing Error Handling ( try {
const { content: redacted } = redactor.redact(output.stdout);
output.stdout = redacted as string;
} catch {
// Log warning but preserve original output
}Upstream Failure ( Summary
Ship-ready with optional hardening for shell bypass detection. Reviewed SHA: 0c64045 |
This PR introduces a dedicated safety layer for OpenClaw integration.
Changes:
before_tool_call(blocking sensitive files) andafter_tool_call(redacting tool output).scripts/e2e-openclaw.tsto verify the full safety cycle without requiring a local OpenClaw installation.examples/team-config/.openclaw/templates.Verification:
tests/openclaw-plugin.test.tsnpm run test:openclaw