T09 · Insecure Skill Coding Practices
- Location
scripts/agentloop_eval.py:227- Finding
Unrestricted Endpoint Override Can Redirect Authenticated Cloud Requests
- Content
View full analysis
None: if region: command.extend(["--region", region]) if endpoint: command.extend(["--endpoint", endpoint]) ``` ```python def command_run(args: argparse.Namespace) -> int: spec = load_spec(args.spec) agent_space = str(spec.get("agent_space", "")) region = spec.get("region") endpoint = spec.get("endpoint") task = normalize_task(spec, args.allow_unbounded, args.allow_continuous) actions = evaluator_actions(spec) evaluator_commands = [ command for definition in actions if (command := build_evaluator_command(agent_space, definition, region, endpoint)) is not None ] task_command = build_task_command(agent_space, task, region, endpoint) ``` The specification documentation exposes the same field: ```markdown | `region` | no | Aliyun endpoint-selection region | | `endpoint` | no | Explicit AgentLoop service endpoint | ``` ### Technical Analysis The wrapper accepts `endpoint` directly from a workflow specification and passes it to every relevant Aliyun CLI command without validating: - The URI scheme. - Whether TLS is required. - The destination hostname. - Whether the hostname belongs to an approved Alibaba Cloud domain. - Whether the endpoint is an IP address, loopback address, link-local address, or private network address. These commands use the active Aliyun CLI credential profile and may carry signed authentication metadata. Mutation calls can also carry evaluator configurations, prompts, task filters, supplied evaluation records, tags, and other customer-controlled content. Using an endpoint override can be legitimate for official regional ...[truncated 1583 chars]- Remediation
View remediation
