Repository navigation
fix(web): block private hosts in S3 endpoint test and save - #1932
Merged
Merged
Conversation
|
Paragon Review Skipped Hi @richiemcilroy! Your Polarity credit balance is insufficient to complete this review. Please visit https://app.paragon.run to finish your review. |
Member
Author
|
@greptileai please review the PR |
Member
Author
|
@greptileai please review the PR |
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Member
Author
|
@greptileai review |
07rjain
added a commit
to 07rjain/Cap
that referenced
this pull request
Oct 24, 2026
Apply the IPv4-compatible, NAT64 and site-local blocks already used by merged PR CapSoftware#1932. Cover literal endpoint rejection and preserve public IPv4-mapped IPv6 support.
This branch was successfully deployed
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.
Blocks loopback, private, link-local, reserved, IPv4-compatible (
::a.b.c.d), IPv4-mapped (::ffff:, dotted and hex) and NAT64 hosts as S3 endpoints on Cap Cloud, for both the connectivity test (POST /test) and the config save (POST /), to prevent server-side request forgery.apps/web/lib/s3-endpoint-policy.tsand usesnode:netBlockList, the same approach as the media server URL policy in fix(media-server): check every remote URL against a private-address policy #3000.NEXT_PUBLIC_IS_CAPistruein production, so self-hosters can still test and save a localhost or LAN MinIO endpoint. An empty endpoint (default AWS) is never checked.

Confidence Score: 5/5
The PR appears safe to merge; no new actionable defect was established.Summary
This PR checks custom S3 endpoints before testing or saving them on Cap Cloud production.
Reviews (4) · Last reviewed commit: "fix(web): block private S3 endpoints on ..." · Reviewed by Greptile