Skip to content

fix(config): numeric settings from environment variables load as strings and are never range-checked #992

Closed

Description

@dan-petty

Problem

A numeric setting given through an environment variable is stored as the raw string, and its range is never checked. _coerce_setting_value (config) passes a float setting's string from the environment through unchanged. So, for example, DEVOPS_CLI_VALKEY_TIMEOUT=30 and DEVOPS_CLI_AI_TASK_EMBEDDING_TIMEOUT=30 load as "30", and a negative, zero, infinite or non-numeric value loads without error, failing later, far from the setting.

Found on 2026-10-02 while adding qdrant.timeout (#975). That setting avoids the problem through validate_assignment=True on its model, but the other models do not have it.

Acceptance criteria

  • Every numeric setting set from the environment is parsed to its declared type and checked against its field constraints at load. A bad value raises ConfigurationError naming the variable.
  • Either _coerce_setting_value coerces through the field's type, or every settings model validates on assignment, applied consistently.
  • Timeout-like fields refuse zero, negatives, infinity and NaN.
  • An offline parametrized test covers every numeric option in OPTION_TO_ENV_VAR: a valid value loads as its type, and "0", "-1", "inf" and "x" are refused where the field forbids them.
  • uv run devops ci passes.

Problem (scope added 2026-10-03)

This scope is posted on #992, a sub-issue of #1000 that lands first (consolidation, 2026-10-03). #992's numeric criteria stay; this scope widens the same mechanism to booleans, URLs and lists. Proposed retitle, for a person: "every settings value passes its field type at load and on set".

Scope added 2026-10-03, under the library rule that #1107 enforces. Lines cited at dcafadf. Every URL setting is a bare str that nothing checks as a URL. Values from the environment and from devops config set reach the models without going through their field types. _coerce_setting_value parses booleans and decides whether a value is a list by hand. This scope makes the field type the one check for every value, using pydantic, httpx2 and the standard library, and adds no dependency.

Measured offline, in a network namespace with no network (pydantic 2.13.5, pydantic-settings 2.15.0, httpx2 2.13.0, opentelemetry-exporter-otlp-proto-grpc 1.44.0, Python 3.14.7):

  • DEVOPS_CLI_TELEMETRY_ENABLED=bogus and DEVOPS_CLI_AI_ALLOW_PRIVATE_NETWORK=bogus load as False with no error, and =y also loads as False. The bool branch of _coerce_setting_value (config/settings.py:1145-1146) strips the value and tests membership in {"1", "true", "yes", "on"}. It is the fourth parser of the private-network flag. fix(security): every HTTP client dials only addresses its egress level allows, checked at the connect and on every redirect #898 deletes the other three (http/broker.py:31-35, core/validation.py:297-302, ai/client/unified.py:344-352) and reads this field instead.
  • DEVOPS_CLI_GRAFANA_URL=example.com loads unchanged. DEVOPS_CLI_AI_OLLAMA_URLS=localhost:11434 also loads, and get_ollama_urls (:503-514) adds http:// to it. For HTTP://example.com:11434 it returns http://HTTP://example.com:11434 (:513).
  • _apply_env_overrides (:758-779) and devops config set (commands/config.py:184-203) both go through dotted_set (:1158-1186). It assigns with setattr on models that do not validate assignment; only QdrantConfig does (:183). ai.temperature=0.5 is stored as the string '0.5', and ai.timeout=abc as 'abc'. This item's original body is that numeric half.
  • dotted_set treats a value as a list when the key ends in s (:1185):
    • devops config set cloudflare.public_ip_bypass 192.0.2.1 stores ['192.0.2.1'] in a str | None field (:342, :366).
    • save_settings (:1021) writes that list to config.yaml. The next Settings.model_validate refuses it, so every later command that loads settings fails.
    • ai.gateway_weights, a dict field, gets a list the same way.
  • Typing the fields as bare AnyHttpUrl breaks callers, because the value is no longer a str:
    • .rstrip("/") fails at commands/argo.py:178, argo/fleet.py:55 and commands/grafana.py:84;
    • ", ".join(...) fails at commands/k8s/networking.py:333 and :336;
    • save_settings (model_dump(mode="json")) would write http://host:port/, with a trailing slash, back to config.yaml.
  • A pydantic check on a value that is then sent as written can disagree with the client that sends it. pydantic parses URLs the WHATWG way; httpx2, which sends them, follows RFC 3986.
    • pydantic accepts http:example.com, http:/example.com, http://example.com\v1, a value with an embedded tab, and http://2852039166:11434. For these, httpx2 has an empty host (its URL.origin then raises ValueError), raises InvalidURL, or dials a different host.
    • For https://api.openai.com\@example.com/v1, pydantic reads the host as api.openai.com; httpx2 reads it as example.com.
    • httpx2.InvalidURL subclasses Exception, not ValueError (its MRO is InvalidURL, Exception). pydantic turns only ValueError, AssertionError and its own error types into validation errors. A validator that calls httpx2.URL(v) without catching it let InvalidURL escape validation for http://exa\tmple.com:11434. _apply_env_overrides (:775) and config set (commands/config.py:201) catch only (AttributeError, ValueError), so load_settings would crash rather than refuse the value.
  • Seven of the URL fields also hold cluster service addresses. devops k8s configure-urls proxy addressing writes k8s://<namespace>/<service>:<port> (or k8s+https:// for TLS) into argocd.url, grafana.url, prometheus.url, jaeger.url, pyroscope.url, open_webui.url and qdrant.url (commands/k8s/networking.py:497-537).
    • An http(s)-only type would refuse values the CLI writes itself.
    • The test of that path patches dotted_set (tests/test_k8s_proxy_addressing.py:129-145), so it would stay green.
  • pydantic's default error text repeats the input, so a refused http://u:s3cret@… value prints s3cret. hide_input_in_errors=True removes the input, but only on the model whose validation raises:
    • A config.yaml value fails inside Settings.model_validate(raw) (:903). There the outermost model, Settings (SettingsConfigDict, :633-637), decides. A section model that hides input under a Settings that does not still printed input_value='http://u:s3cret@exa mple.com'.
    • An assignment through dotted_set fails inside the section model, so the section's setting decides. A Settings that hides input over a section that does not still printed s3cret on assignment.
    • With both set, neither path printed s3cret.
    • hide_input_in_errors does not change the text of a ValueError that a validator raises. Every parse_service_url message embeds the whole value (k8s/service_proxy.py:111-129). For k8s://u:s3cret@monitoring/prometheus it raises 'k8s://u:s3cret@monitoring/prometheus' is missing a service port. ….
  • Today the bool branch strips whitespace first (:1146), so ' true ' and 'true\r' (from a CRLF env file) load as True. pydantic's bool parsing refuses both, even with str_strip_whitespace=True.

Acceptance criteria (scope added 2026-10-03)

Deliverable. Each piece is a call into pydantic, httpx2 or the standard library:

  • One str-preserving alias for http(s) URL fields: Annotated[str, StringConstraints(strip_whitespace=True), AfterValidator(...)].

    • The validator runs TypeAdapter(AnyHttpUrl).validate_python(v) to check the shape: scheme http or https, a host, a valid port and IDN.
    • It then requires httpx2.URL(v).origin == httpx2.URL(str(parsed)).origin, and returns the stripped v unchanged. What is stored and saved is what the user wrote.
    • It catches httpx2.InvalidURL from either httpx2.URL(...) call and raises ValueError with a reason that does not repeat the value (for example httpx2 cannot parse this URL). An origin mismatch raises ValueError the same way (for example httpx2 would send this URL to a different host or port). The ValueError that .origin raises for an empty host does not contain the value either, so pydantic records it as it is.
    • Measured offline, the alias accepted http://example.com:11434, HTTP://Example.COM:11434, http://[::1]:11434, http://bücher.example:11434 and https://example.com:443/v1. bücher.example is a reserved non-ASCII name because that case tests IDN; every other mock host is example.com.
    • With the InvalidURL catch in place, it refused every disagreement case above as a validation error. It also refused scheme-less values (URL scheme should be 'http' or 'https') and grpc://.
  • A service-URL alias for the seven fields:

    • A value whose scheme is_service_url recognises (k8s/service_proxy.py:97-99) must pass parse_service_url (:102-138). Its ServiceAddressError (a KubernetesError, :45) is re-raised as ValueError, so pydantic records the key.
    • The re-raised ValueError carries only the reason, never the URL or any part of it. parse_service_url's messages (:111-129) change to state the reason alone, for example missing a service port; a Service may expose several, so the port is required rather than guessed. A caller that shows the error for an address it holds names the key or the address itself. tests/test_k8s_service_proxy.py:125-128 matches on port and still passes.
    • Any other value goes through the http(s) alias.
    • k8s:// is devops-cli's own scheme, so no library parses it. The alias reuses the one existing parser rather than adding another.
  • Every section model sets validate_assignment=True and hide_input_in_errors=True, and Settings (its SettingsConfigDict) also sets hide_input_in_errors=True. The setting on the outermost model being validated governs: Settings for config.yaml, the section for an assignment.

    • Booleans, numbers, paths and URLs from the environment and from config set then go through pydantic's own parsing.
    • Booleans accept true/false, 1/0, yes/no, on/off, y/n and t/f, in any case, and refuse bogus. They also refuse surrounding whitespace, so ' true ' and 'true\r' are now refused, naming the key.
    • _coerce_setting_value keeps only the comma split for list fields.
    • A field is a list when typing.get_origin(annotation) is list, or when the annotation is a union (typing.Union or types.UnionType) one of whose typing.get_args members has origin list. Measured offline, this rule gives True for both list[str] and list[str] | None, and False for str | None and dict[str, int].
    • _typed_placeholder (:1200-1210) is not the model to copy. It runs typing.get_args(annotation) or (annotation,) first, so a bare list[str] becomes (str,) and is not seen as a list. ai.ollama_urls (:454) and cloudflare.access.bypass_ips (:338) are bare list[str]. Its one caller is dotted_set (:1184). Once coercion reads the annotation it has no caller left and is deleted.
  • Constraint: no pydantic-based check whose canonical form differs from the value actually sent. Nothing reads a host from pydantic's parse. Host and trust decisions stay with the sending client's parser (fix(security): egress guards refuse cloud metadata in every numeric, NAT64 and provider form, classified by ipaddress and one maintained library #897, fix(security): URL and host:port reads use the sending client's parser, so key trust, crawls, probes and settings act on the host actually dialled #1112).

  • Field types:

    • The http(s) alias types telemetry.endpoint (:290), ai.ollama_urls (:454), ai.gateway_url (:457), ai.portkey_url, ai.vllm_url and ai.api_base_url (:461-463), and the task overrides' ollama_urls and api_base_url (:416, :418).
    • The service-URL alias types grafana.url, prometheus.url, argocd.url, qdrant.url, open_webui.url, jaeger.url and pyroscope.url (:168, :173, :178, :184, :200, :277, :282).
    • Every value stays a str.
    • No httpx2.InvalidURL and no ServiceAddressError leaves validation: each arrives as a ValidationError naming the key.
  • Every section model validates assignment and hides input in errors, and Settings hides input in errors. _coerce_setting_value (:1141-1155) keeps only the list split. dotted_set decides list input from the field's annotation, by the union-aware rule above, not from the last letter of the key (:1185). ai.ollama_urls, cloudflare.access.bypass_ips and ai.tasks.<task>.ollama_urls all split on commas.

  • An offline, parametrised old-vs-new test runs each row through load_settings with environment variables, through config.yaml and through dotted_set:

Input Path Today After
DEVOPS_CLI_TELEMETRY_ENABLED=bogus, DEVOPS_CLI_AI_ALLOW_PRIVATE_NETWORK=bogus environment False, no error refused, naming the variable
DEVOPS_CLI_AI_ALLOW_PRIVATE_NETWORK=y environment False True
DEVOPS_CLI_TELEMETRY_ENABLED=' true '; DEVOPS_CLI_TELEMETRY_ENABLED='true\r' environment True refused, naming the variable
DEVOPS_CLI_AI_OLLAMA_URLS=localhost:11434 environment loads, read as http://localhost:11434 refused: ai.ollama_urls.0
DEVOPS_CLI_GRAFANA_URL=example.com environment loads refused: grafana.url
ai.ollama_urls = http://example.com:11434, localhost:11434 config set saved refused: ai.ollama_urls.1, file unchanged
HTTP://example.com:11434 in ai.ollama_urls file read as http://HTTP://example.com:11434 loads; get_ollama_urls adds no scheme
http://example.com:11434 every path loads loads; saved byte-identical, no trailing slash
http://example.com:11434/ in ai.ollama_urls config set, file loads; get_ollama_urls returns http://example.com:11434 saved as written; get_ollama_urls returns http://example.com:11434
http:example.com, http://example.com\v1, http://2852039166:11434 config set, file loads refused
http://exa\tmple.com:11434 (embedded tab) config set, file, environment loads refused as a validation error naming the key; no InvalidURL escapes
https://api.openai.com\@example.com/v1 as ai.api_base_url (two different hosts are the point of this row) file loads refused
k8s://monitoring/prometheus:9090 in prometheus.url; k8s+https://argocd/argocd-server:443 in argocd.url config set, file loads loads, unchanged
k8s://monitoring/prometheus (no port) in prometheus.url config set loads refused, with parse_service_url's reason and without the URL
k8s://u:s3cret@monitoring/prometheus (no port) in prometheus.url every path loads refused; no error text contains s3cret
grpc://example.com:4317, example.com:4317 in telemetry.endpoint file, environment loads refused, naming the key (see the key question on telemetry.endpoint)
ai.temperature=0.5; ai.timeout=abc config set '0.5' (a str); 'abc' 0.5 (a float); refused
ai.timeout=0, ai.timeout=-1, ai.timeout=inf, ai.timeout=nan config set, file, environment loads refused, naming the key
cloudflare.public_ip_bypass=192.0.2.1 config set ['192.0.2.1']; the next load fails '192.0.2.1'; the next load succeeds
ai.gateway_weights=a=1 config set ['a=1'] in a dict field refused
http://u:s3cret@exa mple.com every path loads as a plain str refused; no error text contains s3cret
  • Timeout-like fields (timeouts, *_seconds durations and intervals) carry field constraints gt=0 and allow_inf_nan=False. validate_assignment alone does not refuse 0, -1, inf or NaN, and today _coerce_setting_value (:1141) parses an integer with int() without a range check and leaves a float as a string. The PR lists the fields it constrains.
  • A refused value is reported on one line with the full dotted key, the list index and pydantic's reason, for example ai.ollama_urls.1: URL scheme should be 'http' or 'https'.
  • devops config set and devops ai config exit 1 on a refused value, naming the key, and leave config.yaml unchanged. Today commands/ai.py:462 calls _apply_ai_settings outside any try.
  • No in-place mutation skips validation: settings.ai.ollama_urls.append(...) at commands/k8s/networking.py:335 becomes an assignment.
  • Proxy addressing survives a round trip. _configure_proxy_urls writes into a real Settings, with dotted_set not patched. It records k8s://monitoring/prometheus:9090 and the Qdrant address, and save_settings followed by load_settings returns both unchanged.
  • Telemetry stays fail-closed (fix(docs): generated docs mask non-secret defaults and hide off flags, and docs name things that do not exist #956):
    • With DEVOPS_CLI_TELEMETRY_ENABLED=bogus, or with DEVOPS_CLI_TELEMETRY_ENDPOINT=localhost:4318, load_settings() raises ConfigurationError naming the variable.
    • In the same cases, _resolve_telemetry_settings() (telemetry/tracer.py:1272-1284) returns export off without raising.
    • Today the fallback telemetry_from_environment() (config/settings.py:914-923) is called outside the try, so it would raise once these values are refused.
    • The rows join the parametrised test at tests/test_config_env_overrides.py:257-298.
  • Two tests set ai.api_base_url to localhost:8000/v1 to reach the use-time check at ai/pydantic_ai_bridge.py:141-147: tests/test_pydantic_ai_durable.py:400-418 and tests/test_pydantic_ai_profiles_and_providers.py:652-662.
    • Both switch to a value the type accepts and the use-time check refuses: http://169.254.169.254/v1. Measured offline, create_pydantic_ai_provider raises SSRFBlockedError for it with or without allow_private_network.
    • A new row shows localhost:8000/v1 refused on assignment, naming ai.api_base_url.
  • get_ollama_urls (:503-514) adds no scheme. Only the http:// prefix at :513 goes. The trailing-slash trim and the empty-entry skip (:510-512) stay, and so does the empty-list fallback (:505-506, :514). Callers append paths to the base directly (f"{base}/api/chat" at ai/client/ollama.py:308 and :464, f"{base_url}/api/embed" at ai/rag/embeddings.py:234), so a saved trailing slash must not reach them. If feat(ci): hand-rolled URL and address parsing fails devops ci, AGENTS.md makes the library the rule, and reviews stop discarding the findings #1107 has landed, the scheme-test marker on :513 is removed and the ceiling is lowered.
  • These pass unchanged: tests/test_config_env_overrides.py:16-40 and :84-110, tests/test_config_commands.py:243-255 and tests/test_k8s_service_proxy.py:108-128. A comma-separated DEVOPS_CLI_AI_OLLAMA_URLS still loads as a list.
    • URL settings refuse a value without http:// or https:// (for the seven service URLs, also k8s:// or k8s+https://). This applies to the file, the environment and config set, and the error names the key.
    • Booleans outside pydantic's spellings are refused, and y/t/n/f are now read. A boolean with surrounding whitespace, such as ' true ' or a trailing carriage return from a CRLF env file, is now refused, naming the key.
    • Cluster service address errors no longer repeat the address.
    • telemetry.endpoint refuses grpc:// and bare host:port values. Write http://host:4317 for a plaintext collector and https://host:4317 for TLS.
    • The fix is to correct the value by hand. The PR edits no user's config.yaml.
  • Pending a person: run devops config show on the devcontainer, and on any other workstation config, after the change. Fix any key the new types refuse by hand in config.yaml.

Key questions (scope added 2026-10-03)

Strategic alignment (scope added 2026-10-03)

Update 2026-10-08: refinement

Under #1165's rule, get_ollama_urls' localhost fallback (config/settings.py:521-532) is not this item's to keep: it removes only the http:// prefix (:531), and an empty ai.ollama_urls is #1165's error. It adds no URL default. #898 landed, so the bool branch (:1273-1274) is the only parser of DEVOPS_CLI_AI_ALLOW_PRIVATE_NETWORK, and =bogus still loads as False.

Proposed design

Problem statement

Numeric settings from environment variables are loaded as strings and not range-checked, leading to late failures far from the source. Boolean, URL, and list settings also suffer from inconsistent validation, with values bypassing field type checks during assignment or load.

Acceptance criteria

  • Criterion 1: Every numeric setting set from the environment is parsed to its declared type and checked against its field constraints at load, raising ConfigurationError naming the variable for bad values.
    Verification: Run uv run devops ci and verify that a bad numeric value in an environment variable raises ConfigurationError with the correct variable name.
  • Criterion 2: Timeout-like fields refuse zero, negatives, infinity and NaN values.
    Verification: Set DEVOPS_CLI_AI_TASK_EMBEDDING_TIMEOUT to 0, -1, inf, or nan and confirm that it raises a ConfigurationError naming the key.
  • Criterion 3: An offline parametrized test covers every numeric option in OPTION_TO_ENV_VAR with valid values loading as their type and invalid values being refused.
    Verification: Execute an offline test covering all rows from the acceptance criteria table, confirming correct behavior for each input path (environment, config file, config set).
  • Criterion 4: Boolean values from environment variables are parsed correctly and refuse non-standard spellings like 'bogus' or 'y'.
    Verification: Set DEVOPS_CLI_TELEMETRY_ENABLED to 'bogus', 'true\r', or ' true ' and verify the correct behavior (refusal or parsing) for each case.
  • Criterion 5: URL fields validate inputs using both pydantic's AnyHttpUrl and httpx2's URL.origin equality, ensuring the accepted value matches what the client sends.
    Verification: Test with URLs like 'http://example.com\v1' or 'https://api.openai.com\@example.com/v1' and confirm they are refused as validation errors naming the key.
  • Criterion 6: devops config set exits 1 on a refused value, naming the key, and leaves config.yaml unchanged.
    Verification: Run 'devops config set ai.timeout abc' and confirm it exits with code 1 and doesn't modify config.yaml.

Key questions

Open questions

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

None.

Activity

  1. added
    type/bug
    scope/config
    priority/p2-medium
    on Oct 2, 2026
  2. dan-petty commented on Oct 3, 2026

    @dan-petty
    OwnerAuthor

    Consolidation (2026-10-03): this item is a sub-issue of #1000 and lands first. Proposed retitle: "every settings value passes its field type at load and on set". The library-first settings amendment (URL, boolean and list typing; posted below as an amendment to this item's body) belongs here, not on #1000. validate_assignment and hide_input_in_errors on every section model cover booleans, URLs and lists as well as numbers.

    Gap to close here: validate_assignment alone does not refuse 0, -1, inf or NaN. So timeout-like fields need field constraints (gt=0, allow_inf_nan=False) to meet this item's criterion. Today _coerce_setting_value (config/settings.py:1141) parses an integer with int() and never checks its range, and leaves a float as a string. dotted_set (:1158) treats a key ending in s as a list.

  3. modified the milestone: on Oct 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority/p2-mediumscope/configtype/bug

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions