Back to skill

Security audit

Aliyun Sls Openclaw Integration

Security checks for vulnerabilities and agentic risk

Overview

This skill appears to set up a real Alibaba Cloud logging integration, but it can install system software and upload OpenClaw session transcripts from every local user's home directory.

Review carefully before installing. Use only on a host where all affected users have approved OpenClaw session transcript collection, preferably a dedicated single-user or test machine. Pin and verify the LoongCollector installer, restrict the collector path to the intended user, avoid long-lived AK/SK in shared shells, and set least-privilege SLS permissions, short retention, and a documented uninstall/cleanup procedure.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (2)

T03 · Remote Payload Retrieval and Execution

Error
Location
SKILL.md:127
Finding

Mutable Remote Installer Is Downloaded and Executed Without Integrity Verification

Content
View full analysis
Remediation
View remediation
" printf '%s %s\n' "$EXPECTED_SHA256" loongcollector.sh | sha256sum --check - ``` 3. Prefer vendor-signed packages and verify the package signature against a pinned vendor public key. 4. Download into a securely created temporary directory using `mktemp -d`, and remove the artifact after installation. 5. Use strict download options such as `--https-only`, appropriate timeouts, and failure-on-error behavior. 6. Abort installation on any checksum, signature, ownership, or permission mismatch. 7. Review the pinned installer before approving a version update rather than automatically following the newest upstream payload. 8. Run installation with the minimum privileges possible and isolate any explicitly required privileged operations. ]]>

T05 · Unauthorized Access and Privilege Escalation

Error
Location
references/collector-config.json:1
Finding

Collector Configuration Exports Session Transcripts from Every Matching User Home Directory

Content
View full analysis
Remediation
View remediation
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
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (24)

Chaining Abuse

High
Category
Tool Misuse
Confidence
75% confidence
Finding

Tool calls are chained to bypass individual safety checks or escalate capabilities beyond what any single tool call would allow.

Content

Scanner excerpt · SKILL.md (reported line 160)May include surrounding context.

md
USER_DEFINED_ID="${EXISTING_USER_DEFINED_ID}"
else
  USER_DEFINED_ID="${USER_DEFINED_ID_PREFIX}${RAND8}"
  echo "${USER_DEFINED_ID}" | sudo tee -a /etc/ilogtail/user_defined_id >/dev/null
fi
if ! sudo grep -Fxq "${USER_DEFINED_ID}" /etc/ilogtail/user_defined_id 2>/dev/null; then
  echo "Failed to persist USER_DEFINED_ID to /etc/ilogtail/user_defined_id" >&2

Chaining Abuse

High
Category
Tool Misuse
Confidence
75% confidence
Finding

Tool calls are chained to bypass individual safety checks or escalate capabilities beyond what any single tool call would allow.

Content

Scanner excerpt · references/cli-commands.md (reported line 21)May include surrounding context.

bash
if ! command -v aliyun >/dev/null 2>&1; then
  if command -v apt-get >/dev/null 2>&1; then
    sudo apt-get update && sudo apt-get install -y aliyun-cli
  elif command -v dnf >/dev/null 2>&1; then
    sudo dnf install -y aliyun-cli
  elif command -v yum >/dev/null 2>&1; then

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill performs privileged package installation, service management, and writes under /etc, but its user-facing description does not explicitly warn that it will modify the host system. That omission increases the chance of uninformed execution of impactful changes on a production Linux host.

Content

No source excerpt is available for this finding.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
94% confidence
Finding

This command elevates privileges to update package metadata on the local host. In context, the action is operationally relevant, but it is still security-sensitive because it changes system state and should not be performed without explicit informed consent.

Content

Scanner excerpt · SKILL.md (reported line 93)May include surrounding context.

md
# 1) Install aliyun CLI if missing (Linux)
if ! command -v aliyun >/dev/null 2>&1; then
  if command -v apt-get >/dev/null 2>&1; then
    sudo apt-get update
    sudo apt-get install -y aliyun-cli
  elif command -v dnf >/dev/null 2>&1; then
    sudo dnf install -y aliyun-cli

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
95% confidence
Finding

Installing aliyun-cli with sudo modifies the system package set and may pull additional packages from configured repositories. This is potentially dangerous if run on sensitive hosts or without clear user approval.

Content

Scanner excerpt · SKILL.md (reported line 94)May include surrounding context.

md
if ! command -v aliyun >/dev/null 2>&1; then
  if command -v apt-get >/dev/null 2>&1; then
    sudo apt-get update
    sudo apt-get install -y aliyun-cli
  elif command -v dnf >/dev/null 2>&1; then
    sudo dnf install -y aliyun-cli
  elif command -v yum >/dev/null 2>&1; then

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
95% confidence
Finding

This uses root privileges to install software via dnf, altering host state. While expected for setup automation, it still represents privileged execution that could affect system integrity or availability if run in the wrong environment.

Content

Scanner excerpt · SKILL.md (reported line 96)May include surrounding context.

md
sudo apt-get update
    sudo apt-get install -y aliyun-cli
  elif command -v dnf >/dev/null 2>&1; then
    sudo dnf install -y aliyun-cli
  elif command -v yum >/dev/null 2>&1; then
    sudo yum install -y aliyun-cli
  elif command -v zypper >/dev/null 2>&1; then

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
95% confidence
Finding

Using sudo yum install performs privileged package installation on the host. The risk is contextual rather than overtly malicious, but the action remains sensitive because it changes trusted system software.

Content

Scanner excerpt · SKILL.md (reported line 98)May include surrounding context.

md
elif command -v dnf >/dev/null 2>&1; then
    sudo dnf install -y aliyun-cli
  elif command -v yum >/dev/null 2>&1; then
    sudo yum install -y aliyun-cli
  elif command -v zypper >/dev/null 2>&1; then
    sudo zypper -n install aliyun-cli
  else

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
95% confidence
Finding

This line installs aliyun-cli with root privileges via zypper, modifying the base system. In an automation skill, that is operationally legitimate but still a privileged action with meaningful host impact.

Content

Scanner excerpt · SKILL.md (reported line 100)May include surrounding context.

md
elif command -v yum >/dev/null 2>&1; then
    sudo yum install -y aliyun-cli
  elif command -v zypper >/dev/null 2>&1; then
    sudo zypper -n install aliyun-cli
  else
    echo "aliyun CLI not found. Install aliyun-cli manually for your Linux distribution." >&2
    exit 1

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
92% confidence
Finding

Querying service status via sudo requires elevated privileges and implicitly normalizes root execution within the skill. Although lower risk than installation, it still broadens the scope of privileged operations on the host.

Content

Scanner excerpt · SKILL.md (reported line 112)May include surrounding context.

md
export ALIBABA_CLOUD_ACCESS_KEY_SECRET

is_loong_running() {
  if sudo /etc/init.d/loongcollectord status 2>/dev/null | grep -qi "running"; then
    return 0
  fi
  if sudo /etc/init.d/ilogtaild status 2>/dev/null | grep -qi "running"; then

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
92% confidence
Finding

This checks ilogtaild status with sudo, again extending privileged execution into monitoring logic. The risk is mainly from unnecessary privilege expansion and habituating users to approve broad sudo usage.

Content

Scanner excerpt · SKILL.md (reported line 115)May include surrounding context.

md
if sudo /etc/init.d/loongcollectord status 2>/dev/null | grep -qi "running"; then
    return 0
  fi
  if sudo /etc/init.d/ilogtaild status 2>/dev/null | grep -qi "running"; then
    return 0
  fi
  return 1

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
96% confidence
Finding

Starting loongcollectord with sudo changes runtime state on the host and activates a newly installed collector process. This has higher impact than status checks because it launches software that can collect and transmit telemetry.

Content

Scanner excerpt · SKILL.md (reported line 139)May include surrounding context.

md
# Post-install verification: one of loongcollectord/ilogtaild must be running.
if ! is_loong_running; then
  sudo /etc/init.d/loongcollectord start >/dev/null 2>&1 || true
  sudo /etc/init.d/ilogtaild start >/dev/null 2>&1 || true
fi
if ! is_loong_running; then

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
96% confidence
Finding

Starting ilogtaild with root privileges activates a telemetry agent on the host. In this skill's context, that is intended behavior, but it can affect confidentiality and availability if enabled unintentionally.

Content

Scanner excerpt · SKILL.md (reported line 140)May include surrounding context.

md
# Post-install verification: one of loongcollectord/ilogtaild must be running.
if ! is_loong_running; then
  sudo /etc/init.d/loongcollectord start >/dev/null 2>&1 || true
  sudo /etc/init.d/ilogtaild start >/dev/null 2>&1 || true
fi
if ! is_loong_running; then
  echo "LoongCollector installation check failed: neither loongcollectord nor ilogtaild is running." >&2

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
95% confidence
Finding

Creating /etc/ilogtail with sudo modifies protected system configuration paths. This is a real host change and should be treated as sensitive, especially on production machines.

Content

Scanner excerpt · SKILL.md (reported line 148)May include surrounding context.

md
fi

# 3) Local user-defined identifier + create machine group
sudo mkdir -p /etc/ilogtail
sudo mkdir -p /etc/ilogtail/users
if [ ! -f /etc/ilogtail/user_defined_id ]; then
  sudo touch /etc/ilogtail/user_defined_id

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
95% confidence
Finding

Creating /etc/ilogtail/users with root privileges alters system-managed configuration directories. The action is relevant to the integration but still constitutes privileged modification of the host.

Content

Scanner excerpt · SKILL.md (reported line 149)May include surrounding context.

md
# 3) Local user-defined identifier + create machine group
sudo mkdir -p /etc/ilogtail
sudo mkdir -p /etc/ilogtail/users
if [ ! -f /etc/ilogtail/user_defined_id ]; then
  sudo touch /etc/ilogtail/user_defined_id
fi

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
95% confidence
Finding

Touching /etc/ilogtail/user_defined_id with sudo creates a persistent system file used for collector identity. This can have operational side effects and should not be silently performed.

Content

Scanner excerpt · SKILL.md (reported line 151)May include surrounding context.

md
sudo mkdir -p /etc/ilogtail
sudo mkdir -p /etc/ilogtail/users
if [ ! -f /etc/ilogtail/user_defined_id ]; then
  sudo touch /etc/ilogtail/user_defined_id
fi
RAND8="$(LC_ALL=C tr -dc 'a-z0-9' </dev/urandom | head -c 8)"
USER_DEFINED_ID_PREFIX="${PROJECT}_openclaw_sls_collector_"

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
91% confidence
Finding

Reading a protected config file with sudo is less risky than writing, but it still extends privileged access into the skill's logic. Broad use of elevated reads can expose sensitive system information patterns and normalizes unnecessary root usage.

Content

Scanner excerpt · SKILL.md (reported line 155)May include surrounding context.

md
fi
RAND8="$(LC_ALL=C tr -dc 'a-z0-9' </dev/urandom | head -c 8)"
USER_DEFINED_ID_PREFIX="${PROJECT}_openclaw_sls_collector_"
EXISTING_USER_DEFINED_ID="$(sudo awk -v p="${USER_DEFINED_ID_PREFIX}" 'index($0,p)==1 {print; exit}' /etc/ilogtail/user_defined_id 2>/dev/null || true)"
if [ -n "${EXISTING_USER_DEFINED_ID}" ]; then
  USER_DEFINED_ID="${EXISTING_USER_DEFINED_ID}"
else

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
97% confidence
Finding

This writes data into a root-owned file via a shell pipeline to sudo tee, causing persistent system configuration changes. In addition to the write itself, pipeline-based elevation is more error-prone and can complicate review of exactly what privileged data path is being used.

Content

Scanner excerpt · SKILL.md (reported line 160)May include surrounding context.

md
USER_DEFINED_ID="${EXISTING_USER_DEFINED_ID}"
else
  USER_DEFINED_ID="${USER_DEFINED_ID_PREFIX}${RAND8}"
  echo "${USER_DEFINED_ID}" | sudo tee -a /etc/ilogtail/user_defined_id >/dev/null
fi
if ! sudo grep -Fxq "${USER_DEFINED_ID}" /etc/ilogtail/user_defined_id 2>/dev/null; then
  echo "Failed to persist USER_DEFINED_ID to /etc/ilogtail/user_defined_id" >&2

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
92% confidence
Finding

This line performs a privileged read/verification of the config file. The risk is moderate-to-low by itself, but it contributes to a pattern of broad sudo use throughout the skill.

Content

Scanner excerpt · SKILL.md (reported line 162)May include surrounding context.

md
USER_DEFINED_ID="${USER_DEFINED_ID_PREFIX}${RAND8}"
  echo "${USER_DEFINED_ID}" | sudo tee -a /etc/ilogtail/user_defined_id >/dev/null
fi
if ! sudo grep -Fxq "${USER_DEFINED_ID}" /etc/ilogtail/user_defined_id 2>/dev/null; then
  echo "Failed to persist USER_DEFINED_ID to /etc/ilogtail/user_defined_id" >&2
  exit 1
fi

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
95% confidence
Finding

Creating a marker file under /etc/ilogtail/users with sudo persists host-specific identity state. In the context of onboarding a telemetry collector, this is expected but still a sensitive privileged write with operational implications.

Content

Scanner excerpt · SKILL.md (reported line 167)May include surrounding context.

md
exit 1
fi
if [ ! -f "/etc/ilogtail/users/${ALIYUN_UID}" ]; then
  sudo touch "/etc/ilogtail/users/${ALIYUN_UID}"
fi
if [ ! -f "/etc/ilogtail/users/${ALIYUN_UID}" ]; then
  echo "Failed to create UID marker file: /etc/ilogtail/users/${ALIYUN_UID}" >&2

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The document instructs users to place long-lived Alibaba Cloud access key credentials directly into shell environment variables without any warning about secret handling, shell history exposure, process/environment leakage, or safer alternatives. In an operational troubleshooting skill, this increases the chance that users will paste production credentials into insecure contexts or leave them resident in shared shells and logs.

Content

No source excerpt is available for this finding.

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 · references/cli-commands.md (reported line 21)May include surrounding context.

bash
if ! command -v aliyun >/dev/null 2>&1; then
  if command -v apt-get >/dev/null 2>&1; then
    sudo apt-get update && sudo apt-get install -y aliyun-cli
  elif command -v dnf >/dev/null 2>&1; then
    sudo dnf install -y aliyun-cli
  elif command -v yum >/dev/null 2>&1; then

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 · references/cli-commands.md (reported line 23)May include surrounding context.

md
if command -v apt-get >/dev/null 2>&1; then
    sudo apt-get update && sudo apt-get install -y aliyun-cli
  elif command -v dnf >/dev/null 2>&1; then
    sudo dnf install -y aliyun-cli
  elif command -v yum >/dev/null 2>&1; then
    sudo yum install -y aliyun-cli
  elif command -v zypper >/dev/null 2>&1; then

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 · references/cli-commands.md (reported line 25)May include surrounding context.

md
if command -v apt-get >/dev/null 2>&1; then
    sudo apt-get update && sudo apt-get install -y aliyun-cli
  elif command -v dnf >/dev/null 2>&1; then
    sudo dnf install -y aliyun-cli
  elif command -v yum >/dev/null 2>&1; then
    sudo yum install -y aliyun-cli
  elif command -v zypper >/dev/null 2>&1; then

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 · references/cli-commands.md (reported line 27)May include surrounding context.

md
if command -v apt-get >/dev/null 2>&1; then
    sudo apt-get update && sudo apt-get install -y aliyun-cli
  elif command -v dnf >/dev/null 2>&1; then
    sudo dnf install -y aliyun-cli
  elif command -v yum >/dev/null 2>&1; then
    sudo yum install -y aliyun-cli
  elif command -v zypper >/dev/null 2>&1; then