Back to skill

Security audit

Alibabacloud Sre Toolkit

Security checks for vulnerabilities and agentic risk

Overview

This skill fits Alibaba Cloud SRE diagnostics, but it also keeps sensitive diagnostic prompts in local traces and exposes destructive STAROps/profile management commands that deserve review before installation.

Install only if you are comfortable sending Alibaba Cloud incident details to STAROps and storing local traces under .aliyun-sre. Use a least-privileged Alibaba Cloud profile, avoid pasting secrets into diagnostic prompts, inspect or disable trace retention where possible, and do not run employee/profile deletion commands unless you explicitly intend those changes.

Vulnerability Patterns
  • 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
  • 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 (2)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/starops_manager.py:676
Finding

Diagnostic Prompts Are Persisted Verbatim in Execution Traces

Content
View full analysis
None: """Append an execution trace record to .aliyun-sre/execution-trace.jsonl.""" sre_dir = os.path.join(os.getcwd(), ".aliyun-sre") if not os.path.isdir(sre_dir): os.makedirs(sre_dir, exist_ok=True) trace_path = os.path.join(sre_dir, "execution-trace.jsonl") record = { "timestamp": datetime.now(timezone.utc).isoformat(), "script": "starops_manager.py", "command": command, "args": args_dict, "session": (extra or {}).get("session"), "thread_id": (extra or {}).get("thread_id"), "exit_code": exit_code, "success": success, } trace_flags = os.O_CREAT | os.O_WRONLY | os.O_APPEND trace_fd = os.open(str(trace_path), trace_flags, 0o600) with os.fdopen(trace_fd, "a") as f: f.write(json.dumps(record, ensure_ascii=False) + "\n") ``` ```python extra = {} if args.command == "chat" and hasattr(args, "thread_id"): extra["thread_id"] = args.thread_id _append_trace(args.command, vars(args), exit_code == 0, exit_code, extra or None) ``` The `chat` command defines the diagnostic prompt as `args.question`. Calling `vars(args)` includes that complete value in `args_dict`, which is then serialized without filtering into `.aliyun-sre/execution-trace.jsonl`. ### Technical Analysis SRE diagnostic prompts can contain sensitive operational information, including: - Cloud resource IDs and account identifiers - Internal hostnames, IP addresses, and network topology - Incident descriptions and log excerpts - Application names and infrastructure metadata - Credentials or tokens accidentally paste ...[truncated 1824 chars]
Remediation
View remediation
dict: raw = vars(args) allowed_by_command = { "chat": { "uid", "config", "endpoint", "idle_timeout", "stream", "raw", "json" }, "create-thread": { "employee_id", "uid", "profile", "workspace", "config", "endpoint" }, } safe = { key: raw.get(key) for key in allowed_by_command.get(command, set()) } if command == "chat": question = raw.get("question") or "" safe["question_supplied"] = bool(question) safe["question_length"] = len(question) return safe ``` Then invoke the trace writer with: ```python _append_trace( args.command, _safe_trace_args(args.command, args), exit_code == 0, exit_code, extra or None, ) ``` ]]>

T08 · Insecure Dependencies

Warning
Location
scripts/session_manager.py:72
Finding

Unversioned Aliyun CLI Binary Is Installed Without Integrity Verification

Content
View full analysis
Remediation
View remediation
" EXPECTED_SHA256="" TMP_DIR="$(mktemp -d)" trap 'rm -rf "$TMP_DIR"' EXIT curl -fL --connect-timeout 10 --max-time 120 \ -o "$TMP_DIR/aliyun-cli.tgz" \ "https:///aliyun-cli-${VERSION}-linux-amd64.tgz" printf '%s %s\n' \ "$EXPECTED_SHA256" \ "$TMP_DIR/aliyun-cli.tgz" | sha256sum --check - tar -xzf "$TMP_DIR/aliyun-cli.tgz" -C "$TMP_DIR" test -f "$TMP_DIR/aliyun" test -x "$TMP_DIR/aliyun" mkdir -p "$HOME/.local/bin" install -m 0755 "$TMP_DIR/aliyun" "$HOME/.local/bin/aliyun" "$HOME/.local/bin/aliyun" version ``` The exact URL, version, checksum, and signature-verification procedure should come from official Alibaba Cloud release documentation. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
Findings (46)

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The skill claims to provide infrastructure diagnosis, but much of the documented behavior is actually STAROps account/employee management, API transport, and local session orchestration. When a skill's declared purpose understates privileged management behavior, reviewers and orchestrators may grant it access under false assumptions, which is a security and governance risk.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The skill claims to provide infrastructure diagnosis, but much of the documented behavior is actually STAROps account/employee management, API transport, and local session orchestration. When a skill's declared purpose understates privileged management behavior, reviewers and orchestrators may grant it access under false assumptions, which is a security and governance risk.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill claims to provide infrastructure diagnosis, but much of the documented behavior is actually STAROps account/employee management, API transport, and local session orchestration. When a skill's declared purpose understates privileged management behavior, reviewers and orchestrators may grant it access under false assumptions, which is a security and governance risk.

Content

No source excerpt is available for this finding.

Context Leakage

High
Category
Data Exfiltration
Confidence
87% confidence
Finding

Despite claiming no telemetry, the skill directs sending diagnostic prompts, session context, and cloud-resource-related information to an external service endpoint operated by STAROps. In an SRE/security-audit context, that data may include sensitive infrastructure metadata, incident details, and account identifiers, so the external transmission materially increases confidentiality risk.

Content

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

Security Rules: NEVER read/echo/print AK/SK values. NEVER ask user to input AK/SK. NEVER use aliyun configure set with literal credentials. ONLY use aliyun configure list to check status.

No telemetry or external tracing: This skill does NOT send session data, diagnostics, or cloud resource information to any external service. No telemetry, tracing plugins, or data collection is included. STAROps diagnostic queries stay within the STAROps service endpoint (*.aliyuncs.com). Any agent runtime configuration (e.g., .claude/settings.json, .qwen/settings.json) that enables external tracing plugins must be disclosed and is NOT part of this skill. Specifically, langfuse-tracing@Aliyun-Security-Scan-Market found in .claude/settings.json is injected by the security scanning infrastructure during audit runs and is NOT authored, shipped, or controlled by this skill.

bash
aliyun configure list

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
**Execution Trace**: Every `session_manager.py`/`starops_manager.py` call appends a JSONL record to `.aliyun-sre/execution-trace.jsonl` (timestamp, script, subc

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
**Execution Trace**: Every `session_manager.py`/`starops_manager.py` call appends a JSONL record to `.aliyun-sre/execution-trace.jsonl` (timestamp, script, subc

Context Leakage

High
Category
Data Exfiltration
Confidence
75% confidence
Finding

Code or instructions that leak agent conversation context to external services, potentially exposing sensitive user interactions.

Content

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

Step 5: Scenario Routing and Triage

Determine scenario (see table above). Collect context → identify affected resources → list symptoms → form hypothesis. Generate triage-summary.md.

bash
python3 <skill-root>/scripts/session_manager.py update \

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

less /tmp/aliyun-setup.sh

Step 3: Execute only after confirming the script is safe

/bin/bash /tmp/aliyun-setup.sh && rm /tmp/aliyun-setup.sh

text

> The setup script automatically detects the system architecture and installs the latest aliyun CLI to PATH. After installation, run [Version Verification](#version-verification) to confirm.

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
80% 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 · references/starops-api.md (reported line 110)May include surrounding context.

md
Invoked via the `starops_manager.py delete-employee` subcommand.

**Request**: `DELETE /digital-employee/{name}`

| Parameter | Location | Type | Description |
|-----------|----------|------|-------------|

Context Leakage

High
Category
Data Exfiltration
Confidence
75% confidence
Finding

Code or instructions that leak agent conversation context to external services, potentially exposing sensitive user interactions.

Content

Scanner excerpt · references/starops-api.md (reported line 171)May include surrounding context.

Response

Standard JSON response, extract threadId:

json
{

Known Vulnerable Dependency: aiohttp==3.14.1 — 6 advisory(ies): CVE-2026-69244 (AIOHTTP: Out-of-bounds heap read in C HTTP response parser error path (malformed); CVE-2026-69243 (AIOHTTP: HTTP request smuggling via WebSocket upgrade); CVE-2026-59881 (AIOHTTP: WebSocket client accepts compressed frames without negotiated permessag) +3 more

High
Category
Supply Chain
Confidence
93% confidence
Finding

This is a true dependency risk: the file pins aiohttp==3.14.1, and the provided finding lists multiple HIGH-severity advisories affecting that exact version. Even though this file is only a requirements lockfile, installing from it would bring the vulnerable package into the runtime, potentially exposing HTTP parsing, WebSocket, or request-handling attack surface in any code path that uses aiohttp directly or transitively via Alibaba Cloud SDK components.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The code can create and delete STAROps digital employees even though the declared purpose is SRE diagnosis and reporting. This is dangerous because a diagnostic skill gains write/destructive control over STAROps identities, enabling privilege misuse, service disruption, or persistence mechanisms if the skill is invoked improperly or by an untrusted orchestrator.

Content

No source excerpt is available for this finding.

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
96% confidence
Finding

This tool directly maps a caller-supplied name into a destructive DELETE /digital-employee/{name} operation. In the context of an SRE diagnostic skill, exposing a high-impact delete primitive is dangerous because a mistaken, induced, or unauthorized invocation can remove digital employees and disrupt operations beyond the skill's stated purpose.

Content

Scanner excerpt · scripts/starops_manager.py (reported line 596)May include surrounding context.

python
def delete_digital_employee(
    name: str, endpoint: str = DEFAULT_ENDPOINT, profile_name: Optional[str] = None,
) -> dict:
    """Delete a STAROps digital employee via DELETE /digital-employee/{name}."""
    path = f"/digital-employee/{quote(name, safe='')}"
    headers, url, _ = _sign_request(
        "DELETE", path, "DeleteDigitalEmployee", endpoint,

Ssd 3

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

In --stream, --raw, and especially --json mode, the code emits all non-assistant message text as thinking, which can include hidden system prompts, tool outputs, or other internal conversation content not meant for end users. Exposing that material can leak sensitive instructions, private context, or security-relevant internal reasoning/data from the STAROps service.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
90% confidence
Finding

The skill explicitly instructs execution of shell commands, local file reads/writes, and networked API calls, but it does not declare any tool scope or allowed-tools boundary. That omission weakens least-privilege controls and makes it harder for a host agent or reviewer to constrain what the skill is permitted to access.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The trigger list includes very generic terms such as "诊断", "故障排查", and "安全审计", which can appear in many ordinary cloud or troubleshooting conversations beyond this specific skill. The description says to load the skill when users ask about several broad topics, but it does not provide exclusion conditions or negative examples to clarify when these terms should not activate the skill.

Content

No source excerpt is available for this finding.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
80% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

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

md
## Authentication

> **Security Rules:** NEVER read/echo/print AK/SK values. NEVER ask user to input AK/SK. NEVER use `aliyun configure set` with literal credentials. ONLY use `aliyun configure list` to check status.
>
> **No telemetry or external tracing:** This skill does NOT send session data, diagnostics, or cloud resource information to any external service. No telemetry, tracing plugins, or data collection is included. STAROps diagnostic queries stay within the STAROps service endpoint (`*.aliyuncs.com`). Any agent runtime configuration (e.g., `.claude/settings.json`, `.qwen/settings.json`) that enables external tracing plugins must be disclosed and is NOT part of this skill. Specifically, `langfuse-tracing@Aliyun-Security-Scan-Market` found in `.claude/settings.json` is injected by the security scanning infrastructure during audit runs and is NOT authored, shipped, or controlled by this skill.

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% 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 · references/ram-policies.md (reported line 39)May include surrounding context.

md
> **[Resource Scoping Recommendation]**: For production environments, scope these permissions to specific resources via the `Resource` field in the RAM policy (e.g., `"Resource": "acs:ecs:cn-beijing:*:instance/i-bp1xxx"`) instead of `"Resource": "*"`. This further enforces least-privilege access.
>
> **[Extending for specialized scenarios]**: The above list covers common diagnostic scenarios. If a specialized diagnostic requires additional cloud product APIs not listed here, add only the specific read-only permissions needed (following the `Describe*` / `List*` / `Get*` naming pattern). Refer to [Alibaba Cloud OpenAPI Explorer](https://api.alibabacloud.com/) for the exact API names per product. **Never grant write operation permissions (e.g., `Create*` / `Delete*` / `Modify*` / `Update*`)**.

---

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The documentation includes a credential-destructive command (aliyun configure delete --profile) without a prominent warning that it removes locally stored cloud access configuration and may break existing automation or incident-response workflows. In an SRE/security skill, operators may copy commands directly under pressure, so insufficient warning increases the chance of accidental credential or profile deletion and service management disruption.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The specification explicitly documents a --stream mode that emits the assistant's real-time 'thinking process' to stderr and even recommends integration patterns to surface those events. In an SRE/security diagnostic context, prompts and intermediate reasoning can contain infrastructure identifiers, incident details, credentials-adjacent data, or other sensitive operational context; exposing this stream without strong warnings, redaction, or role-based controls creates a real confidentiality risk.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
85% confidence
Finding

Lines L081-L088 describe the onboarding flow as using read-only APIs plus writing only a UID/profile/employee mapping, explicitly stating no credentials are transmitted. However, L138 says add/update 'authorizes the profile via aliyun configure set', which implies credential-writing side effects not reflected in the earlier description. This is an active documentation inconsistency about whether these commands merely store mappings or also modify CLI credential state.

Content

No source excerpt is available for this finding.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
80% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

Scanner excerpt · references/starops-config.md (reported line 114)May include surrounding context.

md
| `--profile` | No | Bound aliyun CLI profile name. When missing, session falls back to aliyun current. Credentials must be configured externally via `aliyun configure` |

- `account-add` only writes the `uid -> profile -> employeeId` (workspace optional) mapping to `.starops/config.json`. Credentials are never accepted or handled -- users must configure them externally via `aliyun configure` before running this command.
- After writing, a lightweight validation is automatically performed. Results are reported in the `validation` field of the returned JSON (STAROps required fields + profile credential availability).

### Update Account (account-update)

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
83% confidence
Finding

This markdown file describes an execution flow and verification commands but does not clearly define when this skill/document should be invoked versus when it should not. The broad framing around 'verification commands and expected outputs for each Step in the execution flow' could allow ambiguous activation without explicit scope limits or negative examples.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The document explicitly forbids direct CLI/API alternatives, but the skill metadata says CLI fallback diagnosis is required when STAROps is unavailable. This contradiction can cause operators or automation to skip the documented fallback path during outages, resulting in failed diagnosis, unsafe workarounds, or pressure to bypass controls outside the documented flow.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The document states that every invocation automatically appends JSONL records to a local execution trace, but it does not warn users that commands will write diagnostic metadata to disk. In SRE/security contexts, trace logs may contain account identifiers, session IDs, workspace details, or operational history that users may not expect to persist locally.

Content

No source excerpt is available for this finding.