Web push: dev-only VAPID fallback + restore Intel macOS in lockfile#108
Merged
Conversation
- Fail closed on missing VAPID keys outside development. The checked-in fallback keypair only applies in Rails.env.development?; production with unset COPLAN_VAPID_* simply disables web push (per web_push_configured?) instead of silently signing with a public key. Rotated the dev fallback keys since the previous values are now in commit history. - Restore arm64-darwin and x86_64-darwin in Gemfile.lock so Intel macOS contributors and CI can install with a frozen lockfile. Generated with Amp Amp-Thread-ID: https://ampcode.com/threads/T-019df459-b110-726a-97e2-ff15e2903435 Co-authored-by: Amp <amp@ampcode.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #107 — addresses two Codex findings that didn't make it into the merge.
P1 (security): VAPID fallback key is dev-only
#107 landed with
ENV["COPLAN_VAPID_PRIVATE_KEY"] || "<hardcoded key>". That means any deployment that forgets to set the env var silently signs push messages with a key that's now in the public commit history — anyone who learns a subscription endpoint could forge push notifications that appear to come from the app.Fix: fallback only applies in
Rails.env.development?. In any other env, missingCOPLAN_VAPID_*leaves the config nil andweb_push_configured?returns false — so the meta tags, subscription endpoints, and Settings card all stay quiet rather than running with a public key.Also rotated the dev fallback to a fresh keypair since the prior values are in commit history.
P2: Restore Intel macOS in Gemfile.lock
#107 dropped
arm64-darwinandx86_64-darwin(an artifact ofbundle installrunning on thisarm64-darwin-25machine), which breaks frozenbundle installfor Intel macOS contributors and CI.Fix:
bundle lock --add-platform x86_64-darwin arm64-darwin— both back in the lockfile.Verification
bundle exec rspec→ 814 examples, 0 failures.Generated with Amp