fix(pentest): address cubic review findings on finding-context flow#3112
Merged
Conversation
- createReport notes lookup is now best-effort via the shared quiet helper: a DB failure (transient outage or table missing mid-deploy) logs and proceeds with the caller's own context instead of blocking pentest creation - normalizeTargetUrl strips trailing slashes from the path only, so a '/' at the end of a query value is preserved instead of corrupting the finding-context key - PDF appendix wrapper hard-breaks unbroken tokens (long URLs/IDs) that exceed the line width instead of overflowing the margin Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
🎉 This PR is included in version 3.79.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
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.
Fixes the three findings cubic raised on the production deploy PR (#3111) against the pentest finding-context feature (#3110).
Best-effort notes lookup in
createReport— the finding-context query now goes through the same quiet helper the report appendix uses: a DB failure (transient outage, or the table missing mid-deploy before the migration applies) logs and proceeds with the caller's own context instead of blocking pentest creation. Regression test: notes query rejects → run is still created, user-typed context still reaches the provider.normalizeTargetUrlno longer corrupts query values — trailing slashes are stripped from the URL path only, so?next=/portal/keeps its value. Origin-only and path-only targets normalize exactly as before, so existing stored keys for the common cases are unaffected. Regression tests for both query cases.PDF appendix hard-wraps unbroken tokens — notes containing long URLs/IDs are now split at character level when a single token exceeds the line width, instead of overflowing the page margin. Test asserts every wrapped line fits the appendix body width and no characters are lost.
Module suite: 100 passing (4 new tests). Typecheck clean on all touched files.
🤖 Generated with Claude Code
Summary by cubic
Makes the pentest finding-context flow more robust and correct. Runs are no longer blocked by notes lookup failures, URL normalization preserves query values, and PDF notes no longer overflow.
Written for commit 9bf3bb1. Summary will update on new commits.