|
| 1 | +# Security Policy |
| 2 | + |
| 3 | +**Do not report security vulnerabilities through public GitHub issues.** |
| 4 | + |
| 5 | +**Please use the [Private Vulnerability Disclosure](https://docs.github.com/en/code-security/security-advisories/guidance-on-reporting-and-writing-information-about-vulnerabilities/privately-reporting-a-security-vulnerability#privately-reporting-a-security-vulnerability) feature of GitHub.** |
| 6 | + |
| 7 | +Include as much of the following information: |
| 8 | + |
| 9 | +- Type of issue (e.g. improper input parsing, privilege escalation, etc.) |
| 10 | +- The location of the affected source code (tag/branch/commit or direct URL) |
| 11 | +- Any special configuration required to reproduce the issue |
| 12 | +- The distribution affected or used to help us with reproduction of the issue |
| 13 | +- Step-by-step instructions to reproduce the issue |
| 14 | +- Ideally a reproduction repository |
| 15 | +- Impact of the issue, including how an attacker might exploit the issue |
| 16 | + |
| 17 | +We prefer to receive reports in English. |
| 18 | + |
| 19 | +## Contact |
| 20 | + |
| 21 | +Please disclose a vulnerability or security relevant issue here: [https://github.com/tauri-apps/plugins-workspace/security/advisories/new](https://github.com/tauri-apps/plugins-workspace/security/advisories/new). |
| 22 | + |
| 23 | +Alternatively, you can also contact us by email via [security@tauri.app](mailto:security@tauri.app). |
| 24 | + |
| 25 | +## Threat Model |
| 26 | + |
| 27 | +As there are only the `scan` and `cancel` commands exposed to the frontend, |
| 28 | +there is no additional risk or exposure of additional information. |
| 29 | +Only barcodes are passed and no raw camera access is used, which means no images are available to the frontend. |
| 30 | + |
| 31 | +The application is only usable on iOS and Android and therefore the specific mobile operating system security boundaries need to be considered. |
| 32 | + |
| 33 | +### Security Assumptions |
| 34 | + |
| 35 | +- The QR code parsing into a link/text is trusted and correctly handled by the mobile operating system |
| 36 | +- The link itself is untrusted and additional validation/sanitization needs to be handled by the app developer |
| 37 | +- The camera is not passing images to the app |
| 38 | +- The camera permission is granted at first use by the user and can be revoked at any time |
| 39 | +- The Android manifest also states that the camera permission is required |
| 40 | + |
| 41 | +### Threats |
| 42 | + |
| 43 | +#### Silent Interaction |
| 44 | + |
| 45 | +##### When is it possible? |
| 46 | + |
| 47 | +The following threat is either caused by a malicious developer, which has further implications and should be considered as a full compromise of an application or system, or by |
| 48 | +compromise of the application frontend. In the second case there are several impact minimization methods (e.g. the CSP) and if all of these fail the possible risk could occur. |
| 49 | +Therefore it is unlikely to occur in most cases but should be considered when using this plugin. |
| 50 | + |
| 51 | +##### What is possible? |
| 52 | + |
| 53 | +The camera has two modes. The first one is where the user can see the background camera image and no further interaction is possible. |
| 54 | +The second mode allows the developer to assist the user and add a transparent overlay to the image, providing hints or additional information (like a link preview). |
| 55 | +The overlay could be made non-transparent by the application frontend and as long as the app is open (and in some cases) it could read QR codes in range of the camera lense. |
| 56 | + |
| 57 | + |
| 58 | +#### Out Of Scope |
| 59 | + |
| 60 | +- Exploits in the operating system QR code parsing functionality |
| 61 | +- Exploits based on the string passed to the application using this plugin |
| 62 | +- Continous camera/QR scan usage even when application is in background |
| 63 | + |
| 64 | +## Best Practices |
| 65 | + |
| 66 | +There is no additional exposure aside from reading barcodes in the webview and there are no specific best practices for secure usage. |
0 commit comments