Skip to content

fix: host validation for vllm server-detection request - #1375

Merged
AngeloDanducci merged 3 commits into
generative-computing:mainfrom
AngeloDanducci:ad-1246-m3
Jul 9, 2026
Merged

AngeloDanducci merged 3 commits into
generative-computing:mainfrom
AngeloDanducci:ad-1246-m3

Conversation

@AngeloDanducci

Copy link
Copy Markdown
Contributor

Pull Request

Issue

Fixes #1246

Description

Adds host validation for the vllm server-detection request.

Final outstanding issue of #1246

Testing

  • Tests added to the respective file if code was changed
  • New code has 100% coverage if code was added
  • Ensure existing tests and github automation passes (a maintainer will kick off the github automation when the rest of the PR is populated)

Attribution

  • AI coding assistants used

Adding a new component, requirement, sampling strategy, or tool?

If your PR adds or modifies one of the types below, check the matching box. A checklist of type-specific review items will be posted as a comment.

  • Component
  • Requirement
  • Sampling Strategy
  • Tool

NOTE: Please ensure you have an issue that has been acknowledged by a core contributor and routed you to open a pull request against this repository. Otherwise, please open an issue before continuing with this pull request.

@AngeloDanducci
AngeloDanducci requested a review from a team as a code owner July 9, 2026 14:14
@github-actions github-actions Bot added the bug Something isn't working label Jul 9, 2026
Signed-off-by: AngeloDanducci <[email protected]>
@psschwei

psschwei commented Jul 9, 2026 •

Copy link
Copy Markdown
Contributor

If I understand this right, this check would only fire when the user provides a base_url to the OpenAI backend right? So do we really need this?

@AngeloDanducci

Copy link
Copy Markdown
Contributor Author

If I understand this right, this check would only fire when the user provides a base_url to the OpenAI backend right? So do we really need this?

Need is a strong word, but it was the last thing mentioned in the issue so I figured I would tackle it even if it's just being overly cautious. If you don't think we need it we can close it and mark the security epic as completed.

@AngeloDanducci
AngeloDanducci enabled auto-merge July 9, 2026 17:38

@ajbozarth ajbozarth left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Solid, correctly-scoped fix for M3 — resolving the host before checking (rather than matching literal IPs) is the right approach, and the test coverage is thorough.

Requesting changes on one item: as written, the link-local guard only validates the initial hostname, so a redirect to a metadata endpoint slips through (inline). Since merge-when-ready is enabled, flagging so it doesn't reach the queue on that. The rest are optional.

Comment thread mellea/helpers/server_type.py Resolved
Comment thread mellea/helpers/server_type.py Resolved
Signed-off-by: AngeloDanducci <[email protected]>
@AngeloDanducci
AngeloDanducci requested a review from ajbozarth July 9, 2026 18:30
@AngeloDanducci
AngeloDanducci added this pull request to the merge queue Jul 9, 2026
Merged via the queue into generative-computing:main with commit ae64d52 Jul 9, 2026
9 checks passed
@AngeloDanducci
AngeloDanducci deleted the ad-1246-m3 branch July 9, 2026 19:18
@psschwei

psschwei commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

I probably would've not merged this (a lot of things in that issue were unnecessary IMO), but c'est la vie.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Security hardening: webhook validation, adapter path traversal, API key hygiene, and input validation

3 participants