Skip to main content
spinoza
October 9, 2023
Question

How to convert-all-http-links-to-https?

  • October 9, 2023
  • 5 replies
  • 129 views

Reopening this old thread, because the feature has not been implemented.

https://1password.community/discussion/92530/convert-all-http-links-to-https

Has anyone here tried writing an AppleScript / Shortcut to do this in the 1PW desktop app?


1Password Version: Not Provided
Extension Version: Not Provided
OS Version: Not Provided
Browser: Not Provided

5 replies

spinoza
spinozaAuthor
October 9, 2023

Here is what ChatGPT 4 suggests:

Creating an AppleScript or a Shortcut to convert all HTTP links to HTTPS in the 1Password macOS desktop app is a complex task that involves interacting with the 1Password app's interface or its data. Unfortunately, 1Password doesn't provide a native AppleScript API, and directly manipulating its data could be risky and potentially compromise the security of your stored information.

However, here are some alternative approaches you could consider:

Certainly, let's delve into each option in more detail:

1. Manual Method

Steps:

  1. Backup Data: Before making any changes, backup your 1Password data.
  2. Export Data: Open 1Password, go to File > Export > All Items... and choose CSV format.
  3. Edit CSV: Open the exported CSV file in a text editor like Sublime Text or a spreadsheet program like Microsoft Excel.
  4. Find and Replace: Use the find and replace function to replace all instances of http:// with https://.
  5. Import Data: Go back to 1Password and import the modified CSV via File > Import.

Risks:

  • You might accidentally modify other data.
  • Importing the data incorrectly could result in data loss or corruption.

Citation:

2. Using 1Password CLI

Steps:

  1. Install CLI: Download and install the 1Password CLI.
  2. Authenticate: Authenticate your 1Password account with the CLI.
  3. Fetch and Update Items: Use the CLI commands to fetch, modify, and update items.

Sample Script (Pseudo-code):

```bash

Authenticate

op signin my.1password.com

Fetch all Login items

items=$(op list items --categories Login)

Loop through each item

for item in $items; do
# Get item details
details=$(op get item $item)

# Replace http with https in details

# Update the item
op edit item $item $modified_details
done
```

Risks:

  • A mistake in the script could result in data loss or corruption.

Citation:

3. Using Keyboard Maestro

Steps:

  1. Install Keyboard Maestro: If you haven't already, install Keyboard Maestro.
  2. Create Macro: Create a new macro and add actions to automate the UI of 1Password.
  3. Test: Test the macro on a small set of data first.

Risks:

  • Automating UI interactions can be error-prone and might not work if the UI changes.

Citation:

Disclaimer: These methods come with risks, especially when dealing with sensitive data like passwords. Always backup your data and test thoroughly before running any script or automation.

spinoza
spinozaAuthor
October 9, 2023

Here's the same answer, with a bit more detail:

Let's go into more detail for each method:

1. Manual Method

Detailed Steps:

  1. Backup Data:

    • Open 1Password.
    • Go to File > Backup to create a backup of your data.
  2. Export Data:

    • Go to File > Export > All Items....
    • Choose the CSV format and save the file to a secure location.
  3. Edit CSV:

  4. Find and Replace:

    • Use the find and replace function (Ctrl + H or Cmd + H) to replace all instances of http:// with https://.
  5. Import Data:

    • Open 1Password.
    • Go to File > Import and select the modified CSV file.

Citation:


2. Using 1Password CLI

Detailed Steps:

  1. Install CLI:

    • Download the 1Password CLI and follow the installation instructions.
  2. Authenticate:

    • Open Terminal and run op signin my.1password.com to authenticate.
  3. Fetch and Update Items:

    • Use the CLI commands to fetch, modify, and update items.

Sample Script (Pseudo-code):

```bash

Authenticate

op signin my.1password.com

Fetch all Login items

items=$(op list items --categories Login)

Loop through each item

for item in $items; do
# Get item details
details=$(op get item $item)

# Replace http with https in details

# Update the item
op edit item $item $modified_details
done
```

Citation:


3. Using Keyboard Maestro

Detailed Steps:

  1. Install Keyboard Maestro:

  2. Create Macro:

    • Open Keyboard Maestro and create a new macro.
    • Add actions to simulate mouse clicks and keyboard inputs to navigate through the 1Password UI.
  3. Test:

    • Run the macro on a small set of data to ensure it works as expected.

Citation:


Disclaimer: Please proceed with caution, especially when dealing with sensitive data. Always backup your data and test any script or automation on a small subset first.

1P_Dave
1Password Employee
October 11, 2023

Hello @spinoza! 👋

Thanks for the question. There isn't a way to change HTTP links to HTTPS links automatically, 1Password requires that you review and consent to changing the link in each individual item. With 1Password 8 the process is as follows:

  1. Open and unlock 1Password 8.
  2. Click Watchtower in the sidebar.
  3. Click Show Items under Unsecured websites.
  4. Click Use HTTPS in the banner inside of items that you wish to change:

-Dave

spinoza
spinozaAuthor
October 19, 2023

Understood. Is there a reason we shouldn't be allowed to select multiple items to upgrade? I still have 300 to do!

1P_Dave
1Password Employee
October 20, 2023

@spinoza

I've filed a feature request on your behalf to have our product team look into adding a way to bulk modify unsecured websites. Thank you for the continued feedback to help us make 1Password even better and more useful. 🙂

For now, I suggest that you slowly edit your items individually since I'm not able to say when, or even if, such as a feature would be added to 1Password in the future.

-Dave

ref: PB-36340857