fix(security): restrict external links to web URLs - #23
Merged
Conversation
📝 WalkthroughWalkthroughChangesA shared External link safety
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant UI
participant ExternalLinkLauncher
participant Shell
UI->>ExternalLinkLauncher: Open(url)
ExternalLinkLauncher->>ExternalLinkLauncher: Validate absolute HTTP(S) URL
ExternalLinkLauncher->>Shell: Start validated URL
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
This comment was marked as resolved.
This comment was marked as resolved.
DysektAI
marked this pull request as ready for review
July 27, 2026 16:36
This comment was marked as resolved.
This comment was marked as resolved.
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.
What changed
ExternalLinkLauncherentry point that accepts only absolute HTTP(S) URLsWhy
Several link targets originate in remote catalog data and were passed directly to Windows
ShellExecute. That permits non-web targets such as local executables, UNC paths, and registered protocol handlers to reach the shell.Impact
Normal HTTP(S) links continue opening in the default browser. Unsafe or malformed targets are logged and ignored without taking down the WebView render path.
Validation
dotnet tool restoredotnet csharpier check .dotnet build RatScanner.sln --no-restore— 0 warnings, 0 errorsdotnet test RatScanner.sln --no-build --no-restore— 246 passedSummary by cubic
Restricts external links to absolute HTTP(S) URLs and routes all opens through a safe
ExternalLinkLauncher. Strengthens logging by redacting rejected targets and sanitizing accepted ones to prevent data leaks.ExternalLinkLauncherwith strict URL validation and safe open.Written for commit cf2dbb8. Summary will update on new commits.