Repository navigation
Description
Problem Description
devops ai benchmark and the embedding benchmark name each Ollama server by the configured URL text. When a URL in ai.ollama_urls holds userinfo, the password goes to the terminal output, to the report object and to the saved JSON report.
Lines cited at e02c3fb0:
src/devops_cli/ai/benchmark/runner.py:201takes the servers fromsettings.ai.ollama_urlsas they are.runner.py:249,:278,:340,:359and:458write the raw URL as theserverof each task response and peer grade._compute_server_summariesuses it as theserverof each server summary.runner.py:373and:483use the raw URL as thebackendtext of the progress lines in a dry run.runner.py:544prints the raw URLs in theWorkers:line.runner.py:1002(_save_report) writesreport.model_dump_json()to<data>/benchmarks/<session>-benchmark.jsonwith no masking. A dry run does not save the file, but it prints the URLs and holds them in the report.src/devops_cli/ai/benchmark/embedding_runner.py:246takes the same setting. Lines:339and:498printon {server_url}, and:347and:507store it as theserverof each result.
Userinfo is valid configuration: httpx2 sends it as Basic authentication to an Ollama behind an authenticating proxy. #1110 names the server of each AI reply by httpx2.URL(url).origin and writes the text with origin_label, next to LLMResponse in ai/client/models.py. The benchmark runners are outside the sites of #1110, and the review of #1110 found this defect.
Reproduction Steps
- Run an offline dry run in Python:
BenchmarkRunner(models=["m"], tasks=[BENCHMARK_TASKS[0]], is_dry_run=True, servers=["<url-with-userinfo>"]).execute(). - Read the terminal output,
report.responses[*].server,report.peer_grades[*].serverandreport.server_benchmarks[*].server. - Run
devops ai benchmarkwithout--dry-runwith the same URL inai.ollama_urls, and read<data>/benchmarks/<session>-benchmark.json.
Expected vs Actual Behavior
Expected: each benchmark names a server by host[:port] from the origin of its URL (example.com:11434), as origin_label(get_url_origin(url)) gives. No output, report field or saved file holds the userinfo. The client still sends the userinfo as Basic authentication. A URL with no origin shows unknown.
Actual: the Workers: line, the backend= progress lines, every server field and the saved JSON report hold <url-with-userinfo>.
Environment Diagnostics
- DevOps CLI Version: 0.8.3 (branch of fix(ai): replies carry their server as an httpx2 origin, so a password in an AI URL stays out of output, the spend ledger, metrics, spans and cache #1110 on
origin/maine02c3fb0) - Python Version: 3.14.10
- OS & Architecture: Linux x86_64 (WSL2)
- Execution Environment: DevContainer
Logs, Traces, or Terminal Output
Models: 1 | Tasks: 1 | Workers: 1 (<url-with-userinfo>)
Evaluating model: m (<url-with-userinfo>)
task=sec-ssrf-remediation | model=m | backend=<url-with-userinfo> | 0.8s
responses.server: {'<url-with-userinfo>'}
peer_grades.server: {'<url-with-userinfo>'}
server_benchmarks: ['<url-with-userinfo>']In this report, <url-with-userinfo> is the URL http://example.com:11434 with a user name and a password before the host. The redaction of intake refuses the literal URL, so the report does not show it.
Pre-Submission Checklist
- I have verified that no sensitive credentials, private keys, or internal tokens are contained in this issue report.
- I have checked existing issues and pull requests to ensure this is not a duplicate.
Source: #1110
Proposed design
Problem statement
The AI benchmark runners write the full configured URL, including any userinfo, into terminal output, report fields, and saved JSON files. A password in the URL is exposed to anyone who reads the terminal, the report object, or the saved file. The fix replaces the raw URL with the host and port from the URL origin at every display and report point, while the HTTP client still sends the userinfo as Basic authentication.
Acceptance criteria
- Criterion 1: The Workers line and all progress lines show host:port, not the full URL with userinfo.
Verification: Run a dry run with a URL that has userinfo. Read the terminal output. No line contains the userinfo. - Criterion 2: Every server field in report.responses, report.peer_grades, and report.server_benchmarks holds host:port, not the full URL.
Verification: Run a dry run with a URL that has userinfo. Inspect report.responses[].server, report.peer_grades[].server, and report.server_benchmarks[*].server. None contain the userinfo. - Criterion 3: The saved JSON report file contains no userinfo in any field.
Verification: Run devops ai benchmark without --dry-run with a URL that has userinfo in ai.ollama_urls. Read the saved JSON file. No field contains the userinfo. - Criterion 4: A URL with no origin shows the text unknown in the server name.
Verification: Run a dry run with a URL that has no origin. Read the server field. It holds the text unknown. - Criterion 5: The HTTP client still sends the userinfo as Basic authentication to the Ollama server.
Verification: Run a benchmark against an Ollama behind an authenticating proxy. The request succeeds and the proxy receives the Basic auth header. - Criterion 6: The embedding benchmark runner shows host:port in its output and result fields, not the full URL.
Verification: Run the embedding benchmark with a URL that has userinfo. Read the terminal output and the result server fields. None contain the userinfo.
Key questions
- Which function derives the display name from a URL?: Use origin_label(get_url_origin(url)) from src/devops_cli/ai/client/models.py, the same pattern that fix(ai): replies carry their server as an httpx2 origin, so a password in an AI URL stays out of output, the spend ledger, metrics, spans and cache #1110 established for naming the server of each AI reply. [sources: src/devops_cli/ai/client/models.py, src/devops_cli/ai/benchmark/runner.py:201]
- Where do the runners apply the substitution: at self.servers assignment or at each display and report point?: Apply it at each display and report point. self.servers must keep the full URL because the HTTP client uses it to send Basic authentication. The substitution is a read-only formatting step at the point where the name is written to output, a report field, or a saved file. (best practice) [sources: src/devops_cli/ai/benchmark/runner.py:201, src/devops_cli/ai/benchmark/embedding_runner.py:246]
- Rejected: Replace self.servers with masked names at assignment. Rejected. The HTTP client needs the full URL to send Basic authentication. Replacing it at assignment breaks the client.
- Chosen: Apply origin_label(get_url_origin(url)) at each display and report point. Chosen. The client keeps the full URL for authentication. Each display and report point formats the name independently. This matches the pattern in ai/client/models.py.
- What text does a URL with no origin produce?: The text unknown. The body states this as the expected behavior, and origin_label returns it when the origin is absent. [sources: src/devops_cli/ai/client/models.py]
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
dan-petty commentedon Oct 28, 2026
Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.
A configured password leaks into terminal output, report objects, and saved JSON files.Credentials written to disk and terminal output are a security defect.Prevents password exposure in benchmark output and saved reports.Multiple call sites in two files need the same substitution, but the pattern is clear.Both mask userinfo from a server name, but #2459 fixes the Qdrant span while this fixes the AI benchmark output and saved report.fix(ai): a reply names its server by the origin of the URL called, so…
devops-cli-service commentedon Oct 28, 2026
Status set to Ready at 002d645 (see proposed design in issue body).
chore(main): release 0.16.5 (#2671)
fix(ai): name each prewarm server by host and port (#2737)
fix(rag): name the Qdrant server by host and port (#2733)