Back to skill

Security audit

Linux 磁盘健康与备份韧性监控

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly about disk health monitoring, but it also tells users to force-format a specific partition and persist it in system mounts without adequate safeguards.

Review carefully before installing. The SMART monitoring portions are coherent, but do not follow the formatting or /etc/fstab guidance unless you have independently verified the exact device by stable identifiers, confirmed backups, checked for hidden or damaged filesystems, and accepted that formatting will destroy existing data on the target partition.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:25
Finding

Unsafe Force-Formatting Guidance Based on an Unreliable Data-Absence Assumption

Content
View full analysis
: /backup df -hT /backup | tail -1 ``` ### Technical Analysis The guidance incorrectly treats the absence of a `TYPE` value in `blkid` output as proof that a partition contains no data. `blkid` primarily detects recognized filesystem, RAID, swap, and other signatures. A missing result does not establish that the underlying blocks are empty or disposable. Potential explanations for a missing filesystem type include: - A damaged or partially overwritten filesystem signature. - A filesystem or storage format n ...[truncated 2520 chars]
Remediation
View remediation
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (31)

Missing User Warnings

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The document instructs users to run a forced filesystem creation on /dev/sda11 and append a persistent mount entry to /etc/fstab without an explicit, prominent warning about irreversible data loss, boot/mount failure risk, or independent verification steps. In a disk-management skill, these are highly sensitive operations because a wrong device choice or stale partition assumptions can destroy data or leave the system misconfigured across reboots.

Content

No source excerpt is available for this finding.

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/disk-health-resilience-case-20260904.md (reported line 31)May include surrounding context.

待用户终端执行(agent 被 mkfs hardline block)

bash
sudo mkfs.xfs -f -L backup /dev/sda11
sudo mkdir -p /backup && sudo mount /dev/sda11 /backup
echo "UUID=$(sudo blkid -s UUID -o value /dev/sda11) /backup xfs defaults,noatime 0 2" | sudo tee -a /etc/fstab
sudo chown <user>:<user> /backup
df -hT /backup | tail -1

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/disk-health-resilience-case-20260904.md (reported line 32)May include surrounding context.

bash
sudo mkfs.xfs -f -L backup /dev/sda11
sudo mkdir -p /backup && sudo mount /dev/sda11 /backup
echo "UUID=$(sudo blkid -s UUID -o value /dev/sda11) /backup xfs defaults,noatime 0 2" | sudo tee -a /etc/fstab
sudo chown <user>:<user> /backup
df -hT /backup | tail -1

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The manifest description is primarily written in Chinese with embedded English terms, which imposes a language expectation on users. Under the language/locale policy, this is a violation unless the skill offers an explicit language choice or documents a justified locale restriction.

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 · SKILL.md (reported line 31)May include surrounding context.

实测采集命令

bash
# HDD:关注重映射/待映射/离线/命令超时/通电时长/温度
sudo smartctl -a /dev/sda | grep -E 'SMART overall|Reallocated|Current_Pending|Offline_Uncorrect|UDMA_CRC|Power_On_Hours|Temperature_Celsius|Command_Timeout'
# 自检记录(距上次自检太久=自检荒废,如175天)
sudo smartctl -l selftest /dev/sda | tail -5
# NVMe:磨损/备用/温度/错误

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 · SKILL.md (reported line 35)May include surrounding context.

实测采集命令

bash
# HDD:关注重映射/待映射/离线/命令超时/通电时长/温度
sudo smartctl -a /dev/sda | grep -E 'SMART overall|Reallocated|Current_Pending|Offline_Uncorrect|UDMA_CRC|Power_On_Hours|Temperature_Celsius|Command_Timeout'
# 自检记录(距上次自检太久=自检荒废,如175天)
sudo smartctl -l selftest /dev/sda | tail -5
# NVMe:磨损/备用/温度/错误

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 · SKILL.md (reported line 37)May include surrounding context.

实测采集命令

bash
# HDD:关注重映射/待映射/离线/命令超时/通电时长/温度
sudo smartctl -a /dev/sda | grep -E 'SMART overall|Reallocated|Current_Pending|Offline_Uncorrect|UDMA_CRC|Power_On_Hours|Temperature_Celsius|Command_Timeout'
# 自检记录(距上次自检太久=自检荒废,如175天)
sudo smartctl -l selftest /dev/sda | tail -5
# NVMe:磨损/备用/温度/错误

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/disk-health-resilience-case-20260904.md (reported line 33)May include surrounding context.

实测采集命令

bash
# HDD:关注重映射/待映射/离线/命令超时/通电时长/温度
sudo smartctl -a /dev/sda | grep -E 'SMART overall|Reallocated|Current_Pending|Offline_Uncorrect|UDMA_CRC|Power_On_Hours|Temperature_Celsius|Command_Timeout'
# 自检记录(距上次自检太久=自检荒废,如175天)
sudo smartctl -l selftest /dev/sda | tail -5
# NVMe:磨损/备用/温度/错误

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
95% confidence
Finding

This line invokes sudo for mkfs.xfs -f on a block device, which is a privileged and destructive operation. In context, the combination of root execution plus forced formatting can irreversibly erase data if the device identification is wrong or the environment differs from the recorded system state.

Content

Scanner excerpt · references/disk-health-resilience-case-20260904.md (reported line 30)May include surrounding context.

待用户终端执行(agent 被 mkfs hardline block)

bash
sudo mkfs.xfs -f -L backup /dev/sda11
sudo mkdir -p /backup && sudo mount /dev/sda11 /backup
echo "UUID=$(sudo blkid -s UUID -o value /dev/sda11) /backup xfs defaults,noatime 0 2" | sudo tee -a /etc/fstab
sudo chown <user>:<user> /backup

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
87% confidence
Finding

Using sudo to create and mount /backup is privileged and can alter live system mount state. While not inherently malicious, it becomes risky in this skill because it is part of an operational sequence that changes storage layout and may be executed without enough validation or rollback guidance.

Content

Scanner excerpt · references/disk-health-resilience-case-20260904.md (reported line 31)May include surrounding context.

待用户终端执行(agent 被 mkfs hardline block)

bash
sudo mkfs.xfs -f -L backup /dev/sda11
sudo mkdir -p /backup && sudo mount /dev/sda11 /backup
echo "UUID=$(sudo blkid -s UUID -o value /dev/sda11) /backup xfs defaults,noatime 0 2" | sudo tee -a /etc/fstab
sudo chown <user>:<user> /backup
df -hT /backup | tail -1

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
94% confidence
Finding

This command obtains a device UUID and appends a new filesystem entry to /etc/fstab with sudo, creating a persistent boot-time configuration change. If the UUID is wrong, duplicated, or the filesystem is unavailable, the system may experience mount failures or degraded boot behavior on subsequent restarts.

Content

Scanner excerpt · references/disk-health-resilience-case-20260904.md (reported line 32)May include surrounding context.

bash
sudo mkfs.xfs -f -L backup /dev/sda11
sudo mkdir -p /backup && sudo mount /dev/sda11 /backup
echo "UUID=$(sudo blkid -s UUID -o value /dev/sda11) /backup xfs defaults,noatime 0 2" | sudo tee -a /etc/fstab
sudo chown <user>:<user> /backup
df -hT /backup | tail -1

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 · SKILL.md (reported line 33)May include surrounding context.

md
ALERT=""

# ---------- sda 机械盘 ----------
OVERALL=$(sudo smartctl -H /dev/sda 2>/dev/null | grep -E 'PASSED|FAILED' | awk '{print $NF}')
TEMP=$(sudo smartctl -A /dev/sda 2>/dev/null | awk '/Temperature_Celsius/{print $10}')
REALLOC=$(sudo smartctl -A /dev/sda 2>/dev/null | awk '/Reallocated_Sector_Ct/{print $10}')
PENDING=$(sudo smartctl -A /dev/sda 2>/dev/null | awk '/Current_Pending_Sector/{print $10}')

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 · SKILL.md (reported line 61)May include surrounding context.

md
ALERT=""

# ---------- sda 机械盘 ----------
OVERALL=$(sudo smartctl -H /dev/sda 2>/dev/null | grep -E 'PASSED|FAILED' | awk '{print $NF}')
TEMP=$(sudo smartctl -A /dev/sda 2>/dev/null | awk '/Temperature_Celsius/{print $10}')
REALLOC=$(sudo smartctl -A /dev/sda 2>/dev/null | awk '/Reallocated_Sector_Ct/{print $10}')
PENDING=$(sudo smartctl -A /dev/sda 2>/dev/null | awk '/Current_Pending_Sector/{print $10}')

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 · SKILL.md (reported line 62)May include surrounding context.

md
ALERT=""

# ---------- sda 机械盘 ----------
OVERALL=$(sudo smartctl -H /dev/sda 2>/dev/null | grep -E 'PASSED|FAILED' | awk '{print $NF}')
TEMP=$(sudo smartctl -A /dev/sda 2>/dev/null | awk '/Temperature_Celsius/{print $10}')
REALLOC=$(sudo smartctl -A /dev/sda 2>/dev/null | awk '/Reallocated_Sector_Ct/{print $10}')
PENDING=$(sudo smartctl -A /dev/sda 2>/dev/null | awk '/Current_Pending_Sector/{print $10}')

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 · SKILL.md (reported line 63)May include surrounding context.

md
ALERT=""

# ---------- sda 机械盘 ----------
OVERALL=$(sudo smartctl -H /dev/sda 2>/dev/null | grep -E 'PASSED|FAILED' | awk '{print $NF}')
TEMP=$(sudo smartctl -A /dev/sda 2>/dev/null | awk '/Temperature_Celsius/{print $10}')
REALLOC=$(sudo smartctl -A /dev/sda 2>/dev/null | awk '/Reallocated_Sector_Ct/{print $10}')
PENDING=$(sudo smartctl -A /dev/sda 2>/dev/null | awk '/Current_Pending_Sector/{print $10}')

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 · scripts/disk_smart_monitor.sh (reported line 13)May include surrounding context.

sh
ALERT=""

# ---------- sda 机械盘 ----------
OVERALL=$(sudo smartctl -H /dev/sda 2>/dev/null | grep -E 'PASSED|FAILED' | awk '{print $NF}')
TEMP=$(sudo smartctl -A /dev/sda 2>/dev/null | awk '/Temperature_Celsius/{print $10}')
REALLOC=$(sudo smartctl -A /dev/sda 2>/dev/null | awk '/Reallocated_Sector_Ct/{print $10}')
PENDING=$(sudo smartctl -A /dev/sda 2>/dev/null | awk '/Current_Pending_Sector/{print $10}')

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 · scripts/disk_smart_monitor.sh (reported line 14)May include surrounding context.

sh
ALERT=""

# ---------- sda 机械盘 ----------
OVERALL=$(sudo smartctl -H /dev/sda 2>/dev/null | grep -E 'PASSED|FAILED' | awk '{print $NF}')
TEMP=$(sudo smartctl -A /dev/sda 2>/dev/null | awk '/Temperature_Celsius/{print $10}')
REALLOC=$(sudo smartctl -A /dev/sda 2>/dev/null | awk '/Reallocated_Sector_Ct/{print $10}')
PENDING=$(sudo smartctl -A /dev/sda 2>/dev/null | awk '/Current_Pending_Sector/{print $10}')

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 · scripts/disk_smart_monitor.sh (reported line 15)May include surrounding context.

sh
ALERT=""

# ---------- sda 机械盘 ----------
OVERALL=$(sudo smartctl -H /dev/sda 2>/dev/null | grep -E 'PASSED|FAILED' | awk '{print $NF}')
TEMP=$(sudo smartctl -A /dev/sda 2>/dev/null | awk '/Temperature_Celsius/{print $10}')
REALLOC=$(sudo smartctl -A /dev/sda 2>/dev/null | awk '/Reallocated_Sector_Ct/{print $10}')
PENDING=$(sudo smartctl -A /dev/sda 2>/dev/null | awk '/Current_Pending_Sector/{print $10}')

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 · scripts/disk_smart_monitor.sh (reported line 16)May include surrounding context.

sh
ALERT=""

# ---------- sda 机械盘 ----------
OVERALL=$(sudo smartctl -H /dev/sda 2>/dev/null | grep -E 'PASSED|FAILED' | awk '{print $NF}')
TEMP=$(sudo smartctl -A /dev/sda 2>/dev/null | awk '/Temperature_Celsius/{print $10}')
REALLOC=$(sudo smartctl -A /dev/sda 2>/dev/null | awk '/Reallocated_Sector_Ct/{print $10}')
PENDING=$(sudo smartctl -A /dev/sda 2>/dev/null | awk '/Current_Pending_Sector/{print $10}')

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 · scripts/disk_smart_monitor.sh (reported line 17)May include surrounding context.

sh
ALERT=""

# ---------- sda 机械盘 ----------
OVERALL=$(sudo smartctl -H /dev/sda 2>/dev/null | grep -E 'PASSED|FAILED' | awk '{print $NF}')
TEMP=$(sudo smartctl -A /dev/sda 2>/dev/null | awk '/Temperature_Celsius/{print $10}')
REALLOC=$(sudo smartctl -A /dev/sda 2>/dev/null | awk '/Reallocated_Sector_Ct/{print $10}')
PENDING=$(sudo smartctl -A /dev/sda 2>/dev/null | awk '/Current_Pending_Sector/{print $10}')

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 · scripts/disk_smart_monitor.sh (reported line 18)May include surrounding context.

sh
ALERT=""

# ---------- sda 机械盘 ----------
OVERALL=$(sudo smartctl -H /dev/sda 2>/dev/null | grep -E 'PASSED|FAILED' | awk '{print $NF}')
TEMP=$(sudo smartctl -A /dev/sda 2>/dev/null | awk '/Temperature_Celsius/{print $10}')
REALLOC=$(sudo smartctl -A /dev/sda 2>/dev/null | awk '/Reallocated_Sector_Ct/{print $10}')
PENDING=$(sudo smartctl -A /dev/sda 2>/dev/null | awk '/Current_Pending_Sector/{print $10}')

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 · scripts/disk_smart_monitor.sh (reported line 19)May include surrounding context.

sh
ALERT=""

# ---------- sda 机械盘 ----------
OVERALL=$(sudo smartctl -H /dev/sda 2>/dev/null | grep -E 'PASSED|FAILED' | awk '{print $NF}')
TEMP=$(sudo smartctl -A /dev/sda 2>/dev/null | awk '/Temperature_Celsius/{print $10}')
REALLOC=$(sudo smartctl -A /dev/sda 2>/dev/null | awk '/Reallocated_Sector_Ct/{print $10}')
PENDING=$(sudo smartctl -A /dev/sda 2>/dev/null | awk '/Current_Pending_Sector/{print $10}')

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 · scripts/disk_smart_monitor.sh (reported line 34)May include surrounding context.

sh
ALERT=""

# ---------- sda 机械盘 ----------
OVERALL=$(sudo smartctl -H /dev/sda 2>/dev/null | grep -E 'PASSED|FAILED' | awk '{print $NF}')
TEMP=$(sudo smartctl -A /dev/sda 2>/dev/null | awk '/Temperature_Celsius/{print $10}')
REALLOC=$(sudo smartctl -A /dev/sda 2>/dev/null | awk '/Reallocated_Sector_Ct/{print $10}')
PENDING=$(sudo smartctl -A /dev/sda 2>/dev/null | awk '/Current_Pending_Sector/{print $10}')

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 · scripts/disk_smart_monitor.sh (reported line 35)May include surrounding context.

sh
ALERT=""

# ---------- sda 机械盘 ----------
OVERALL=$(sudo smartctl -H /dev/sda 2>/dev/null | grep -E 'PASSED|FAILED' | awk '{print $NF}')
TEMP=$(sudo smartctl -A /dev/sda 2>/dev/null | awk '/Temperature_Celsius/{print $10}')
REALLOC=$(sudo smartctl -A /dev/sda 2>/dev/null | awk '/Reallocated_Sector_Ct/{print $10}')
PENDING=$(sudo smartctl -A /dev/sda 2>/dev/null | awk '/Current_Pending_Sector/{print $10}')

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 · scripts/disk_smart_monitor.sh (reported line 36)May include surrounding context.

sh
ALERT=""

# ---------- sda 机械盘 ----------
OVERALL=$(sudo smartctl -H /dev/sda 2>/dev/null | grep -E 'PASSED|FAILED' | awk '{print $NF}')
TEMP=$(sudo smartctl -A /dev/sda 2>/dev/null | awk '/Temperature_Celsius/{print $10}')
REALLOC=$(sudo smartctl -A /dev/sda 2>/dev/null | awk '/Reallocated_Sector_Ct/{print $10}')
PENDING=$(sudo smartctl -A /dev/sda 2>/dev/null | awk '/Current_Pending_Sector/{print $10}')