Initial commit: Clean OpenClaw Jarvis Open-Source Template
This commit is contained in:
commit
ac4601b257
28 files changed
+7718
No files matched your search
@@ -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"
|
||||
Reference in new issue
Block a user