Sub topic 13
Sharing Shortcuts and Reviewing Permissions
This chapter assumes you can build a multi-step shortcut, use variables and Shortcut Input, and have seen the Run Shell Script action. You will learn how to review what a shortcut can touch before you share it, how to share it, and what to check when you receive one from someone else.
Why permissions matter
A shortcut is a small program. It can read files, send messages, call web services and run shell commands. Shortcuts therefore asks you before a shortcut does something sensitive for the first time. The prompt names the action and the thing it wants to reach, such as a folder, a contact list or a website.
The same applies to shortcuts you receive. Importing one does not run it, but running it may trigger these prompts. Read each prompt instead of clicking Allow by reflex.
Review a shortcut before you share it
Open the shortcut in the editor and read it from top to bottom. Check these items.
- Personal data. Look for hard-coded file paths, email addresses, phone numbers, API keys and passwords typed into Text actions. Anyone who receives the shortcut can read them.
- Actions that reach outside the shortcut. Find actions that send messages, get contents of a URL, delete files or run a shell script.
- Import Questions. If a value differs for each person, such as a folder or an address, replace the hard-coded value with a question the recipient answers on import.
- Details settings. The Details tab shows where the shortcut can appear: the menu bar, Quick Actions in Finder, and the Dock. Turn off the places you do not intend.
The table below shows common actions and what to check for each.
| Action | What it can reach | What to check before sharing |
|---|---|---|
| Get Contents of URL | A web server | Is the address correct, and is any key embedded in it? |
| Run Shell Script | Files and commands on the Mac | Does the script use absolute paths from your account? |
| Delete Files | Files on disk | Is the target limited to what the recipient expects? |
| Send Message | Messages and contacts | Is a recipient hard-coded? |
Share a shortcut
In the shortcut editor, click the Share button. You can then choose one of these routes:
- Messages or Mail. The recipient receives a link or a file they can open.
- Copy iCloud Link. This creates a link that anyone who has it can use to add the shortcut. Anyone who gets the link can read the shortcut's contents, so treat the link as public.
- Export as File. This saves a
.shortcutfile. A file is useful when you want to review or archive the shortcut, or send it without iCloud.
The recipient opens the link or file, and Shortcuts shows a preview. They can read the actions before choosing Add Shortcut. If you used Import Questions, the app asks those questions at this step.
Shortcuts can only be added from sources the user opens. For shortcuts from outside Apple's gallery, macOS can ask for permission to run them, and the setting that governs this is in Shortcuts settings under Advanced.
Receive a shortcut safely
Follow the same review in reverse.
- Open the preview and read every action before adding it.
- Look for Run Shell Script, Get Contents of URL and file-deleting actions.
- Run it once with test data, not your real files.
- Read each permission prompt. Choose Don't Allow if the request does not match what the shortcut claims to do.
Manage permissions afterwards
Permissions you granted are not permanent. Each shortcut's privacy settings can be reviewed in the shortcut's details, where you can remove approvals so the app asks again. System-level access, such as Files & Folders or Automation, is in System Settings under Privacy & Security. Check there if a shortcut that used to work now fails with a permission error.
Exercise
You built a shortcut that runs a shell script against /Users/sam/Reports and emails the result to your manager. You want to send it to a coworker. Name two changes to make before sharing.
Show answer
Replace the hard-coded folder path with an Import Question or an input the coworker chooses, because /Users/sam/Reports does not exist on their Mac. Remove or replace the hard-coded manager email address, for example with an Import Question or an Ask for Input action, so the coworker does not email your manager by mistake. You should also check the script for any secrets before sharing.
Exercise
A friend sends you an iCloud link to a shortcut. What should you do before you run it for the first time?
Show answer
Open the preview and read every action. Look closely at Run Shell Script, Get Contents of URL and any action that deletes or sends. Run it with test data and read each permission prompt before choosing Allow.