Back to skill

Security audit

alibabacloud-iac-code

Security checks for vulnerabilities and agentic risk

Overview

This skill matches its Alibaba Cloud infrastructure purpose, but it runs a downloaded local runtime with broad inherited environment access, so users should review it before installing.

Install only if you trust the iac-code runtime publisher and are comfortable letting it operate Alibaba Cloud infrastructure. Use a dedicated shell/session without unrelated API keys in the environment, configure narrow RAM permissions, and review every permission or deployment confirmation before allowing changes.

Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • System Prompt LeakageDirect Leakage, Indirect Extraction, Tool-Based Exfiltration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
Findings (25)

Ae1

High
Category
analysis-evasion
Content
Use the single standard-library entry point at `scripts/iac_code.py`. Never install `iac-code` with pip and never invoke a headless command. Run every command b
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
Use the single standard-library entry point at `scripts/iac_code.py`. Never install `iac-code` with pip and never invoke a headless command. Run every command b
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
Use the single standard-library entry point at `scripts/iac_code.py`. Never install `iac-code` with pip and never invoke a headless command. Run every command b
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
Use the single standard-library entry point at `scripts/iac_code.py`. Never install `iac-code` with pip and never invoke a headless command. Run every command b
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
Use the single standard-library entry point at `scripts/iac_code.py`. Never install `iac-code` with pip and never invoke a headless command. Run every command b
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
Use the single standard-library entry point at `scripts/iac_code.py`. Never install `iac-code` with pip and never invoke a headless command. Run every command b
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
Use the single standard-library entry point at `scripts/iac_code.py`. Never install `iac-code` with pip and never invoke a headless command. Run every command b
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
Use the single standard-library entry point at `scripts/iac_code.py`. Never install `iac-code` with pip and never invoke a headless command. Run every command b
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
Use the single standard-library entry point at `scripts/iac_code.py`. Never install `iac-code` with pip and never invoke a headless command. Run every command b
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
Use the single standard-library entry point at `scripts/iac_code.py`. Never install `iac-code` with pip and never invoke a headless command. Run every command b
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
Use the single standard-library entry point at `scripts/iac_code.py`. Never install `iac-code` with pip and never invoke a headless command. Run every command b
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
The installer or Skill distributor may place an optional `config.json` beside this `SKILL.md`:
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Env Variable Harvesting

High
Category
Data Exfiltration
Content
config_path = root / "a2a.json"
        _atomic_json(config_path, config)
        log_path = root / "runtime.log"
        environment = dict(os.environ)
        environment["IAC_CODE_MODE"] = mode
        environment.pop("IACCODE_A2A_ALLOWED_CWDS", None)
        environment["IAC_CODE_A2A_TRUST_REQUEST_CWD"] = "1"
Confidence
90% confidence
Finding
The bridge copies the full parent environment into the spawned runtime process, which can expose unrelated secrets such as API keys, cloud credentials, proxy credentials, or CI tokens to the downloaded runtime. In this skill context, that is more dangerous because the child process is an external packaged runtime intended to perform infrastructure actions, so it has strong incentives and opportunity to consume inherited credentials.

Direct Prompt Extraction

High
Category
System Prompt Leakage
Content
raise BridgeError("a2a_transport_failed", "The prompt file could not be read as UTF-8.") from exc
    if not prompt.strip() or len(prompt.encode("utf-8")) > 1024 * 1024:
        raise BridgeError("a2a_transport_failed", "The prompt file is empty or too large.")
    return prompt


def _preferred_language(prompt, requested):
Confidence
85% confidence
Finding
Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.

Lp3

Medium
Category
MCP Least Privilege
Confidence
94% confidence
Finding
The skill declares no explicit tool scope even though it instructs use of shell, file read/write, network, and environment access. In a skill that can provision cloud infrastructure and handle runtime/cache operations, missing a restrictive permission manifest increases the chance of over-privileged execution, unintended data access, or command misuse if the skill is invoked in the wrong context.

Vague Triggers

Medium
Confidence
94% confidence
Finding
The trigger criteria are intentionally broad: the skill should activate for Alibaba Cloud infrastructure work even when the user does not mention the skill or its underlying tools. Because this skill can initiate bridge execution, interact with local runtime state, and potentially drive cloud changes, overbroad routing raises the risk of unintended invocation on ambiguous requests and execution of sensitive operations under the wrong workflow.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
The recommended wait is 60 seconds and the bridge enforces a 120-second maximum even if a larger value is supplied.
   If a result says `state: input-required` but does not contain `inputRequired`, there is no user boundary to answer. Report its `latestText` or error, keep the same job unchanged, and stop. Never call `continue`, repeat `respond`, call `cancel`, or start a replacement job unless the user explicitly requests that action.

5. When `state` is `turn_completed`, treat `finalText` and `artifacts` as the authoritative normal-turn result. When a Pipeline reaches any terminal state, including `completed`, `failed`, `canceled`, or `rejected`, treat `pipelineResult` and `artifacts` as its authoritative result and present its success or failure details directly. If rollback cleanup is pending, the bridge automatically runs a cleanup-only normal task in the same context before returning the Pipeline result; keep following it and handle any returned permission normally. If cleanup is `failed` or `unavailable`, report that manual inspection or retry is required and do not claim it succeeded. Never send a synthetic cleanup prompt or a follow-up merely to retrieve or summarize an existing result. Never recover an answer from Session files, spool files, logs, or raw tool-result files.
6. To send the next natural-language message in the same normal conversation, or after a completed Pipeline has handed the same conversation to normal mode, write it to another workspace prompt file and continue the existing job:

   ```text
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.

subprocess module call

Medium
Category
Dangerous Code Execution
Content
raise BridgeError("artifact_verification_failed", "The extracted runtime identity is invalid.")
                if os.name != "nt":
                    os.chmod(str(staged_executable), os.stat(str(staged_executable)).st_mode | stat.S_IXUSR)
                check = subprocess.run(
                    [str(staged_executable), "--version"],
                    stdout=subprocess.PIPE,
                    stderr=subprocess.PIPE,
Confidence
95% confidence
Finding
The code executes a downloaded runtime binary during installation for a self-check. Although the manifest and artifact are hash-pinned, this still means the skill will run remotely fetched code on the host; if the publisher endpoint, signing pipeline, or embedded hashes are compromised, this becomes immediate code execution in the user's environment.

Tainted flow: 'staged_executable' from os.environ.get (line 652, credential/environment) → subprocess.run (code execution)

Medium
Category
Data Flow
Content
raise BridgeError("artifact_verification_failed", "The extracted runtime identity is invalid.")
                if os.name != "nt":
                    os.chmod(str(staged_executable), os.stat(str(staged_executable)).st_mode | stat.S_IXUSR)
                check = subprocess.run(
                    [str(staged_executable), "--version"],
                    stdout=subprocess.PIPE,
                    stderr=subprocess.PIPE,
Confidence
91% confidence
Finding
This is effectively a remote-code-execution trust-boundary issue: a fetched executable is run on the host for version validation. Even with digest checks, compromise of the manifest source, artifact source, packaging pipeline, or pinned hash replacement during release would let an attacker execute code under the user's account.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
"token": token,
            "persistence_dir": str(persistence),
            "artifact_dir": str(artifacts),
            "auto_approve_permissions": False,
            "thinking_exposure": ["tool-trace"],
            "log_to_stdout": False,
            "idle_shutdown_seconds": RUNTIME_IDLE_TIMEOUT_SECONDS,
Confidence
85% 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.

subprocess module call

Medium
Category
Dangerous Code Execution
Content
ready = False
        try:
            with log_path.open("ab", buffering=0) as log:
                process = subprocess.Popen(
                    command,
                    cwd=str(root),
                    env=environment,
Confidence
70% confidence
Finding
subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Tainted flow: 'command' from os.environ.get (line 1156, credential/environment) → subprocess.Popen (code execution)

Medium
Category
Data Flow
Content
ready = False
        try:
            with log_path.open("ab", buffering=0) as log:
                process = subprocess.Popen(
                    command,
                    cwd=str(root),
                    env=environment,
Confidence
65% confidence
Finding
Data from a source is assigned to a variable that is later passed to a sink, creating a variable-mediated taint flow.

subprocess module call

Medium
Category
Dangerous Code Execution
Content
log_path = root / "worker.log"
    creationflags = getattr(subprocess, "CREATE_NEW_PROCESS_GROUP", 0) if os.name == "nt" else 0
    with log_path.open("ab", buffering=0) as log:
        process = subprocess.Popen(
            command,
            stdin=subprocess.DEVNULL,
            stdout=log,
Confidence
70% confidence
Finding
subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Tainted flow: 'command' from os.environ.get (line 1156, credential/environment) → subprocess.Popen (code execution)

Medium
Category
Data Flow
Content
log_path = root / "worker.log"
    creationflags = getattr(subprocess, "CREATE_NEW_PROCESS_GROUP", 0) if os.name == "nt" else 0
    with log_path.open("ab", buffering=0) as log:
        process = subprocess.Popen(
            command,
            stdin=subprocess.DEVNULL,
            stdout=log,
Confidence
65% confidence
Finding
Data from a source is assigned to a variable that is later passed to a sink, creating a variable-mediated taint flow.

Dynamic attribute access via getattr()

Low
Category
Dangerous Code Execution
Content
input_file = getattr(args, "input_file", None)
    inline_decision = getattr(args, "decision", None)
    if input_file:
        if any(getattr(args, key, None) for key in ("input_id", "tool_use_id", "decision")):
            raise BridgeError(
                "input_response_mismatch",
                "Use either an input file or an inline permission decision, not both.",
Confidence
50% confidence
Finding
Dynamic getattr() with a non-literal attribute name can access arbitrary object attributes, potentially bypassing access controls.

Static analysis

No suspicious patterns detected.