Skip to content

🛡️ Sentinel: [Security Improvement] Add dangerous URL schemes to blocklist#61

Merged
NSEvent merged 1 commit into
mainfrom
sentinel-add-url-scheme-blocklist-5581512345831778940
Jun 21, 2026
Merged

🛡️ Sentinel: [Security Improvement] Add dangerous URL schemes to blocklist#61
NSEvent merged 1 commit into
mainfrom
sentinel-add-url-scheme-blocklist-5581512345831778940

Conversation

@NSEvent

@NSEvent NSEvent commented Jun 21, 2026

Copy link
Copy Markdown
Owner

🛡️ Sentinel: [Security Improvement] Add dangerous URL schemes to blocklist

Severity: LOW
Vulnerability: Local/network execution apps like shortcuts and terminal were allowed in TriggerKit's URL opening commands.
Impact: Potential for arbitrary application execution or sandbox escape if a malicious automation script uses shortcuts://run-shortcut?name=Malicious or terminal://.
Fix: Expanded AutomationSecurityPolicy.blockedURLSchemes blocklist to include shortcuts, terminal, ssh, telnet, vnc, ftp, smb, and afp.
Verification: Code statically analyzed to confirm addition to the set. Tests are assumed stable based on syntax check.


PR created automatically by Jules for task 5581512345831778940 started by @NSEvent

Summary by CodeRabbit

  • Bug Fixes

    • Expanded the URL handler scheme blocklist to include additional protocols—shortcuts, terminal, ssh, telnet, vnc, ftp, smb, and afp—alongside previously blocked schemes to strengthen security validation.
  • Documentation

    • Updated security prevention guidance with comprehensive blocklist documentation detailing the expanded set of untrusted URL handler schemes now subject to validation checks.

…klist

Severity: LOW
Vulnerability: Local/network execution apps like `shortcuts` and `terminal` were allowed in TriggerKit's URL opening commands.
Impact: Potential for arbitrary application execution or sandbox escape if a malicious automation script uses `shortcuts://run-shortcut?name=Malicious` or `terminal://`.
Fix: Expanded `AutomationSecurityPolicy.blockedURLSchemes` blocklist to include `shortcuts`, `terminal`, `ssh`, `telnet`, `vnc`, `ftp`, `smb`, and `afp`.
Verification: Code statically analyzed to confirm addition to the set. Tests are assumed stable based on syntax check.

Co-authored-by: NSEvent <44446865+NSEvent@users.noreply.github.com>
@google-labs-jules

Copy link
Copy Markdown
Contributor

👋 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.

@coderabbitai

coderabbitai Bot commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

AutomationSecurityPolicy.blockedURLSchemes is expanded from 2 entries to 10 by adding shortcuts, terminal, ssh, telnet, vnc, ftp, smb, and afp. The .Jules/sentinel.md changelog receives a corresponding dated entry documenting the broader blocklist.

Changes

URL Scheme Blocklist Expansion

Layer / File(s) Summary
Expanded blocked URL schemes set and sentinel entry
TriggerKit/Sources/TriggerKitCore/AutomationProgram+Validation.swift, .Jules/sentinel.md
AutomationSecurityPolicy.blockedURLSchemes is rewritten as a multiline set adding shortcuts, terminal, ssh, telnet, vnc, ftp, smb, and afp alongside the original file and x-apple.systempreferences; the sentinel log documents the expanded mitigation with a 2026-06-25 entry.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

  • NSEvent/xbox-controller-mapper#60: Introduced the original AutomationSecurityPolicy.blockedURLSchemes set in AutomationProgram+Validation.swift that this PR directly extends with additional schemes.

Poem

🐇 Hop, hop, I blocked the path,
No ssh or ftp shall pass my wrath!
shortcuts, telnet, vnc — denied,
smb and afp locked up inside.
The rabbit guards each URL gate,
No sneaky scheme shall infiltrate! 🔒

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the main change: expanding a blocklist of dangerous URL schemes for security purposes, which aligns with the primary objective of adding multiple dangerous schemes to AutomationSecurityPolicy.blockedURLSchemes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch sentinel-add-url-scheme-blocklist-5581512345831778940

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 and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.Jules/sentinel.md:
- Line 13: The changelog entry header on line 13 contains a future date of
2026-06-25 which is after the current date of June 21, 2026. Update the date in
the entry "## 2026-06-25 - [Sandbox Escape via URL Handler Scheme expanded]" to
use the actual merge or log date that is on or before June 21, 2026, ensuring
the changelog entry reflects the correct timeline for audit purposes.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: c14e2daa-6182-42cd-a321-f81794245e88

📥 Commits

Reviewing files that changed from the base of the PR and between 3c9f822 and 7ea59fd.

📒 Files selected for processing (2)
  • .Jules/sentinel.md
  • TriggerKit/Sources/TriggerKitCore/AutomationProgram+Validation.swift

Comment thread .Jules/sentinel.md
**Vulnerability:** Execution frameworks allowed untrusted automation configurations to open URLs with schemes like `file` and `x-apple.systempreferences`, effectively allowing arbitrary local execution or sandbox escapes via `NSWorkspace.shared.open`.
**Learning:** `NSWorkspace.shared.open` delegates URL handling directly to the OS, executing system preferences panes or opening arbitrary files. Bounding allowed schemes is critical, and a strict blocklist is required when an allowlist is too restrictive for general automation.
**Prevention:** Apply a strict blocklist for URL handlers (e.g. `file`, `x-apple.systempreferences`) at the core execution and validation levels when evaluating untrusted URL strings.
## 2026-06-25 - [Sandbox Escape via URL Handler Scheme expanded]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Use a non-future changelog date for this entry.

Line 13 is dated 2026-06-25, which is in the future relative to June 21, 2026; please align it to the actual merge/log date to avoid audit confusion.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.Jules/sentinel.md at line 13, The changelog entry header on line 13
contains a future date of 2026-06-25 which is after the current date of June 21,
2026. Update the date in the entry "## 2026-06-25 - [Sandbox Escape via URL
Handler Scheme expanded]" to use the actual merge or log date that is on or
before June 21, 2026, ensuring the changelog entry reflects the correct timeline
for audit purposes.

@NSEvent NSEvent merged commit 78ad10c into main Jun 21, 2026
2 checks passed
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