Skip to content

Remove hardcoded Fly server key#26

Merged
AndreaDiazCorreia merged 1 commit into
MostroP2P:mainfrom
juanfradb:fix/remove-hardcoded-server-private-key
May 15, 2026
Merged

Remove hardcoded Fly server key#26
AndreaDiazCorreia merged 1 commit into
MostroP2P:mainfrom
juanfradb:fix/remove-hardcoded-server-private-key

Conversation

@juanfradb
Copy link
Copy Markdown
Contributor

Summary

  • remove the committed SERVER_PRIVATE_KEY literal from deploy-fly.sh
  • make deploy-fly.sh fail before deploy when required Fly secrets are missing
  • document fresh key provisioning and SERVER_PRIVATE_KEY rotation in docs/deployment.md

Security validation

Source/sink/control: deploy-fly.sh used a committed literal in flyctl secrets set SERVER_PRIVATE_KEY=...; the script now only verifies required Fly secret names and deploys after they exist.

Original issue no longer reproduces locally:

  • rg for the old key and literal 64-hex SERVER_PRIVATE_KEY assignments returns no matches
  • mocked flyctl with SERVER_PRIVATE_KEY missing exits 1 before deploy
  • mocked flyctl with all required secrets present reaches flyctl deploy -a mostro-push-server

Remaining ops step: this account cannot rotate the real Fly secret. flyctl secrets list -a mostro-push-server returns unauthorized, so a maintainer must run the documented rotation command and treat the old committed key as compromised.

Refs #5

Tests

  • bash -n deploy-fly.sh
  • mocked missing-secret ./deploy-fly.sh run: exits 1 before deploy
  • mocked complete-secret ./deploy-fly.sh run: exits 0 and calls deploy
  • rg old key/literal SERVER_PRIVATE_KEY assignment patterns: no matches
  • git diff --check
  • cargo test
  • cargo fmt --check
  • cargo clippy --all-targets -- -D warnings

@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 11, 2026

Warning

Rate limit exceeded

@juanfradb has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 35 minutes and 52 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: d38d86df-4f63-4968-bcff-89487fecd03a

📥 Commits

Reviewing files that changed from the base of the PR and between 893e7e1 and dfb8a2a.

📒 Files selected for processing (2)
  • deploy-fly.sh
  • docs/deployment.md
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@mostronatorcoder mostronatorcoder Bot left a comment

Choose a reason for hiding this comment

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

Strict pass complete.

This is a focused security fix and I am comfortable approving it.

What matters here is that the committed SERVER_PRIVATE_KEY literal is gone from deploy-fly.sh, the wrapper no longer writes production secret values itself, and deploy now fails early when the required Fly secret names are missing.

The documentation also does the right operational thing by treating the previously committed key as compromised and explicitly documenting rotation.

I do not see a blocker in the current scope, so approving.

Copy link
Copy Markdown
Member

@AndreaDiazCorreia AndreaDiazCorreia left a comment

Choose a reason for hiding this comment

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

LGTM

@AndreaDiazCorreia AndreaDiazCorreia merged commit efc357d into MostroP2P:main May 15, 2026
4 checks passed
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.

2 participants