Back to skill

Security audit

DevOps Agent

Security checks for vulnerabilities and agentic risk

Overview

This DevOps skill is not clearly malicious, but it can make persistent privileged system changes and includes unsafe scripts that could be abused during backups, monitoring setup, or rollback.

Install only in a disposable or carefully controlled environment unless you are prepared to audit and harden the scripts first. Before use, remove curl-to-shell and apt-key patterns, require non-default Grafana credentials, validate backup and rollback inputs, verify downloaded binaries, bind monitoring endpoints conservatively, and review every cron/systemd/sudo action before approving it.

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
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (6)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/backup-generator.sh:35
Finding
Unvalidated backup parameters enable generated-script and cron command injection<![CDATA[ ## Vulnerability Details **File Location**: `scripts/backup-generator.sh`, lines 35-43, 72-99, and 467-470 **Vulnerability Type**: Shell and crontab command injection **Risk Level**: High ### Vulnerable Code ```bash while [[ $# -gt 0 ]]; do case "$1" in --type) BACKUP_TYPE="$2"; shift 2 ;; --target) TARGET="$2"; shift 2 ;; --dest) DESTINATION="$2"; shift 2 ;; --schedule) SCHEDULE="$2"; shift 2 ;; --encrypt) ENCRYPT=true; shift ;; --retain) RETAIN_DAYS="$2"; shift 2 ;; --output-dir) OUTPUT_DIR="$2"; shift 2 ;; --notify) NOTIFY_TYPE="$2"; shift 2 ;; ``` ```bash SCRIPT_NAME="backup_${BACKUP_TYPE}_$(echo "$TARGET" | tr '/' '_' | tr '.' '_').sh" SCRIPT_PATH="${OUTPUT_DIR}/${SCRIPT_NAME}" ``` ```bash echo "BACKUP_TYPE=\"${BACKUP_TYPE}\"" echo "TARGET=\"${TARGET}\"" echo "DESTINATION=\"${DESTINATION}\"" echo "RETAIN_DAYS=\"\${RETAIN_DAYS:-${RETAIN_DAYS}}\"" echo "ENCRYPT=\"${ENCRYPT}\"" ``` ```bash read -rp "是否添加到 crontab?(y/N): " add_cron if [ "$add_cron" = "y" ] || [ "$add_cron" = "Y" ]; then (crontab -l 2>/dev/null | grep -v "$SCRIPT_PATH"; echo "$SCHEDULE $SCRIPT_PATH >> ${LOG_FILE} 2>&1") | crontab - echo -e "${GREEN}[✓]${NC} cron 任务已添加" fi ``` ### Technical Analysis The generator accepts backup type, target, destination, schedule, retention, output directory, and notification type as arbitrary strings. Several values are interpolated directly into executable shell source inside double-quoted assignments. Embedded quotes, command substitutions, shell metacharacters, or newline characters can break out of the intended assignment and add commands to the generated backup script. The cron schedule and generated script path are also inserted directly into crontab text. In particular, a newline in `SCHEDULE` or `SCRIPT_PATH` can create an additional cron entry. The resulting payload persists and is executed by cron with the privileges of the user wh ...[truncated 1234 chars]
Remediation
<![CDATA[ ## Remediation Suggestions - Reject carriage returns, newlines, null bytes, quotes, backticks, and other shell-control characters in all generated values. - Restrict `BACKUP_TYPE` and `NOTIFY_TYPE` to explicit allowlists. - Validate `RETAIN_DAYS` as a bounded positive integer. - Parse and validate the cron expression as exactly five permitted fields. - Serialize values written into shell source with `printf '%q'` rather than manual quotation. - Prefer a static backup program with a non-executable configuration file instead of generating shell source. - Canonicalize and restrict `OUTPUT_DIR` to an approved directory. - Create cron entries through a dedicated file or structured scheduler interface, using fixed commands and validated arguments. - Display the exact final generated script and exact resulting crontab diff before obtaining confirmation. - Use unique identifiers or comments to replace only the intended cron entry instead of matching an untrusted path with `grep`. ]]>

T05 · Unauthorized Access and Privilege Escalation

Error
Location
scripts/rollback.sh:110
Finding
Untrusted rollback metadata can direct destructive and privileged file operations<![CDATA[ ## Vulnerability Details **File Location**: `scripts/rollback.sh`, lines 110-155 and 239-264 **Vulnerability Type**: Path traversal, unsafe deletion, and privileged arbitrary file overwrite **Risk Level**: High ### Vulnerable Code ```bash if [ -f "$SNAPSHOT_DIR/deploy_dir.txt" ]; then deploy_dir=$(cat "$SNAPSHOT_DIR/deploy_dir.txt") else log_warn "未找到 deploy_dir.txt,请输入原始部署目录:" read -r deploy_dir fi ``` ```bash if ! validate_path "$deploy_dir"; then return 1 fi run_cmd mkdir -p "${SNAPSHOT_DIR}/rollback_backup" if [ -d "$deploy_dir" ]; then run_cmd cp -r "${deploy_dir}" "${SNAPSHOT_DIR}/rollback_backup/" fi run_cmd rm -rf "${deploy_dir}" run_cmd cp -r "${SNAPSHOT_DIR}/app_backup" "${deploy_dir}" ``` ```bash if [ -f "$SNAPSHOT_DIR/nginx_site.txt" ]; then local site_name site_name=$(cat "$SNAPSHOT_DIR/nginx_site.txt") local nginx_conf="/etc/nginx/sites-available/$site_name" echo " 恢复 Nginx 配置: $nginx_conf" if [ "$DRY_RUN" = false ]; then read -rp "确认回滚 Nginx 配置?(y/N): " confirm if [ "$confirm" != "y" ] && [ "$confirm" != "Y" ]; then log_warn "用户取消 Nginx 回滚" return 0 fi fi if [ -f "$SNAPSHOT_DIR/nginx_config" ]; then run_cmd sudo cp "${SNAPSHOT_DIR}/nginx_config" "$nginx_conf" else run_cmd sudo rm -f "$nginx_conf" run_cmd sudo rm -f "/etc/nginx/sites-enabled/$site_name" fi ``` ### Technical Analysis The rollback script treats files inside an arbitrary user-supplied snapshot directory as trusted metadata. `deploy_dir.txt` controls the destination of `rm -rf` and recursive copy operations. Although `validate_path` rejects a small list of exact path strings, it does not canonicalize paths, reject traversal, detect symlinks, verify ownership, or constrain the destination to an approved deployment root. More critically, `nginx_site.txt` is concatenated into a privileged destination path and then passed to `sudo cp` or `su ...[truncated 1581 chars]
Remediation
<![CDATA[ ## Remediation Suggestions - Require snapshots to reside beneath a fixed trusted root such as `~/.devops-agent/snapshots`. - Resolve the snapshot and every destination with `realpath` before use. - Verify that snapshots and metadata are owned by the expected user and are not group- or world-writable. - Reject symlinks in snapshot metadata, backup sources, and destination path components. - Require deployment destinations to remain beneath an explicit root such as `/opt/apps`. - Validate service and Nginx site names with a strict allowlist such as `^[A-Za-z0-9][A-Za-z0-9._-]*$`. - Reject `/`, `..`, path separators, control characters, and absolute paths in site and service names. - Open trusted directories first and use directory-relative operations where possible. - Show canonical source and destination paths before confirmation. - Separate application, service, and Nginx rollback confirmations. - Replace broad `sudo cp` and `sudo rm` operations with a narrowly scoped privileged helper that permits only validated Nginx paths. ]]>

T03 · Remote Payload Retrieval and Execution

Warning
Location
scripts/preflight-check.sh:124
Finding
Preflight guidance recommends executing mutable remote content directly in a shell<![CDATA[ ## Vulnerability Details **File Location**: `scripts/preflight-check.sh`, line 124 **Vulnerability Type**: Unverified remote payload execution recommendation **Risk Level**: Medium ### Vulnerable Code ```bash case "$tool" in docker) echo "curl -fsSL https://get.docker.com | sh" ;; ``` ### Technical Analysis The preflight script does not automatically execute this command; it prints it as an installation recommendation. Nevertheless, the recommended command downloads mutable content from an external endpoint and sends it directly to a shell without local inspection, version pinning, checksum verification, or signature validation. HTTPS protects the connection in transit but does not guarantee that the upstream content remains unchanged or that the endpoint and its release process cannot be compromised. ### Attack Path 1. Docker is absent during a preflight check. 2. The script displays the `curl | sh` command as the suggested installation procedure. 3. The user copies and executes the recommendation. 4. The current response from the external endpoint is immediately interpreted by the shell. 5. A compromised or unexpectedly changed upstream script executes with the user's privileges, potentially including elevated privileges requested by the installer. ### Impact Assessment A malicious response can execute arbitrary commands as the user running the installer. If the user runs the recommendation as root or the installer invokes `sudo`, compromise can become system-wide. Potential effects include software installation, credential access, service modification, and persistence. ]]>
Remediation
<![CDATA[ ## Remediation Suggestions - Prefer Docker packages from a configured, signed operating-system or official Docker repository. - Provide separate download and execution steps rather than piping into a shell. - Pin the installer or repository configuration to a reviewed version. - Verify an authenticated checksum or signature before execution. - Save the script locally and instruct the user to inspect it before running it. - Clearly state the privileges the installer will request and the system changes it will perform. ]]>

T08 · Insecure Dependencies

Error
Location
SKILL.md:316
Finding
Monitoring executables are installed without integrity or authenticity verification<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 316-326, 375-378, 399-403, and 409-415 **Vulnerability Type**: Insecure third-party binary installation **Risk Level**: High ### Vulnerable Code ```bash ARCH=$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/') PROM_VERSION="2.51.0" # 使用时检查最新版本 wget "https://github.com/prometheus/prometheus/releases/download/v${PROM_VERSION}/prometheus-${PROM_VERSION}.linux-${ARCH}.tar.gz" tar xzf prometheus-*.tar.gz sudo mv prometheus-*/prometheus /usr/local/bin/ sudo mv prometheus-*/promtool /usr/local/bin/ ``` ```bash NODE_EXP_VERSION="1.7.0" wget "https://github.com/prometheus/node_exporter/releases/download/v${NODE_EXP_VERSION}/node_exporter-${NODE_EXP_VERSION}.linux-${ARCH}.tar.gz" tar xzf node_exporter-*.tar.gz sudo mv node_exporter-*/node_exporter /usr/local/bin/ ``` ```bash PGEXP_VERSION="0.15.0" wget "https://github.com/prometheus-community/postgres_exporter/releases/download/v${PGEXP_VERSION}/postgres_exporter-${PGEXP_VERSION}.linux-${ARCH}.tar.gz" ``` ```bash sudo apt-get install -y apt-transport-https software-properties-common wget -q -O - https://apt.grafana.com/gpg.key | sudo apt-key add - echo "deb https://apt.grafana.com stable main" | sudo tee /etc/apt/sources.list.d/grafana.list sudo apt-get update && sudo apt-get install -y grafana ``` ### Technical Analysis The Prometheus and exporter versions are specified, and the URLs use relevant official GitHub organizations rather than an obvious personal paste service. However, the downloaded archives are extracted and their executables are moved into `/usr/local/bin` with `sudo` without validating release checksums or cryptographic signatures. Wildcard extraction and move operations can also select stale or unexpected local files in the current directory. The Grafana repository key is downloaded live and passed to deprecated `apt-key`, which adds it to a broad trust scope rather than limiting it to one repository. Because these binar ...[truncated 1075 chars]
Remediation
<![CDATA[ ## Remediation Suggestions - Download the exact archive filename into a newly created private temporary directory. - Obtain official SHA-256 checksums over an independent authenticated channel and verify them before extraction. - Verify upstream cryptographic release signatures where available. - Abort installation on any checksum, signature, version, or architecture mismatch. - Avoid wildcard archive and directory names during extraction and installation. - Inspect archive paths before extracting to prevent archive traversal. - Prefer signed distribution packages where suitable. - Store the Grafana signing key in a dedicated keyring and reference it using `signed-by=` in the repository definition. - Pin repository origin and package versions according to the deployment's update policy. - Request confirmation before installing files into `/usr/local/bin` or enabling persistent services. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
references/systemd-templates.md:307
Finding
Prometheus and node_exporter listen on all network interfaces by default<![CDATA[ ## Vulnerability Details **File Location**: `references/systemd-templates.md`, lines 307-311 and 348-351 **Vulnerability Type**: Insecure network exposure of monitoring services **Risk Level**: Medium ### Vulnerable Code ```ini ExecStart=/usr/local/bin/prometheus \ --config.file=/etc/prometheus/prometheus.yml \ --storage.tsdb.path=/var/lib/prometheus/data \ --storage.tsdb.retention.time={{RETENTION:-15d}} \ --web.listen-address=0.0.0.0:9090 \ --web.enable-lifecycle ``` ```ini ExecStart=/usr/local/bin/node_exporter \ --collector.systemd \ --collector.processes \ --web.listen-address=:9100 ``` ### Technical Analysis Both services bind to every available interface. The templates do not require a host firewall, authenticated reverse proxy, TLS, or network allowlist. Prometheus additionally enables its lifecycle endpoint. This configuration exceeds the minimum exposure required for a monitoring stack operating on the same host. Local Prometheus can scrape node_exporter through loopback, and Grafana can query local Prometheus without either endpoint being publicly reachable. ### Attack Path 1. The monitoring workflow installs and enables these templates. 2. The host has a public, cloud, container, or internal-network interface reachable by an attacker. 3. Firewall rules permit access to ports 9090 or 9100. 4. The attacker queries metrics and metadata exposed by Prometheus or node_exporter. 5. If lifecycle functionality is reachable and applicable, the attacker may also trigger state-changing lifecycle behavior. ### Impact Assessment Exposed metrics can reveal hostnames, operating-system details, filesystem layout, process behavior, service names, resource usage, and operational patterns. This information supports reconnaissance and targeted attacks. Unauthorized lifecycle access can disrupt or alter monitoring behavior. The services normally run as dedicated users, so direct operating-system privilege escalation is ...[truncated 48 chars]
Remediation
<![CDATA[ ## Remediation Suggestions - Bind Prometheus and node_exporter to `127.0.0.1` by default when all components are local. - If remote scraping is required, bind only to a dedicated management interface. - Restrict access with host and network firewalls to explicitly approved monitoring systems. - Place remotely accessible endpoints behind an authenticated TLS proxy or supported native authentication layer. - Remove `--web.enable-lifecycle` unless the deployment specifically requires it. - Document every exposed port and require explicit user confirmation before opening network access. - Test the resulting listeners with `ss -tlnp` and verify firewall policy after deployment. ]]>

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:426
Finding
Grafana automation uses default administrative credentials and exposes them in command arguments<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 426-443; `references/grafana-dashboards.md`, lines 457-463 and 488-494 **Vulnerability Type**: Default and exposed administrative credentials **Risk Level**: High ### Vulnerable Code ```bash GRAFANA_ADMIN_PASS="${GRAFANA_ADMIN_PASS:-admin}" curl -X POST -u "admin:${GRAFANA_ADMIN_PASS}" http://localhost:3000/api/datasources \ -H "Content-Type: application/json" \ -d '{ "name": "Prometheus", "type": "prometheus", "url": "http://localhost:9090", "access": "proxy", "isDefault": true }' ``` ```bash curl -X POST -u "admin:${GRAFANA_ADMIN_PASS}" http://localhost:3000/api/dashboards/db \ -H "Content-Type: application/json" \ -d @dashboard.json ``` ```bash curl -X POST http://admin:admin@localhost:3000/api/dashboards/db \ -H "Content-Type: application/json" \ -d @dashboard.json ``` ```bash curl -X POST http://admin:admin@localhost:3000/api/dashboards/import \ -H "Content-Type: application/json" \ -d '{ "dashboard": { "id": 1860 }, "overwrite": true, "inputs": [{ "name": "DS_PROMETHEUS", "type": "datasource", "pluginId": "prometheus", "value": "Prometheus" }] }' ``` ### Technical Analysis The primary workflow silently defaults the Grafana administrator password to `admin` when `GRAFANA_ADMIN_PASS` is absent. The reference instructions also hardcode `admin:admin` directly in URLs. Credentials passed in command-line arguments or URLs can be retained in shell history and may be visible in process listings or diagnostic output. The use of plain HTTP is limited to loopback in these examples, but the default password remains dangerous if Grafana listens on an externally reachable interface. This also conflicts with the project's stated guarantee that secrets are never printed in terminal output or exposed through operational commands. ### Attack Path 1. Grafana is installed with its default administrative credentials. 2. The automation proceeds ...[truncated 862 chars]
Remediation
<![CDATA[ ## Remediation Suggestions - Fail closed when no non-default administrator secret is supplied. - Generate a cryptographically random initial password or require one through a protected secret source. - Force administrator password rotation before performing API automation. - Do not embed credentials in URLs. - Avoid exposing secrets in command-line arguments; use a protected configuration file, token file, or another mechanism not visible in process arguments. - Set restrictive permissions on any temporary credential material and remove it immediately after use. - Prefer a scoped Grafana service-account token over the global administrator account when supported. - Bind Grafana to loopback by default or protect it with TLS, authentication, and firewall rules before network exposure. - Ensure logs and generated reports redact authorization headers, passwords, and tokens. ]]>
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Rogue AgentSelf-Modification, Session Persistence
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (125)

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding
The skill advertises safety-first deploy/monitor/backup/diagnose behavior, but the documented behavior also includes generating executable backup scripts, installing cron jobs, enabling services, and transferring data to remote destinations that are not clearly reflected in the high-level description. This mismatch can cause users to grant trust or invoke the skill without understanding that it can establish persistence and move data off-host.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding
The skill advertises safety-first deploy/monitor/backup/diagnose behavior, but the documented behavior also includes generating executable backup scripts, installing cron jobs, enabling services, and transferring data to remote destinations that are not clearly reflected in the high-level description. This mismatch can cause users to grant trust or invoke the skill without understanding that it can establish persistence and move data off-host.

Chaining Abuse

High
Category
Tool Misuse
Content
```bash
# Ubuntu/Debian
sudo apt-get install -y apt-transport-https software-properties-common
wget -q -O - https://apt.grafana.com/gpg.key | sudo apt-key add -
echo "deb https://apt.grafana.com stable main" | sudo tee /etc/apt/sources.list.d/grafana.list
sudo apt-get update && sudo apt-get install -y grafana
Confidence
95% confidence
Finding
Piping a downloaded GPG key directly into 'sudo apt-key add -' chains unverified network input into a privileged trust-establishment command. This pattern is dangerous because it can silently grant package trust to attacker-controlled content if the source is compromised.

Chaining Abuse

High
Category
Tool Misuse
Content
# Ubuntu/Debian
sudo apt-get install -y apt-transport-https software-properties-common
wget -q -O - https://apt.grafana.com/gpg.key | sudo apt-key add -
echo "deb https://apt.grafana.com stable main" | sudo tee /etc/apt/sources.list.d/grafana.list
sudo apt-get update && sudo apt-get install -y grafana

sudo systemctl daemon-reload
Confidence
75% confidence
Finding
Tool calls are chained to bypass individual safety checks or escalate capabilities beyond what any single tool call would allow.

Credential Access

High
Category
Privilege Escalation
Content
# 环境变量
Environment=NODE_ENV=production
Environment=PORT={{PORT:-3000}}
EnvironmentFile=-{{DEPLOY_DIR}}/.env

# 启动命令
ExecStart=/usr/bin/node {{ENTRY_POINT:-dist/index.js}}
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
# 环境变量
Environment=NODE_ENV=production
Environment=PORT={{PORT:-3000}}
EnvironmentFile=-{{DEPLOY_DIR}}/.env

# 启动命令
ExecStart=/usr/bin/node {{ENTRY_POINT:-dist/index.js}}
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
# 环境变量
Environment=NODE_ENV=production
Environment=PORT={{PORT:-3000}}
EnvironmentFile=-{{DEPLOY_DIR}}/.env

# 启动命令
ExecStart=/usr/bin/node {{ENTRY_POINT:-dist/index.js}}
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
# 环境变量
Environment=NODE_ENV=production
Environment=PORT={{PORT:-3000}}
EnvironmentFile=-{{DEPLOY_DIR}}/.env

# 启动命令
ExecStart=/usr/bin/node {{ENTRY_POINT:-dist/index.js}}
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
# 环境变量
Environment=NODE_ENV=production
Environment=PORT={{PORT:-3000}}
EnvironmentFile=-{{DEPLOY_DIR}}/.env

# 启动命令
ExecStart=/usr/bin/node {{ENTRY_POINT:-dist/index.js}}
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
Group={{SERVICE_GROUP:-www-data}}
WorkingDirectory={{DEPLOY_DIR}}

EnvironmentFile=-{{DEPLOY_DIR}}/.env

ExecStartPre={{PRE_START_CMD}}
ExecStart={{START_CMD}}
Confidence
62% confidence
Finding
The generic service template combines a broad EnvironmentFile with fully parameterized ExecStartPre/ExecStart/ExecStartPost commands. In a templating agent context, this increases the chance that sensitive values from .env are consumed by arbitrary shell commands or leaked through process listings, wrapper scripts, or logs if untrusted input reaches these placeholders.

Tool Parameter Abuse

High
Category
Tool Misuse
Content
send_notification "❌ 备份失败: ${BACKUP_TYPE} - ${TARGET}" "exit code: $exit_code"
    fi
    # 清理临时文件
    rm -f "${BACKUP_DIR}/.tmp_backup_*" 2>/dev/null || true
}
trap cleanup EXIT
Confidence
96% confidence
Finding
BACKUP_DIR in the generated script is overridable via the BACKUP_BASE_DIR environment variable, and cleanup executes rm -f "${BACKUP_DIR}/.tmp_backup_*" on exit. An attacker or confused operator can point BACKUP_BASE_DIR at an arbitrary location, causing deletion of matching files outside the intended backup directory; in a privileged execution context this becomes a meaningful integrity risk.

Chaining Abuse

High
Category
Tool Misuse
Content
docker)     echo "curl -fsSL https://get.docker.com | sh" ;;
                nginx)      echo "sudo apt install nginx  # 或 sudo yum install nginx" ;;
                certbot)    echo "sudo apt install certbot python3-certbot-nginx" ;;
                node|nodejs) echo "curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash - && sudo apt install -y nodejs" ;;
                python3)    echo "sudo apt install python3 python3-pip python3-venv" ;;
                go)         echo "wget https://go.dev/dl/go1.22.0.linux-$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/').tar.gz && sudo tar -C /usr/local -xzf go*.tar.gz" ;;
                git)        echo "sudo apt install git" ;;
Confidence
89% confidence
Finding
The `| sudo` pattern indicates a recommendation to pipe unreviewed remote content directly into a privileged shell. Even though this script does not execute the pipeline, embedding such a one-liner in an operational assistant materially increases the chance that an operator will run a dangerous command with elevated privileges.

Chaining Abuse

High
Category
Tool Misuse
Content
docker)     echo "curl -fsSL https://get.docker.com | sh" ;;
                nginx)      echo "sudo apt install nginx  # 或 sudo yum install nginx" ;;
                certbot)    echo "sudo apt install certbot python3-certbot-nginx" ;;
                node|nodejs) echo "curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash - && sudo apt install -y nodejs" ;;
                python3)    echo "sudo apt install python3 python3-pip python3-venv" ;;
                go)         echo "wget https://go.dev/dl/go1.22.0.linux-$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/').tar.gz && sudo tar -C /usr/local -xzf go*.tar.gz" ;;
                git)        echo "sudo apt install git" ;;
Confidence
89% confidence
Finding
The `| sudo` pattern indicates a recommendation to pipe unreviewed remote content directly into a privileged shell. Even though this script does not execute the pipeline, embedding such a one-liner in an operational assistant materially increases the chance that an operator will run a dangerous command with elevated privileges.

Chaining Abuse

High
Category
Tool Misuse
Content
certbot)    echo "sudo apt install certbot python3-certbot-nginx" ;;
                node|nodejs) echo "curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash - && sudo apt install -y nodejs" ;;
                python3)    echo "sudo apt install python3 python3-pip python3-venv" ;;
                go)         echo "wget https://go.dev/dl/go1.22.0.linux-$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/').tar.gz && sudo tar -C /usr/local -xzf go*.tar.gz" ;;
                git)        echo "sudo apt install git" ;;
                curl)       echo "sudo apt install curl" ;;
                wget)       echo "sudo apt install wget" ;;
Confidence
75% confidence
Finding
Tool calls are chained to bypass individual safety checks or escalate capabilities beyond what any single tool call would allow.

Chaining Abuse

High
Category
Tool Misuse
Content
certbot)    echo "sudo apt install certbot python3-certbot-nginx" ;;
                node|nodejs) echo "curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash - && sudo apt install -y nodejs" ;;
                python3)    echo "sudo apt install python3 python3-pip python3-venv" ;;
                go)         echo "wget https://go.dev/dl/go1.22.0.linux-$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/').tar.gz && sudo tar -C /usr/local -xzf go*.tar.gz" ;;
                git)        echo "sudo apt install git" ;;
                curl)       echo "sudo apt install curl" ;;
                wget)       echo "sudo apt install wget" ;;
Confidence
75% confidence
Finding
Tool calls are chained to bypass individual safety checks or escalate capabilities beyond what any single tool call would allow.

Chaining Abuse

High
Category
Tool Misuse
Content
certbot)    echo "sudo apt install certbot python3-certbot-nginx" ;;
                node|nodejs) echo "curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash - && sudo apt install -y nodejs" ;;
                python3)    echo "sudo apt install python3 python3-pip python3-venv" ;;
                go)         echo "wget https://go.dev/dl/go1.22.0.linux-$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/').tar.gz && sudo tar -C /usr/local -xzf go*.tar.gz" ;;
                git)        echo "sudo apt install git" ;;
                curl)       echo "sudo apt install curl" ;;
                wget)       echo "sudo apt install wget" ;;
Confidence
75% confidence
Finding
Tool calls are chained to bypass individual safety checks or escalate capabilities beyond what any single tool call would allow.

Tool Parameter Abuse

High
Category
Tool Misuse
Content
else
                # 如果之前没有配置,删除新建的
                run_cmd sudo rm -f "$nginx_conf"
                run_cmd sudo rm -f "/etc/nginx/sites-enabled/$site_name"
            fi

            run_cmd sudo nginx -t && run_cmd sudo systemctl reload nginx
Confidence
98% confidence
Finding
The rollback logic uses attacker-controllable snapshot metadata (`nginx_site.txt`) to construct a privileged file deletion target: `/etc/nginx/sites-enabled/$site_name`. In a DevOps rollback skill, snapshots may be treated as trusted operational artifacts, which makes this more dangerous: a tampered snapshot can transform a routine recovery workflow into arbitrary root-level file deletion and potentially system compromise or denial of service.

Session Persistence

Medium
Category
Rogue Agent
Content
allowed-tools:
  - Bash
  - Read
  - Write
  - Edit
  - Glob
  - Grep
Confidence
60% confidence
Finding
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Intent-Code Divergence

Medium
Confidence
98% confidence
Finding
The skill promises never to print secrets, yet later instructs use of curl with HTTP basic auth containing the Grafana admin password on the command line. Command-line credentials can be exposed through shell history, process listings, audit logs, or debugging output, undermining the stated secret-handling guarantee.

Intent-Code Divergence

Medium
Confidence
94% confidence
Finding
The skill claims all commands support dry-run mode, but many documented flows directly perform package installation, file writes, service enablement, cron creation, network requests, and other state changes without a defined non-executing branch. In a privileged DevOps skill, a missing dry-run path can lead to unintended production changes despite user expectations of preview-only behavior.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
2. **必需工具检查**:根据命令所需检查 docker/nginx/certbot/node/python 等
3. **网络连通性**:检测外网访问、DNS 解析
4. **磁盘空间**:确保目标分区剩余空间 > 1GB
5. **权限检查**:当前用户、sudo 可用性

---
Confidence
70% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
2. **必需工具检查**:根据命令所需检查 docker/nginx/certbot/node/python 等
3. **网络连通性**:检测外网访问、DNS 解析
4. **磁盘空间**:确保目标分区剩余空间 > 1GB
5. **权限检查**:当前用户、sudo 可用性

---
Confidence
70% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
2. **必需工具检查**:根据命令所需检查 docker/nginx/certbot/node/python 等
3. **网络连通性**:检测外网访问、DNS 解析
4. **磁盘空间**:确保目标分区剩余空间 > 1GB
5. **权限检查**:当前用户、sudo 可用性

---
Confidence
70% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
2. **必需工具检查**:根据命令所需检查 docker/nginx/certbot/node/python 等
3. **网络连通性**:检测外网访问、DNS 解析
4. **磁盘空间**:确保目标分区剩余空间 > 1GB
5. **权限检查**:当前用户、sudo 可用性

---
Confidence
70% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
2. **必需工具检查**:根据命令所需检查 docker/nginx/certbot/node/python 等
3. **网络连通性**:检测外网访问、DNS 解析
4. **磁盘空间**:确保目标分区剩余空间 > 1GB
5. **权限检查**:当前用户、sudo 可用性

---
Confidence
70% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Static analysis

No suspicious patterns detected.