@@ -47,3 +47,36 @@ If you app needs to download an older patch as part of a rollback,
47
47
installing that patch will count against your monthly patch installs. If you
48
48
have no remaining patch installs, the app will revert to the base release.
49
49
:::
50
+
51
+ ## Patch Integrity and Automatic Rollback
52
+
53
+ Shorebird includes safety features to prevent needing to issue the manual
54
+ rollback of a patch.
55
+
56
+ ` shorebird patch ` also generates a hash of your patch file which is stored
57
+ separately from the patch and checked every time your patch is installed, or
58
+ booted from on the user's device.
59
+
60
+ Customers are also encouraged to use Shorebird's [ patch-signing
61
+ feature] ( https://docs.shorebird.dev/guides/patch-signing/ ) to cryptographically
62
+ sign patch files. This uses the same cryptographic algorithms used in the
63
+ Google and Apple app stores. When enabled, your [ public
64
+ key] ( https://en.wikipedia.org/wiki/Public-key_cryptography ) is included in your
65
+ app bundle and a patch's signature is checked on every install and boot to
66
+ ensure your app can never accept a patch file not signed by your secret key.
67
+
68
+ Finally Shorebird's [ updater] ( https://github.com/shorebirdtech/updater ) includes
69
+ automatic on-device rollback. If for any reason a patch's hash or signature does
70
+ not match, the patch is discarded. If for any reason a patch fails to load into
71
+ the Dart runtime, a patch will be marked "bad" on that device, and the app will
72
+ be automatically rolled back to the latest installed patch.
73
+
74
+ The previous patch file is always kept on disk until at least one successful
75
+ boot is made of the next patch, after which a patch file is automatically
76
+ cleaned up from the user's device to minimize disk usage.
77
+
78
+ All of code which implements these integrity measures is of course open source
79
+ and available for review on [ GitHub] ( https://github.com/shorebirdtech/ ) . An
80
+ overview of our code locations is available under [ Architecture] ( /architecture ) .
81
+
82
+ See also [ Shorebird Public Security Policies] ( https://handbook.shorebird.dev/security/ ) .
0 commit comments