Skip to content

NMV-1937: Pen test: Staging API Returns Production Console URL - #390

Merged
racquesta merged 4 commits into
developfrom
chore/NMV-1937/pen-test-staging-api-returns-production-console
Nov 24, 2026
Merged

racquesta merged 4 commits into
developfrom
chore/NMV-1937/pen-test-staging-api-returns-production-console

Conversation

@racquesta

Copy link
Copy Markdown
Contributor

Summary

  • Client.console_url now defaults to an empty string. The client sets it to https://cloud.nextmv.io only when the API host is api.cloud.nextmv.io.
  • For any other endpoint, the run console_url is the path only: /app/<app_id>/run/<run_id>?view=details.
  • An explicit Client(console_url=...) still takes precedence.
  • Not changed: nextmv/cli/init.py:679 still prints a fixed production console link. It is a CLI message, not a run console_url.

Test plan

  • Add unit tests in tests/cloud/test_client.py for production, non-production, lookalike host, explicit argument, and run link cases.
  • Run uv run pytest --ignore=tests/integration. Result: 856 passed.
  • Run uv run ruff check . and ruff format --check on the changed files. Both pass.
  • The tests use only https://api.example.com as a non-production host.

Screenshots

N/A — no UI changes in this PR.

🤖 Generated with Claude Code

racquesta and others added 4 commits November 24, 2026 06:19
…n API host [NMV-1937]

Co-Authored-By: Claude (claude-sonnet[1m]) <noreply@anthropic.com>
…s [NMV-1937]

Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-Authored-By: Claude Code <noreply@anthropic.com>
… [NMV-1937]

Co-Authored-By: Claude Code <noreply@anthropic.com>
@racquesta
racquesta requested review from merschformann and sebastian-quintero and removed request for merschformann November 24, 2026 17:57
@racquesta
racquesta marked this pull request as ready for review November 24, 2026 18:35
@racquesta
racquesta merged commit d03c8db into develop Nov 24, 2026
51 of 52 checks passed
@racquesta
racquesta deleted the chore/NMV-1937/pen-test-staging-api-returns-production-console branch November 24, 2026 18:35
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.

3 participants