iflytek/astron-agent · error · OutboundPolicyError
PRIVATE_ENDPOINT_ALLOW_LIST entries must not include params…
Error message
PRIVATE_ENDPOINT_ALLOW_LIST entries must not include params or a query
What it means
OutboundPolicyError raised when a PRIVATE_ENDPOINT_ALLOW_LIST entry parses as a URL but contains a query string or matrix/semicolon params in the path. The allow list defines endpoint origins, so params/query are meaningless and could be used to smuggle past matching; the guard rejects them at startup.
Solutions
- Strip the query string and any ';params' from each entry, keeping only scheme://host[:port]/path.
- If per-endpoint parameters are needed, pass them where the request is made, not in the allow-list entry.
- Add a startup config lint/test that asserts no '?' or ';' appears in allow-list entries before deploy.
Example fix
// before PRIVATE_ENDPOINT_ALLOW_LIST=https://db.internal/?pool=main // after PRIVATE_ENDPOINT_ALLOW_LIST=https://db.internal/
Defensive patterns
Strategy: validation
Validate before calling
def clean_entry(entry: str) -> str:
from yarl import URL
u = URL(entry)
return str(u.with_query(None)).split(";")[0]
assert not any(c in e for e in entries for c in "?;") Prevention
- Store only origin/base URLs in the allow list
- Strip query strings automatically in deployment tooling
- Add CI lint that scans env files for '?'/';' in allow-list values
When it happens
Trigger: from_environment() -> _parse_private_endpoints() parses an entry where parsed.query is non-empty or the path contains ';' — e.g. 'https://api.corp/path;v=2' or 'https://db.internal/?pool=main'.
Common situations: Developers paste a full working URL (with query params they used in a browser/curl) into the allow list instead of just the origin/base URL.
Understand the failure class
Background: "Invalid value" and "allowed values are" config errors: what your library rejected and how to fix it — this error's family across 41 libraries.
Related errors
- Invalid PRIVATE_ENDPOINT_ALLOW_LIST entry
- RESPONSE_FAILED
- Artifact upload credential is missing or invalid
- Artifact upload configuration is unavailable
- Sandbox runtime configuration is unavailable
AI-assisted analysis of iflytek/astron-agent@5e758547a8 (2026-09-12).
Data as JSON: /api/errors/15b0ce8de9456e33.
Report an issue: GitHub.
Appendix: source
Thrown at core/plugin/link/infra/tool_exector/ssrf_guard.py:263
except OutboundPolicyError as exc:
raise OutboundPolicyError("Invalid DOMAIN_BLACK_LIST entry") from exc
return tuple(domains)
def _parse_private_endpoints(raw_value: str) -> Tuple[Endpoint, ...]:
endpoints = []
for entry in raw_value.split(","):
value = entry.strip()
if not value:
continue
try:
parsed = _parse_http_url(value)
except OutboundPolicyError as exc:
raise OutboundPolicyError(
"Invalid PRIVATE_ENDPOINT_ALLOW_LIST entry"
) from exc
if parsed.query or ";" in parsed.path:
raise OutboundPolicyError(
"PRIVATE_ENDPOINT_ALLOW_LIST entries must not include params or a query"
)
endpoints.append(_endpoint(parsed))
return tuple(endpoints)
def _endpoint(parsed: SplitResult) -> Endpoint:
scheme, hostname, port = _origin(parsed.geturl())
return scheme, hostname, port, parsed.path or "/"
def _normalize_hostname(hostname: str) -> str:
value = hostname.strip().lower().rstrip(".")
if _parse_ip(value) is not None:
return value
try:
normalized = URL.build(scheme="http", host=value).raw_host
except (TypeError, ValueError, UnicodeError) as exc:View on GitHub (pinned to 5e758547a8)