T05 · Unauthorized Access and Privilege Escalation
- Location
scripts/security-monitor.sh:280- Finding
Undeclared access to SSH keys, shell history, and sensitive OpenClaw files
- Content
View full analysis
/dev/null; then # Check if it's a placeholder or masked value local count=$(grep -c "$pattern" "$env_file") for ((i=0; i/dev/null) ``` ```bash # Check for SSH keys with weak permissions while IFS= read -r -d '' ssh_file; do local perms=$(stat -c "%a" "$ssh_file" 2>/dev/null || echo "000") if [ "$perms" != "600" ] && [ "$perms" != "400" ]; then found_insecure=true alert MEDIUM "insecure_ssh_perms" "Insecure permissions on $ssh_file: $perms (should be 600 or 400)" fi done < <(find "$HOME/.ssh" -name "id_*" -o -name "*.pem" 2>/dev/null || true) ``` ```bash local history_file="$HOME/.bash_history" if [ -f "$history_file" ]; then # Check last 50 commands local recent=$(tail -n 50 "$history_file") ``` ```bash done < <(find "$HOME/.openclaw" -name "*.log" -mtime -7 -type f 2>/dev/null || true) ``` The permission manifest declares only the following filesystem access: ```json "fil ...[truncated 2289 chars]- Remediation
View remediation
