Skip to content

Fix path exposure in WebServerInterceptor log - #3176

Merged
predic8 merged 1 commit into
masterfrom
web-server-exposes-installation-path
Aug 31, 2026
Merged

Fix path exposure in WebServerInterceptor log#3176
predic8 merged 1 commit into
masterfrom
web-server-exposes-installation-path

Conversation

@t-burch

@t-burch t-burch commented Aug 25, 2026

Copy link
Copy Markdown
Collaborator

Summary by CodeRabbit

  • Bug Fixes
    • Improved resource-not-found error responses by limiting installation path details to development mode.
    • Production error messages no longer expose internal filesystem paths.

@t-burch
t-burch requested a review from rrayst August 25, 2026 09:24
@t-burch t-burch self-assigned this Aug 25, 2026
@coderabbitai

coderabbitai Bot commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: f106ce6a-a49c-4d81-910e-9cf7a81f2ea4

📥 Commits

Reviewing files that changed from the base of the PR and between cfed5ba and e1f4ea5.

📒 Files selected for processing (2)
  • core/src/main/java/com/predic8/membrane/core/interceptor/server/WebServerInterceptor.java
  • core/src/test/java/com/predic8/membrane/core/interceptor/server/WebServerInterceptorTest.java

Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review.


📝 Walkthrough

Walkthrough

The error response now stores unresolved paths as internal data. Tests verify that production responses omit installation paths while development responses include the expected path.

Changes

Error path visibility

Layer / File(s) Summary
Internalize unresolved path and validate environment output
core/src/main/java/com/predic8/membrane/core/interceptor/server/WebServerInterceptor.java, core/src/test/java/com/predic8/membrane/core/interceptor/server/WebServerInterceptorTest.java
createResponse attaches the unresolved path through .internal(...). Tests verify path omission in production mode and path inclusion in development mode.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Merge Risk: ⚪ Minimal · up to e1f4e

This is a localized path-logging fix with no actionable merge-blocking risk remaining beyond normal checks and review.

Suggested reviewers: rrayst

Poem

A rabbit checks the error trail,
The hidden path stays under veil.
In dev, the path hops into sight,
In prod, it hides from public light.
Tests thump softly: all is right.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 2 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title identifies the WebServerInterceptor path-exposure change, but it incorrectly describes the target as a log. The change affects the problem-details error response.
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.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch web-server-exposes-installation-path

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.

@membrane-ci-server

Copy link
Copy Markdown

This pull request needs "/ok-to-test" from an authorized committer.

@predic8
predic8 merged commit 3d1e427 into master Aug 31, 2026
4 of 6 checks passed
@predic8
predic8 deleted the web-server-exposes-installation-path branch August 31, 2026 09:38
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