Skip to content

fix(app-server): restrict proxy endpoint to dev ports#358

Open
OnlyYu1996 wants to merge 1 commit into
CortexLM:mainfrom
OnlyYu1996:codex/fix-proxy-port-allowlist
Open

fix(app-server): restrict proxy endpoint to dev ports#358
OnlyYu1996 wants to merge 1 commit into
CortexLM:mainfrom
OnlyYu1996:codex/fix-proxy-port-allowlist

Conversation

@OnlyYu1996
Copy link
Copy Markdown

Summary

  • Restrict /api/v1/proxy/:port and nested proxy paths to the same known dev-server port allowlist used by /api/v1/ports
  • Reject non-dev ports such as 22 or 9200 before any localhost request is made
  • Add regression coverage for allowed and denied proxy ports

Fixes PlatformNetwork/bounty-challenge#53238.

Validation

  • cargo fmt --package cortex-app-server --check
  • cargo test --package cortex-app-server proxy::tests -- --nocapture
  • cargo check --package cortex-app-server --lib
  • 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

1 participant