Skip to content

fix: validate run attach server url#236

Open
Bortlesboat wants to merge 1 commit into
CortexLM:mainfrom
Bortlesboat:fix/run-attach-url-validation
Open

fix: validate run attach server url#236
Bortlesboat wants to merge 1 commit into
CortexLM:mainfrom
Bortlesboat:fix/run-attach-url-validation

Conversation

@Bortlesboat
Copy link
Copy Markdown

Summary

  • Validate cortex run --attach values before falling back to local execution.
  • Reject filesystem-looking values such as /nonexistent/file.txt with a clear HTTP(S) server URL error.
  • Keep valid HTTP server URLs working with the existing dry-run/fallback behavior.

Why

This addresses PlatformNetwork/bounty-challenge#53338. --attach is documented as a remote Cortex server URL, but the current implementation accepts local-looking paths and then ignores them when server attachment falls back to local mode. That can make users think a file was included when it was not.

Verification

  • cargo test -p cortex-cli --test run_attach
  • cargo check -p cortex-cli
  • cargo fmt --check --package cortex-cli
  • git diff --check

Copy link
Copy Markdown

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

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

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant