Initial commit: Clean OpenClaw Jarvis Open-Source Template

This commit is contained in:
jarvis-bot committed 2026-11-06 21:59:47 +00:00
commit ac4601b257
28 files changed
+7718

No files matched your search

+23
View File
@@ -0,0 +1,23 @@
#!/bin/bash
# /root/.ssh/jarvis-guard.sh.example
# SSH Forced Command Guardrail for OpenClaw Jarvis System
CMD="$SSH_ORIGINAL_COMMAND"
LOGFILE="/var/log/jarvis-ssh.log"
echo "[$(date -Iseconds)] USER=$USER SSH_CMD=$CMD" >> "$LOGFILE"
# Block destructive filesystem commands
if [[ "$CMD" =~ (mkfs|wipefs|blkdiscard|dd\ of=/dev/|shutdown|reboot|poweroff|halt) ]]; then
echo "REJECTED: Destruktiver Befehl blockiert." >&2
exit 1
fi
# Block unauthorized path modifications
if [[ "$CMD" =~ (/root/.ssh|authorized_keys|sudoers|shadow) ]]; then
echo "REJECTED: Zugriff auf geschuetzte Systempfade verweigert." >&2
exit 1
fi
# Execute allowed command
exec /bin/bash -c "$CMD"