fix(security): staging SSRF enforcement + SMS quota config robustness (codex review)#130
Merged
Merged
Conversation
…il-open on bad config Independent codex review of #126-#128 found two gaps: - assertSafeChannelEndpoint only enforced for NODE_ENV=production, leaving staging open to SSRF even though this changeset hardened staging elsewhere. Now enforces for production OR staging (matches assertSecureConfig). - SMS quota parsed env with Number() and disabled on NaN, so SMS_RATE_LIMIT_MAX=garbage silently turned the limiter off. Now an invalid value falls back to the default (limiter stays on); only an explicit valid value <= 0 disables it. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.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.
Independent codex review of the #126/#127/#128 hardening found two real gaps:
assertSafeChannelEndpointonly enforced forNODE_ENV=production, so a staging host still allowed tenant-controlledbaseUrlto hit169.254.169.254/localhost/RFC1918. Now enforces for production or staging (consistent withassertSecureConfig).SMS_RATE_LIMIT_MAX=garbage→NaN→ limiter silently disabled. Now an invalid value falls back to the default (stays on); only an explicit valid<= 0disables.TDD. Full suite 1020/1020, typecheck clean.
🤖 Generated with Claude Code