Skip to content

🔒 Secure Process Launch and URL Opening#1

Merged
mleem97 merged 2 commits into
mainfrom
security-fix-insecure-process-launch-14022166927548578863
Apr 23, 2026
Merged

🔒 Secure Process Launch and URL Opening#1
mleem97 merged 2 commits into
mainfrom
security-fix-insecure-process-launch-14022166927548578863

Conversation

@mleem97
Copy link
Copy Markdown
Owner

@mleem97 mleem97 commented Apr 23, 2026

🎯 What: Fixed insecure use of Process.Start with UseShellExecute = true for unvalidated or external inputs.

⚠️ Risk: Using UseShellExecute = true with untrusted strings allows the OS shell to execute malicious URI schemes (e.g., javascript:, file://) or unintended file types, potentially leading to arbitrary code execution or information disclosure.

🛡️ Solution:

  • Introduced SafeProcess utility class to centralize safe process and URL handling.
  • Implemented URL scheme validation to permit only http and https.
  • Replaced direct Process.Start calls with Microsoft.Maui.ApplicationModel.Browser.Default.OpenAsync for URLs.
  • Used UseShellExecute = false for internal executable launches (like restarting the app or opening explorer).
  • Improved cross-platform support for opening folders safely.

PR created automatically by Jules for task 14022166927548578863 started by @mleem97

- Implement SafeProcess utility for centralized process management
- Validate URL schemes (http/https only) before opening
- Use Browser.Default.OpenAsync for external links
- Set UseShellExecute = false for internal process launches
- Refactor call sites in SettingsPage, ItemDetailPage, ModManagerPage, EditorPage, and SteamWorkshopService
Copilot AI review requested due to automatic review settings April 23, 2026 04:13
@google-labs-jules
Copy link
Copy Markdown

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

- Implement SafeProcess utility for centralized process management
- Validate URL schemes (http/https only) before opening
- Use Browser.Default.OpenAsync for external links
- Set UseShellExecute = false for internal process launches
- Refactor call sites in SettingsPage, ItemDetailPage, ModManagerPage, EditorPage, and SteamWorkshopService
- Fix CI failure by adding administration: read permission and error handling to runner selection script
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@mleem97 mleem97 merged commit 5e81020 into main Apr 23, 2026
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