Lucas Fernandes Nogueira
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Versions and GitHub Sync Note Insights Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       owned this note    owned this note      
    Published Linked with GitHub
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    # 1.3.0 announcement The Tauri team is excited to announce the 1.3 release. This version includes security improvements, new features and important bug fixes. <!--truncate--> * [Upgrading](#Upgrading) * [Changes](#What%E2%80%99s-in-130) * [Audit](#Tauri-13-Audit) ## Upgrading Make sure to update both NPM and Cargo dependencies to the 1.3.0 release. You can update the NPM dependencies with: <Tabs groupId="package-manager"> <TabItem value="npm"> ```shell npm install @tauri-apps/cli@latest @tauri-apps/api@latest ``` </TabItem> <TabItem value="Yarn Classic"> ```shell yarn upgrade @tauri-apps/cli @tauri-apps/api --latest ``` </TabItem> <TabItem value="Yarn Berry"> ```shell yarn up @tauri-apps/cli @tauri-apps/api ``` </TabItem> <TabItem value="pnpm"> ```shell pnpm update @tauri-apps/cli @tauri-apps/api --latest ``` </TabItem> </Tabs> To update the Cargo dependencies, run the following in the `src-tauri` folder: ```shell cargo update ``` ## What's in 1.3.0 ### NSIS The Tauri CLI can now create Windows application installers using NSIS. This new bundle target is also available in macOS and Linux as an experiment feature, so you can cross-compile your Windows installer. ### Tauri 1.3 Audit The internal audit was performed by [@tweidinger](https://github.com/tweidinger) and [@chippers](https://github.com/chippers), who are involved in most security topics at the Tauri project. It was performed during paid time at [CrabNebula](https://crabnebula.dev/?utm_campaign=tauri-1-3&utm_source=tauri) and we are grateful to be able to spend parts of our work time contributing to the open source project and making it a more secure environment :heart:. We manually audited over 45 [PRs](https://github.com/tauri-apps/tauri/pull/5815). Some PRs (eg. [#5544](https://github.com/tauri-apps/tauri/pull/5544)) lead us to diving into very old RFCs[^rfc6068][^rfc3966], NSIS documentation[^nsis] (eg. [#6039](https://github.com/tauri-apps/tauri/pull/6039)) and many other external resources. We documented questions, notes and findings in markdown files and shared these notes with the responsible developers to ensure appropriate fixes. The changes from a security perspective and findings of the audit are summarized in the following sub-sections. [^rfc6068]: [rfc6068](https://www.rfc-editor.org/rfc/rfc6068#page-12) [^rfc3966]: [rfc3966](https://www.rfc-editor.org/rfc/rfc3966#section-11) [^nsis]: [https://nsis.sourceforge.io/Docs/](https://nsis.sourceforge.io/Docs/) ### External API Access [#5918](https://github.com/tauri-apps/tauri/pull/5918) This was by far the most impactful and time consuming PR we investigated. This PR introduces a streamlined way for applications to allow external domains access to the Tauri IPC layer[^ipc] and usage majorly impacts the security model of a Tauri application. Security impact[^impact] depends on exposure[^exposure] of the feature, enabled Tauri commands and the capabilities of an adversary[^adversary]. We consider this new feature similar to driving a very fast race car without any safety features enabled and urge developers to *very very carefully* consider if they really need this exposure. Before this addition was merged, a semi-known vulnerability was (ab)used by application developers to achieve the same functionality. To make the whole community aware of this risk we published a [security advisory](https://github.com/tauri-apps/tauri/security/advisories/GHSA-4wm2-cwcf-wwvp) to give a heads up. Applications are affected if they allow users to navigate to arbitrary domains or have an open redirect vulnerability[^open-redirect]. If you implement such a feature you should update to the 1.3 Release as fast as possible. The initial PR changes allowed wildcards (`https://*`) and glob patterns, which we believe are helpful but shouldn't be exposed to all Tauri developers. We concluded that the risk of over-exposure, like the allow list toggle to enable all Tauri API endpoints, does not justify this permissive exposure. The final implementation allows to configure specified *(sub)domains*[^domain] (eg: `example.com`) to gain remote access to the Tauri IPC. The few edge use cases, which require wildcards or even further exposure can be implemented by custom rust code which is able to dynamically modify the IPC access. We now expose this remote IPC scope in a similar fashion as the `fs` or `http` scope. Assuming a **fully trusted** web service on `https://trusted.example` it is now possible to configure the security scope to allow certain windows or even plugins access to custom implemented commands and optionally the inbuilt Tauri API: ```json "security": { "dangerousRemoteUrlIpcAccess": [ { "windows": ["main", "settings"], "domain": "trusted.example", "plugins": ["trusted-plugin"], "enableTauriAPI": false }, ], } ``` Shared domains **MUST NOT** be used for this in any circumstances. We do not limit access to paths or specific files. You can only scope with **trusted** *(sub)domains*[^domain]. Another very risky catch is that developers must be sure that the domain ownership does not change over the lifetime of the application. Domain takeover could lead to compromised user devices. [^ipc]: *Inter-Process Communication*, in this instance the communication between the Tauri core and the frontend code run inside the webview. [^exposure]: *Exposure*: Describes the exposed scope items of this feature to either an user or adversary. It is possible to restrict exposure to only certain domains, windows or only to custom implemented commands. [^adversary]: *Adversary Capabilities*: Which kind of privileges has the adversary? Can range from tricking user into entering malicious input to code execution in the frontend via cross-site-scripting (which is the highest privilege for frontend code in our case). Common capabilities are described in the [OWASP documentation](https://owasp.org/www-community/attacks/). [^impact]: *impact*: What is the theoretical biggest impact of this threat combination? This highly depends on correct scoping of Tauri API endpoints and hardening of custom implemented Tauri commands. [^domain]: [Reqwest Reference](https://docs.rs/reqwest/latest/reqwest/struct.Url.html#method.domain) [^open-redirect]: *An application can be exploited if it parses user input for making an URL redirection decision, which is then not properly validated.* [Wikipedia Source](https://en.wikipedia.org/wiki/Open_redirect) ### Browser Arguments [#5799](https://github.com/tauri-apps/tauri/pull/5799) Due to certain webview features not enabled nor being accessible, a community contribution introduced the possibility to add additional arguments to the webview process, which is created in a new window. This feature was exposed to the frontend in the `window` endpoint. We found that this exposure was highly risky, as most webviews have very impactful features and flags that can be allowed via the process arguments. All of the following threat model assumptions are based on the Tauri window creation being allowed in the `allowlist` of the `tauri.conf` and therefore exposed to the frontend. This PR affects Windows only, therefore there is no impact on the other supported operating systems. An adversary with the capabilities to create windows and pass command line arguments to the webview can elevate their privileges to escape the strict sandboxing of Tauri and the webview. The flags allow to enable several dangerous webview features, from loading profiles outside of the current default profile folder (stealing browser sessions from the device) to disabling security measurements of the webview (eg: certificate validation, sandboxing, webdriver/headless mode, device management endpoints, ...). We found an old but gold and still unique documentation reference at [https://peter.sh/experiments/chromium-command-line-switches/](https://peter.sh/experiments/chromium-command-line-switches/), which helped us understand possible risks on Windows, as the Webview2 uses the same flags. The feature was then changed to be only exposed on the rust side. Tauri application developers can use this to implement custom commands to invoke webview windows with use case specific arguments. ### Possible ZipSlip [#4674](https://github.com/tauri-apps/tauri/pull/4674) We found that the components to extract remote bundler files like the Webview2 installer were manually extracting single files with the [`extract_zip`](https://github.com/tauri-apps/tauri/blob/d1179c78e2ce04067461461868f66d2020802f4b/tooling/bundler/src/bundle/windows/util.rs#L116) function, which uses [`ZipFile::name()`](https://docs.rs/zip/0.6/zip/read/struct.ZipFile.html#method.name) instead of [`ZipFile::enclosed_name()`](https://docs.rs/zip/0.6/zip/read/struct.ZipFile.html#method.enclosed_name) as recommended in the documentation. Files which had names like `../../../../foo.sh` could be extracted outside of the intended directory on the filesystem. This kind of vulnerability is called ZipSlip[^zipslip]. As the function was only used on verified and trusted files the impact here was nearly zero. Regardless we changed the implementation to facilitate the proper extraction method. [^zipslip]: [Original Blogpost](https://security.snyk.io/research/zip-slip-vulnerability) ### Bundler Hardening [#6039](https://github.com/tauri-apps/tauri/pull/6039) The bundler was not escaping content passed to the [`handlebars::Handlebars::render()`](https://github.com/tauri-apps/tauri/blob/35b587c830140609004732d713b8055f38d643d8/tooling/bundler/src/bundle/windows/nsis.rs#L346), which could cause unwanted code execution during the bundler phase. This was also a low impact issue but was promptly fixed. ### Other changes #### New - `additional_browser_args` option when creating windows [#5799](https://github.com/tauri-apps/tauri/pull/5799) - Add `is_minimized()` window method. [#5618](https://github.com/tauri-apps/tauri/pull/5618) - Add `title` getter on window. [#5515](https://github.com/tauri-apps/tauri/pull/5515) - content protection APIs [#5513](https://github.com/tauri-apps/tauri/pull/5513) - Added `Builder::device_event_filter` and `App::set_device_event_filter` methods. [#5562](https://github.com/tauri-apps/tauri/pull/5562) - Add `WindowsAttributes::app_manifest` to specify the application manifest on Windows. [#5730](https://github.com/tauri-apps/tauri/pull/5730) - Add support for Cargo's workspace inheritance. [#5775](https://github.com/tauri-apps/tauri/pull/5775) [#6144](https://github.com/tauri-apps/tauri/pull/6144) - Added window's `url()` getter. [#5914](https://github.com/tauri-apps/tauri/pull/5914) - Added `Window::on_navigation`. [#5686](https://github.com/tauri-apps/tauri/pull/5686) - Allow setting the text of the dialog buttons. [#4383](https://github.com/tauri-apps/tauri/pull/4383) - Implement `SystemTray::with_tooltip` and `SystemTrayHandle::set_tooltip` for Windows and macOS. [#5938](https://github.com/tauri-apps/tauri/pull/5938) - Add dylib support to `tauri.bundle.macOS.frameworks`. [#5732](https://github.com/tauri-apps/tauri/pull/5732) #### Enhancements - On Windows, the `msi` installer's `Launch App` checkbox will be checked by default. [#5871](https://github.com/tauri-apps/tauri/pull/5871) - Add `--png` option for the `icon` command to generate custom icon sizes. [#5246](https://github.com/tauri-apps/tauri/pull/5246) - On Windows, change webview theme based on Window theme for more accurate `prefers-color-scheme` support. [#5874](https://github.com/tauri-apps/tauri/pull/5874) - Remove default features from Cargo.toml template. [#6074](https://github.com/tauri-apps/tauri/pull/6074) - Add a method to the `WindowBuilder` struct to recreate windows from tauri.conf.json configurations.[#6073](https://github.com/tauri-apps/tauri/pull/6073) - Improve the error message when `rustc` couldn't be found. [#6021](https://github.com/tauri-apps/tauri/pull/6021) - Added support for pre-release identifiers and build numbers for the `.msi` bundle target. Only one of each can be used and it must be numeric only. The version must still be semver compatible according to https://semver.org/. [#6096](https://github.com/tauri-apps/tauri/pull/6096) - Add `--ci` flag and respect the `CI` environment variable on the `signer generate` command. In this case the default password will be an empty string and the CLI will not prompt for a value. [#6097](https://github.com/tauri-apps/tauri/pull/6097) - Skip the password prompt on the build command when `TAURI_KEY_PASSWORD` environment variable is empty and the `--ci` argument is provided or the `CI` environment variable is set. [d4f89af18d69fd95a4d8a1ede8442547c6a6d0ee](https://github.com/tauri-apps/tauri/commit/d4f89af18d69fd95a4d8a1ede8442547c6a6d0ee) #### Fixes - Fix `tauri info` panicking when parsing crates version on a newly created project without a `Cargo.lock` file. [#5873](https://github.com/tauri-apps/tauri/pull/5873) - Fix building apps with unicode characters in their `productName`. [#5872](https://github.com/tauri-apps/tauri/pull/5872) - Sync `__TAURI_METADATA__.__windows` across all windows. [#5615](https://github.com/tauri-apps/tauri/pull/5615) - Fix resize glitch when double clicking a custom titlebar in the top resize area. [#5966](https://github.com/tauri-apps/tauri/pull/5966) - Disable cursor mouse events on Linux. [#6025](https://github.com/tauri-apps/tauri/pull/6025) - Fix serialization of js `Map` when used in `invoke`. [#6099](https://github.com/tauri-apps/tauri/pull/6099)

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully