Back to skill

Security audit

Vps Openclaw Security Hardening

Security checks for vulnerabilities and agentic risk

Overview

This VPS hardening skill is purpose-aligned, but its root-level installer and monitoring scripts have serious safety defects that could leave a server partially changed, locked out, or exposed to privileged code execution.

Install only after manual review and fixes. Do not run this root installer on a reachable or important VPS as-is; test in a disposable VM first, require valid packaged audit rules and config examples, remove unsafe source/eval usage, protect any alerting config as root-owned, avoid sending raw audit logs to third-party chats, and verify SSH/firewall rollback before changing ports.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
Findings (8)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/install.sh:96
Finding

Malformed redirections prevent security configuration and scheduled monitoring from being installed

Content
View full analysis
/etc/ssh/sshd_config # Security hardening (added by vps-security-hardening) Port $SSH_PORT PermitRootLogin no PasswordAuthentication no MaxAuthTries 3 ClientAliveInterval 300 ClientAliveCountMax 2 X11Forwarding no EOF ``` ```bash # scripts/install.sh:186-197 cat > /etc/cron.d/agent-security <> 'EOF' # VPS Security Hardening - Automated Tasks # Daily briefing at 08:00 0 8 * * * root $SKILL_DIR/scripts/daily-briefing.sh # Log size check every 6 hours 0 */6 * * * root $SKILL_DIR/scripts/audit-log-monitor.sh # Weekly security report (Sundays) 0 9 * * 0 root $SKILL_DIR/scripts/weekly-report.sh EOF ``` ```bash # scripts/daily-briefing.sh:65-95 cat <> EOF 📊 *DAILY SECURITY BRIEFING* *Date:* ${date} *Status:* ${risk_level} ━━━━━━━━━━━━━━━━━━━━━━━ 🛡️ *SECURITY SUMMARY* ━━━━━━━━━━━━━━━━━━━━━━━ 🔐 Credential Access: ${cred_access} 📝 SSH Config Changes: ${ssh_changes} 🔑 SSH Keys Accessed: $(ausearch -ts today -k agent_ssh_keys 2>/dev/null | grep -c 'type=PATH' || echo 0) 🚪 Successful Logins: ${successful_logins} 🚫 Failed Logins: ${failed_logins} 🧱 Firewall Changes: $(ausearch -ts today -k agent_firewall 2>/dev/null | grep -c 'type=PATH' || echo 0) ━━━━━━━━━━━━━━━━━━━━━━━ ⚡ *ACTIVITY SUMMARY* ━━━━━━━━━━━━━━━━━━━━━━━ 🤖 Agent Directory Changes: ${file_changes} ⚠️ Privilege Escalation Attempts: ${priv_esc} 📁 Security Repo Changes: $(ausearch -ts today -k agent_security_repo 2>/dev/null | grep -c 'type=PATH' || echo 0) ━━━━━━━━━━━━━━━━━━━━━━━ 📈 *RISK ASSESSMENT* ━━━━━━━━━━━━━━━━━━━━━━━ Score: ${risk_score}/100 Level: ${risk_level} ``` ### Technical Analysis The correct heredoc syntax is `cat <>file <` operator instea ...[truncated 2037 chars]
Remediation
View remediation
> /etc/ssh/sshd_config < /etc/cron.d/agent-security <

T09 · Insecure Skill Coding Practices

Error
Location
scripts/install.sh:137
Finding

Installer depends on a missing audit-rules file and can abort after privileged host changes

Content
View full analysis
/dev/null || \ warn "Some audit rules already exist, continuing..." } ``` The supplied project directory contains no `rules/` directory or `rules/audit.rules` file. ### Technical Analysis The installer unconditionally copies a file that is absent from the distributed project. With `set -e`, the failed `cp` terminates installation. In the intended execution order, this function runs after package installation, service changes, SSH reconfiguration, and UFW reset and enablement. The installation is not transactional. There is no error trap that restores SSH, UFW, service, and package state if a later phase fails. The initial backup operation only captures selected files and does not automatically restore them. ### Attack Path 1. An administrator runs the installer as root. 2. Earlier stages install packages, enable fail2ban, modify SSH, reset UFW, and enable the firewall. 3. `configure_auditd` attempts to copy the nonexistent `rules/audit.rules`. 4. The copy fails and `set -e` aborts the process. 5. Audit rules, unattended upgrades, cron monitoring, verification, and the final warning or summary are not completed. 6. The host remains in a partially changed state, potentially including a new SSH port and restrictive firewall rules, without t ...[truncated 613 chars]
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Error
Location
scripts/audit-log-monitor.sh:5
Finding

Root-executed monitoring scripts source configuration as executable shell code

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/install.sh:7
Finding

Predictable root-written temporary files permit symbolic-link file clobbering

Content
View full analysis
/tmp/vps-security-backup-dir log "Backups saved to: $BACKUP_DIR" ``` ```bash # scripts/weekly-report.sh:5-8,38 REPORT_FILE="/tmp/weekly-security-report.txt" ALERT_CONFIG="$(dirname "$0")/../config/alerting.env" echo "Weekly Security Report - $(date '+%Y-%m-%d')" > "$REPORT_FILE" ... rm -f "$REPORT_FILE" ``` ### Technical Analysis The scripts run or are intended to run as root but use fixed filenames in the world-writable `/tmp` directory. They do not use `mktemp`, reject symbolic links, or open files with exclusive creation. A local attacker can create one of these paths as a symbolic link before root runs the script. Shell redirection or `tee` then follows the link. The weekly report uses truncating output, while the installer log appends attacker-influenced status text. The final `rm -f` also operates on an attacker-selected directory entry. ### Attack Path 1. A local unprivileged attacker predicts the fixed pathname. 2. Before root invokes the installer or cron report, the attacker creates that pathname as a symbolic link to a root-owned target. 3. The privileged script follows the link when opening the path. 4. The weekly report can truncate and replace content in the target with report data; the installer can append log or backup-path content. 5. Depending on the selected target and resulting content, the attacker can cause denial of service, corrupt security con ...[truncated 507 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/verify.sh:14
Finding

Verifier evaluates environment-derived text as shell code

Content
View full analysis
/dev/null 2>&1; then echo -e "${GREEN}✓${NC} $name" ((PASS++)) return 0 else echo -e "${RED}✗${NC} $name" ((FAIL++)) return 1 fi } ``` ```bash SSH_PORT=${SSH_PORT:-$(grep "^Port " /etc/ssh/sshd_config | tail -1 | awk '{print $2}')} SSH_PORT=${SSH_PORT:-22} check "SSH running on port $SSH_PORT" "ss -tulnp | grep -q ':$SSH_PORT.*sshd'" ``` ### Technical Analysis The `check` function accepts a string and executes it through `eval`. `SSH_PORT` may come directly from the process environment and is interpolated into that command string before `eval` reparses it as shell syntax. Normal variable expansion does not interpret embedded shell operators as syntax, but `eval` performs a second parsing pass. Consequently, shell syntax supplied through `SSH_PORT` can become executable commands. ### Attack Path 1. An attacker influences the `SSH_PORT` environment value used when an administrator or automation invokes `verify.sh`. 2. The crafted value is embedded in the string passed to `check`. 3. `eval` reparses the complete string and executes attacker-controlled shell syntax. 4. If verification is run through privileged automation or with `sudo` while preserving the environment, the injected command executes with those elevated privileges. If the attacker only runs the verifier under their own account, no privilege boundary is crossed; exploitation requires influence over a more privileged invocation. ### Impact Assessment The impact is arbitrary command execution with the verifier's privileges. Under a privileged invocation, this can become complete root compromise. Under an unprivileged invocation, the flaw still permit ...[truncated 63 chars]
Remediation
View remediation
/dev/null 2>&1; then printf 'PASS: %s\n' "$name" else printf 'FAIL: %s\n' "$name" fi } ``` For pipeline checks, use dedicated functions rather than command strings. Validate `SSH_PORT` before use: ```bash [[ "$SSH_PORT" =~ ^[0-9]+$ ]] || exit 1 (( SSH_PORT >= 1024 && SSH_PORT <= 65535 )) || exit 1 ``` Privileged automation should use a fixed, minimal environment and should not preserve caller-controlled variables. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/install.sh:87
Finding

SSH port input is not validated before privileged SSH and firewall configuration

Content
View full analysis
/etc/ssh/sshd_config # Security hardening (added by vps-security-hardening) Port $SSH_PORT PermitRootLogin no PasswordAuthentication no MaxAuthTries 3 ClientAliveInterval 300 ClientAliveCountMax 2 X11Forwarding no EOF # Test config if /usr/sbin/sshd -t; then systemctl restart sshd ``` ```bash configure_ufw() { log "Configuring UFW firewall..." ufw --force reset ufw default deny incoming ufw default allow outgoing ufw allow ${SSH_PORT:-6262}/tcp comment 'SSH hardened' ufw --force enable } ``` ### Technical Analysis Documentation requires the administrator to select a port from 1024 through 65535, but the installer performs no numeric, range, availability, or conflict validation. The value is intended to be written into a root-owned SSH configuration and is also expanded unquoted into a privileged UFW command. Once the malformed heredoc is corrected, embedded newlines could introduce additional SSH configuration directives. Invalid or conflicting values can make `sshd -t` fail or cause the firewall rule to diverge from the actual listening port. The installer also resets UFW before confirming end-to-end remote access. ### Attack Path 1. A wrapper, deployment environment, or operator supplies an invalid or manipulated `SSH_PORT`. 2. The installer uses the value in SSH configuration and the firewall command without validating its grammar or range. 3. SSH may fail validation, bind an unintended port, or accept additional configurati ...[truncated 614 chars]
Remediation
View remediation
= 1024 && SSH_PORT <= 65535 )) || error "SSH_PORT must be between 1024 and 65535" if ss -H -ltn "sport = :$SSH_PORT" | grep -q .; then error "Port $SSH_PORT is already in use" fi ``` Quote the UFW rule as one argument: ```bash ufw allow "${SSH_PORT}/tcp" comment 'SSH hardened' ``` Generate a temporary SSH drop-in file under `/etc/ssh/sshd_config.d/`, validate the complete effective configuration with `sshd -t`, establish the new firewall allowance before removing any old rule, and require the administrator to confirm a successful second SSH connection before closing the old port. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/weekly-report.sh:10
Finding

Optional Telegram reporting transmits raw audit and authentication records without minimization

Content
View full analysis
> "$REPORT_FILE" echo "-------------------------" >> "$REPORT_FILE" ausearch -ts this-week -k agent_ -i 2>/dev/null | tail -50 >> "$REPORT_FILE" echo "" >> "$REPORT_FILE" echo "Failed SSH Attempts:" >> "$REPORT_FILE" echo "-------------------" >> "$REPORT_FILE" grep "Failed password" /var/log/auth.log 2>/dev/null | tail -20 >> "$REPORT_FILE" || echo "No failed attempts logged" >> "$REPORT_FILE" echo "" >> "$REPORT_FILE" echo "UFW Status:" >> "$REPORT_FILE" echo "----------" >> "$REPORT_FILE" sudo ufw status numbered 2>/dev/null >> "$REPORT_FILE" || echo "UFW not active" >> "$REPORT_FILE" # Send report if configured if [ -f "$ALERT_CONFIG" ]; then source "$ALERT_CONFIG" if [ -n "$TELEGRAM_BOT_TOKEN" ] && [ -n "$TELEGRAM_CHAT_ID" ]; then curl -s -X POST "https://api.telegram.org/bot${TELEGRAM_BOT_TOKEN}/sendMessage" \ -d chat_id="${TELEGRAM_CHAT_ID}" \ -d text="$(cat $REPORT_FILE | head -100)" \ -d parse_mode="HTML" 2>/dev/null fi fi ``` Raw audit-event details are also embedded into critical alerts: ```bash if echo "$event_data" | grep -q "type=PATH.*name=.*\.env"; then send_alert "$(format_alert "CRITICAL" "Credential Access" "$(echo "$event_data" | head -5)")" elif echo "$event_data" | grep -q "type=PATH.*sshd_config"; then send_alert "$(format_alert "CRITICAL" "SSH Config Modified" "$(echo "$event_data" | head -5)")" ``` ### Technical Analysis When Telegram is configured, the weekly task sends decoded audit records, failed-login lines, and firewall status to Telegram. Such records can cont ...[truncated 1612 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/rollback-ssh.sh:31
Finding

SSH rollback restores an indeterminate wildcard backup and can leave invalid configuration in place

Content
View full analysis
> /etc/ssh/sshd_config fi echo "Testing configuration..." if /usr/sbin/sshd -t; then echo -e "${GREEN}✓ Config valid${NC}" else echo -e "${RED}✗ Config test failed!${NC}" echo "Restoring from backup..." cp /etc/ssh/sshd_config.bak.* /etc/ssh/sshd_config 2>/dev/null || true exit 1 fi echo "Restarting SSH..." systemctl restart sshd ``` ### Technical Analysis The script creates a timestamped `.rollback.*` backup but does not save its exact name or use it for restoration. On validation failure, it instead copies `/etc/ssh/sshd_config.bak.*`. If more than one wildcard match exists, `cp` treats the destination as a directory and fails because `/etc/ssh/sshd_config` is a file. The failure is hidden by `2>/dev/null || true`. If exactly one unrelated or stale backup matches, it may restore the wrong configuration. The script then exits while the invalid edited configuration may remain installed. ### Attack Path 1. An administrator invokes rollback during an SSH connectivity incident. 2. The script modifies the live configuration and creates a known-good `.rollback.` copy. 3. The resulting configuration fails `sshd -t`. 4. The recovery branch ignores the newly created backup and expands a different wildcard. 5. Multiple matches cause restoration to fail silently, or a stale match restores unintended settings. 6. The administrator is left with an invalid or unexpected SSH configuration during an emer ...[truncated 398 chars]
Remediation
View remediation
&2 exit 1 } exit 1 fi ``` Use atomic replacement through a temporary file rather than editing the live configuration in place. Validate the candidate configuration before installation, verify that port 22 is allowed by UFW before restarting SSH, and preserve the existing session until a new connection has been confirmed. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (46)

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
85% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · README.md (reported line 281)May include surrounding context.

sudo systemctl disable auditd

Remove cron jobs

sudo rm /etc/cron.d/agent-security

text

## Customization

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

Undeclared reporting to external services such as Telegram introduces data exfiltration risk, especially in a security-monitoring context where alerts may contain hostnames, IPs, usernames, file paths, or security events. The lack of explicit disclosure and permissions makes this more dangerous because users may not realize operational data leaves the VPS.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

Undeclared reporting to external services such as Telegram introduces data exfiltration risk, especially in a security-monitoring context where alerts may contain hostnames, IPs, usernames, file paths, or security events. The lack of explicit disclosure and permissions makes this more dangerous because users may not realize operational data leaves the VPS.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

Undeclared reporting to external services such as Telegram introduces data exfiltration risk, especially in a security-monitoring context where alerts may contain hostnames, IPs, usernames, file paths, or security events. The lack of explicit disclosure and permissions makes this more dangerous because users may not realize operational data leaves the VPS.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding

Undeclared reporting to external services such as Telegram introduces data exfiltration risk, especially in a security-monitoring context where alerts may contain hostnames, IPs, usernames, file paths, or security events. The lack of explicit disclosure and permissions makes this more dangerous because users may not realize operational data leaves the VPS.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding

Undeclared reporting to external services such as Telegram introduces data exfiltration risk, especially in a security-monitoring context where alerts may contain hostnames, IPs, usernames, file paths, or security events. The lack of explicit disclosure and permissions makes this more dangerous because users may not realize operational data leaves the VPS.

Content

No source excerpt is available for this finding.

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

ufw --force reset destructively wipes all existing firewall rules before applying the new policy, which can remove custom protections or break remote access assumptions on production VPS hosts. In this skill context, the danger is elevated because the script runs as root on internet-facing systems and immediately modifies SSH and firewall configuration, so a mismatch in ports, service names, or admin access can lock out operators or transiently expose services.

Content

Scanner excerpt · scripts/install.sh (reported line 124)May include surrounding context.

sh
log "Configuring UFW firewall..."
    
    # Reset to safe defaults
    ufw --force reset
    ufw default deny incoming
    ufw default allow outgoing

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/critical-alert.sh (reported line 192)May include surrounding context.

sh
echo "=== CREDENTIAL SECURITY ==="
# Check credential file permissions (customize paths as needed)
CRED_PATHS=(
    "/root/.openclaw/.env"
    "/root/.env"
)
CRED_SECURE=0

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/verify.sh (reported line 78)May include surrounding context.

sh
echo "=== CREDENTIAL SECURITY ==="
# Check credential file permissions (customize paths as needed)
CRED_PATHS=(
    "/root/.openclaw/.env"
    "/root/.env"
)
CRED_SECURE=0

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/verify.sh (reported line 79)May include surrounding context.

sh
echo "=== CREDENTIAL SECURITY ==="
# Check credential file permissions (customize paths as needed)
CRED_PATHS=(
    "/root/.openclaw/.env"
    "/root/.env"
)
CRED_SECURE=0

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · README.md (reported line 52)May include surrounding context.

bash
# Example: Choose port 4848
export SSH_PORT=4848
sudo ./scripts/install.sh

Why this matters:

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · README.md (reported line 89)May include surrounding context.

bash
# Example: Choose port 4848
export SSH_PORT=4848
sudo ./scripts/install.sh

Why this matters:

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · README.md (reported line 281)May include surrounding context.

bash
# Example: Choose port 4848
export SSH_PORT=4848
sudo ./scripts/install.sh

Why this matters:

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · README.md (reported line 291)May include surrounding context.

bash
# Example: Choose port 4848
export SSH_PORT=4848
sudo ./scripts/install.sh

Why this matters:

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · README.md (reported line 304)May include surrounding context.

bash
# Example: Choose port 4848
export SSH_PORT=4848
sudo ./scripts/install.sh

Why this matters:

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
96% confidence
Finding

The skill advertises shell-based installation and verification commands, including privileged execution, but does not declare any tool scope such as permissions or allowed-tools. This undermines least-privilege review because consumers cannot easily see that the skill expects command execution and system modification capabilities.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/critical-alert.sh (reported line 46)May include surrounding context.

sh
return 1
    fi
    
    curl -s -X POST "https://api.telegram.org/bot${TELEGRAM_BOT_TOKEN}/sendMessage" \
        -d "chat_id=${TELEGRAM_CHAT_ID}" \
        -d "parse_mode=Markdown" \
        -d "text=${message}" \

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/critical-alert.sh (reported line 46)May include surrounding context.

sh
return 1
    fi
    
    curl -s -X POST "https://api.telegram.org/bot${TELEGRAM_BOT_TOKEN}/sendMessage" \
        -d "chat_id=${TELEGRAM_CHAT_ID}" \
        -d "parse_mode=Markdown" \
        -d "text=${message}" \

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/critical-alert.sh (reported line 65)May include surrounding context.

sh
return 1
    fi
    
    curl -s -X POST "$DISCORD_WEBHOOK_URL" \
        -H "Content-Type: application/json" \
        -d "{\"content\": \"$message\"}" \
        --max-time 10 \

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/critical-alert.sh (reported line 83)May include surrounding context.

sh
return 1
    fi
    
    curl -s -X POST "$SLACK_WEBHOOK_URL" \
        -H "Content-Type: application/json" \
        -d "{\"text\": \"$message\"}" \
        --max-time 10 \

External Transmission

Medium
Category
Data Exfiltration
Confidence
81% confidence
Finding

This generic webhook sender can forward alert contents to any configured URL using a configurable HTTP method, which materially increases the chance of sensitive audit data being sent to an untrusted endpoint. Because the message may include raw audit log excerpts, a misconfigured or malicious webhook target could become a data exfiltration path.

Content

Scanner excerpt · scripts/critical-alert.sh (reported line 103)May include surrounding context.

sh
local method="${WEBHOOK_METHOD:-POST}"
    
    curl -s -X "$method" "$WEBHOOK_URL" \
        -H "Content-Type: application/json" \
        -d "{\"alert\": \"$message\", \"timestamp\": \"$(date -Iseconds)\"}" \
        --max-time 10 \

External Transmission

Medium
Category
Data Exfiltration
Confidence
88% confidence
Finding

The explicit use of the Telegram API endpoint confirms that security-related content is being sent to an external service outside the controlled host boundary. The danger is contextual rather than inherently malicious: a security-hardening script should be especially careful not to exfiltrate logs or incident summaries because they may aid attackers or violate organizational handling requirements if the chat destination is misconfigured or compromised.

Content

Scanner excerpt · scripts/daily-briefing.sh (reported line 129)May include surrounding context.

sh
return 0
    fi
    
    curl -s -X POST "https://api.telegram.org/bot${TELEGRAM_BOT_TOKEN}/sendMessage" \
        -d "chat_id=${TELEGRAM_CHAT_ID}" \
        -d "parse_mode=Markdown" \
        -d "text=${report}" \

External Transmission

Medium
Category
Data Exfiltration
Confidence
88% confidence
Finding

The explicit use of the Telegram API endpoint confirms that security-related content is being sent to an external service outside the controlled host boundary. The danger is contextual rather than inherently malicious: a security-hardening script should be especially careful not to exfiltrate logs or incident summaries because they may aid attackers or violate organizational handling requirements if the chat destination is misconfigured or compromised.

Content

Scanner excerpt · scripts/daily-briefing.sh (reported line 129)May include surrounding context.

sh
return 0
    fi
    
    curl -s -X POST "https://api.telegram.org/bot${TELEGRAM_BOT_TOKEN}/sendMessage" \
        -d "chat_id=${TELEGRAM_CHAT_ID}" \
        -d "parse_mode=Markdown" \
        -d "text=${report}" \

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The script transmits a detailed security briefing to Telegram, a third-party external service, including authentication activity, credential-access events, and privilege-escalation indicators. Even though HTTPS is used and Telegram delivery is optional, this still creates a real confidentiality risk because sensitive operational security telemetry leaves the host without any in-script disclosure minimization, redaction, or explicit operator acknowledgement.

Content

No source excerpt is available for this finding.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · scripts/install.sh (reported line 31)May include surrounding context.

sh
check_root() {
    if [[ $EUID -ne 0 ]]; then
        error "This script must be run as root"
    fi
}

Static analysis

No suspicious patterns detected.