Skip to content

fix(proxy): keep upload guidance on mixed inspection failures - #2253

Merged
luckyPipewrench merged 1 commit into
mainfrom
fix/mixed-inspection-upload-hint
Nov 20, 2026
Merged

luckyPipewrench merged 1 commit into
mainfrom
fix/mixed-inspection-upload-hint

Conversation

@luckyPipewrench

@luckyPipewrench luckyPipewrench commented Nov 20, 2026 •

Copy link
Copy Markdown
Member

What changed

When request inspection hits a DLP limit and a separate scanner error on a request with an unreadable upload, the proxy reports the scan error and gives guidance for both the DLP limit and the upload.

Summary by CodeRabbit

  • Bug Fixes
    • Improved error details for multipart uploads that cannot be fully scanned, while preserving the inspection-limit hint in the response.
    • Confirmed that uploads with mixed content that cannot be fully inspected are refused and are not forwarded upstream.

@coderabbitai

coderabbitai Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The inspection-limit detail now includes scan-error text when a scan error occurs. A multipart upload test checks the refusal response and preserved inspection hint across the forward, intercept, and reverse surfaces.

Changes: Request body reporting

Layer / File(s) Summary
Combined inspection-limit reporting and upload coverage
internal/proxy/bodyscan.go, internal/proxy/decode_inspection_limit_test.go
The detail builder appends scan-error text after the inspection-limit detail and returns false when a scan error is present. The multipart test checks for a 403 response, blockreason.ParseError, no upstream delivery, scan-failure details, and a preserved X-Pipelock-Hint across three proxy surfaces.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Possibly related PRs

Suggested reviewers: celest-blue

Merge Risk: Minimal · up to abee1

This change keeps upload guidance in the proxy's response when a request hits both a DLP inspection limit and a scanner error. The change is small and has test coverage across the proxy surfaces. No merge-blocking risk was found.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title "fix(proxy): keep upload guidance on mixed inspection failures" matches the change. The summary shows bodyInspectionLimitDetail in internal/proxy/bodyscan.go now keeps the inspection-limit…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title "fix(proxy): keep upload guidance on mixed inspection failures" matches the change. The summary shows bodyInspectionLimitDetail in internal/proxy/bodyscan.go now keeps the inspection-limit detail when a scan error also occurs, appending the scan error text instead of returning early. A new test, TestRequestBodyMixedInspectionKeepsUploadHint, checks that X-Pipelock-Hint keeps both the inspection-limit message and the could-not-be-fully-read message. The PR objectives describe the same goal: reporting the scan error while keeping guidance for both the DLP limit and the upload. The title is specific and concise, and it follows the conventional commit style.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 8b58b17 and abee145.

Files selected for processing: 2

  • internal/proxy/bodyscan.go
  • internal/proxy/decode_inspection_limit_test.go

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 1 remain after this review.

@luckyPipewrench

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@codecov

codecov Bot commented Nov 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@luckyPipewrench luckyPipewrench self-assigned this Nov 20, 2026
@luckyPipewrench
luckyPipewrench added this pull request to the merge queue Nov 20, 2026
Merged via the queue into main with commit 7ae8697 Nov 20, 2026
107 checks passed
@luckyPipewrench
luckyPipewrench deleted the fix/mixed-inspection-upload-hint branch November 20, 2026 11:54
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.

1 participant