{"playbook":"Desktop apps and extensions","url":"https://agentwranglers.se/playbook/desktop-apps","updated":"2026-10-27","license":"https://creativecommons.org/licenses/by/4.0/","credit":"Required by the licence: credit Agent Wranglers with a link to the rule or playbook you used.","ids":"Each rule has an id, such as PAY-14, that never changes. Open a rule by its id at /r/PAY-14. Its revision changes whenever its content changes.","how":"Each rule's How and Measured text is on its own page: add .md to its url.","rules":[{"id":"DSK-1","revision":"df2d4987f2a2","updated":"2026-10-22","name":"Sign and notarise every Mac build","level":"Required","risk":"outage","rule":"Sign every Mac app, disk image and installer you hand out with a Developer ID certificate, the hardened runtime and a secure timestamp. Notarise it with Apple and staple the ticket before release.","check":"On a clean Mac, download the release from its public address and run `spctl --assess --type execute -vv` on the app. It answers `accepted` with `source=Notarized Developer ID`. `xcrun stapler validate` passes on every disk image and installer package.","check_type":"command","url":"https://agentwranglers.se/playbook/desktop-apps/signing-and-notarisation/mac-notarisation","related":["/playbook/mobile-apps/signing-and-release/sign-in-ci","/playbook/desktop-apps/signing-and-notarisation/mac-entitlements","/playbook/desktop-apps/browser-extensions/safari-extension-packaging","/playbook/desktop-apps/installs-and-local-privileges/safe-library-loading"],"sources":["https://developer.apple.com/documentation/security/notarizing-macos-software-before-distribution"]},{"id":"DSK-2","revision":"ac287cb0f23d","updated":"2026-10-27","name":"Sign every Windows file with a SHA-256 signature and a timestamp","level":"Required","risk":"outage","review_by":"2027-03-01","rule":"Sign every `.exe`, `.dll`, `.msi` and `.msix` you hand out with Authenticode, using SHA-256 and an RFC 3161 timestamp. Sign each release with the same publisher identity.","check":"In CI, `signtool verify /pa /v` passes on every `.exe`, `.dll`, `.msi` and `.msix` file in the release, and its output shows a timestamp. The signer name is the same as in the last release. A test that sets the clock past the certificate's end date still finds a valid signature.","check_type":"command","url":"https://agentwranglers.se/playbook/desktop-apps/signing-and-notarisation/windows-authenticode","related":["/playbook/desktop-apps/signing-and-notarisation/signing-keys-in-hardware"],"sources":["https://learn.microsoft.com/en-us/windows/win32/seccrypto/time-stamping-authenticode-signatures","https://learn.microsoft.com/en-us/windows/apps/package-and-deploy/code-signing-options"]},{"id":"DSK-3","revision":"ba2ac41b942d","updated":"2026-10-27","name":"Keep code signing keys in hardware or a signing service","level":"Required","risk":"takeover","review_by":"2027-03-01","rule":"Keep every private key that signs your software in a hardware security module, a hardware token or a cloud signing service. No key exists as a file on a laptop or in the repository.","check":"A secret scanner finds no `.p12`, `.pfx` or `.pem` signing key in the repository history. The signing service's log lists only the release job as a signer over the last 90 days. A written revocation runbook exists and names the person who runs it.","check_type":"static","url":"https://agentwranglers.se/playbook/desktop-apps/signing-and-notarisation/signing-keys-in-hardware","related":["/playbook/desktop-apps/signing-and-notarisation/windows-authenticode","/playbook/engineering/running-in-production/secrets-store","/playbook/engineering/version-control-and-review/code-host-accounts","/playbook/desktop-apps/signing-and-notarisation/linux-package-signing","/playbook/desktop-apps/update-integrity/signed-updates"],"sources":["https://cabforum.org/working-groups/code-signing/requirements/","https://cabforum.org/2025/11/17/ballot-csc-31-maximum-validity-reduction"]},{"id":"DSK-4","revision":"a2c4e2072e2b","updated":"2026-10-27","name":"Check every signature in CI before you publish","level":"Recommended","rule":"After signing, verify every file of the release with each platform's own tool in CI. Stop the release when any file fails, and publish only the files that passed.","check":"Remove the signature from one helper file in a test build. The release job fails and names the file. The checksums on the download page match the files in the store or bucket.","check_type":"manual","url":"https://agentwranglers.se/playbook/desktop-apps/signing-and-notarisation/verify-before-publish","related":["/playbook/engineering/ci-and-supply-chain/build-in-ci-and-verify","/playbook/engineering/ci-and-supply-chain/immutable-releases","/playbook/desktop-apps/web-code-inside-desktop-apps/electron-fuses"],"sources":["https://learn.microsoft.com/en-us/windows/win32/seccrypto/signtool","https://developer.apple.com/library/archive/technotes/tn2206/_index.html"]},{"id":"DSK-5","revision":"8679fba90a50","updated":"2026-10-22","name":"Sign Linux packages and the repository that serves them","level":"Recommended","rule":"Sign every `.deb` or `.rpm` repository you run with a key kept as [keep code signing keys in hardware or a signing service](https://agentwranglers.se/playbook/desktop-apps/signing-and-notarisation/signing-keys-in-hardware) says. Tell users to add the key for your repository only.","check":"`apt-get update` on a clean machine that follows your install steps prints no warning about an unsigned repository. The install steps embed the key in the `.sources` file or put it in `/etc/apt/keyrings/` or `/usr/share/keyrings/`, and name it with `signed-by`, never with `apt-key`.","check_type":"manual","url":"https://agentwranglers.se/playbook/desktop-apps/signing-and-notarisation/linux-package-signing","related":["/playbook/desktop-apps/signing-and-notarisation/signing-keys-in-hardware","/playbook/desktop-apps/installs-and-local-privileges/linux-sandbox-permissions"],"sources":["https://manpages.debian.org/trixie/apt/apt-secure.8.en.html"]},{"id":"DSK-33","revision":"45a45e4e4607","updated":"2026-10-27","name":"Keep hardened runtime exceptions to the few the app uses","level":"Recommended","rule":"Sign Mac apps with a written list of hardened runtime exceptions and resource entitlements, each with a reason. Ship no exception the app does not use, and put exceptions only on executables, never on libraries.","check":"A CI step runs `codesign -d --entitlements - --xml` on each executable in the release and compares the keys with the approved list in the repository. It fails on any key the list does not hold, and on `get-task-allow` in a release build.","check_type":"static","url":"https://agentwranglers.se/playbook/desktop-apps/signing-and-notarisation/mac-entitlements","related":["/playbook/desktop-apps/installs-and-local-privileges/safe-library-loading","/playbook/desktop-apps/installs-and-local-privileges/privacy-prompts","/playbook/desktop-apps/signing-and-notarisation/mac-notarisation"],"sources":["https://developer.apple.com/documentation/security/hardened-runtime","https://developer.apple.com/documentation/xcode/configuring-the-hardened-runtime"]},{"id":"DSK-6","revision":"09f810c9f2ec","updated":"2026-10-22","name":"Verify every update's signature before installing it","level":"Required","risk":"takeover","rule":"Sign every update file with a key held apart from your update server, and ship the public key inside the app. The app installs an update only after its signature checks out, and fetches it over HTTPS.","check":"In a test, serve an update signed with a different key, then one with a changed byte. The app refuses both and keeps running the installed version. Serve the feed over plain HTTP. The app refuses to fetch it.","check_type":"http","url":"https://agentwranglers.se/playbook/desktop-apps/update-integrity/signed-updates","related":["/playbook/desktop-apps/signing-and-notarisation/signing-keys-in-hardware","/playbook/mobile-apps/updates-and-versions/signed-over-the-air-updates","/playbook/connected-devices/firmware-updates/signed-firmware","/playbook/developer-tools/help-completion-and-updates/version-check"],"sources":["https://theupdateframework.github.io/specification/latest/"]},{"id":"DSK-7","revision":"b53dc02007da","updated":"2026-10-22","name":"Refuse updates older than the installed version","level":"Recommended","rule":"The app installs only a version higher than the one it runs, and it reads that version from the signed update data. A downgrade happens only when a person chooses it.","check":"Serve a validly signed update with a lower version than the installed one. The app does not install it and logs the refusal. A unit test sorts `1.10.0` above `1.9.0`.","check_type":"manual","url":"https://agentwranglers.se/playbook/desktop-apps/update-integrity/no-downgrades","related":["/playbook/mobile-apps/signing-and-release/fix-forward","/playbook/connected-devices/firmware-updates/anti-rollback"],"sources":["https://theupdateframework.github.io/specification/latest/"]},{"id":"DSK-8","revision":"b8d0b92a74a2","updated":"2026-10-22","name":"Roll out each update in stages with a stop switch","level":"Recommended","rule":"Offer each update to at most 10% of installs first, and widen it only while the crash rate stays at the last version's level. Keep a switch on the update server that stops the rollout within 5 minutes.","check":"The update feed has a rollout share and a stop flag. In a test, set the share to 10% for 1,000 simulated install IDs. Between 50 and 150 get the update. Set the stop flag. The next check offers the update to none.","check_type":"manual","url":"https://agentwranglers.se/playbook/desktop-apps/update-integrity/staged-desktop-updates","related":["/playbook/mobile-apps/crashes-and-quality/crash-symbols","/playbook/engineering/build-test-and-deploy/staged-rollouts","/playbook/desktop-apps/browser-extensions/extension-staged-rollout","/playbook/connected-devices/firmware-updates/staged-firmware-rollout"],"sources":["https://learn.microsoft.com/en-us/windows/apps/publish/gradual-package-rollout"]},{"id":"DSK-9","revision":"bcfcee4b174d","updated":"2026-10-27","name":"Keep the bundled browser engine current","level":"Recommended","review_by":"2027-06-30","rule":"When the app ships its own browser engine, as Electron does, never ship a release on a major version its makers no longer support. Release a build on each new patch release of that major within 14 days.","check":"A CI step compares the app's Electron version with the Electron release list. It fails when the major is not one of the newest three. It also fails when a newer patch release of the same major is over 14 days old.","check_type":"command","url":"https://agentwranglers.se/playbook/desktop-apps/update-integrity/current-app-runtime","related":["/playbook/stack/mobile-and-desktop-apps/electron","/playbook/engineering/version-control-and-review/automated-dependency-updates"],"sources":["https://www.electronjs.org/docs/latest/tutorial/electron-timelines","https://www.electronjs.org/docs/latest/tutorial/security"]},{"id":"DSK-10","revision":"7bd3b335995e","updated":"2026-10-27","name":"Keep web content away from the operating system","level":"Required","risk":"takeover","rule":"Every app window runs with Node.js access off, context isolation on and the sandbox on. The page reaches the system only through a short list of named functions, and loads only code packaged with the app.","check":"A test reads every window's settings and fails on `nodeIntegration: true`, `contextIsolation: false`, `sandbox: false` or `webSecurity: false`. Typing `require` and `process` in a window's developer console returns undefined. No window loads an `http:` or outside `https:` address.","check_type":"http","url":"https://agentwranglers.se/playbook/desktop-apps/web-code-inside-desktop-apps/isolate-web-content","related":["/playbook/stack/mobile-and-desktop-apps/electron","/playbook/application-security/browser-security-headers/content-security-policy","/playbook/desktop-apps/web-code-inside-desktop-apps/electron-fuses","/playbook/desktop-apps/web-code-inside-desktop-apps/tauri-capabilities"],"sources":["https://www.electronjs.org/docs/latest/tutorial/security"]},{"id":"DSK-11","revision":"14a51f6006ce","updated":"2026-10-27","name":"Check the sender and content of every message to the main process","level":"Recommended","rule":"Each handler in the main process checks which window and page sent the message and validates every argument against a schema. A path or command never comes from the page as is.","check":"A test calls each handler with a sender frame from another address. It refuses. A test sends `../../.ssh/id_rsa` as an invoice ID. The handler refuses it and opens no file.","check_type":"manual","url":"https://agentwranglers.se/playbook/desktop-apps/web-code-inside-desktop-apps/validate-ipc","related":["/playbook/application-security/access-control/mass-assignment","/playbook/application-security/input-and-injection/command-injection","/playbook/desktop-apps/web-code-inside-desktop-apps/safe-external-links","/playbook/desktop-apps/web-code-inside-desktop-apps/app-scheme-links","/playbook/desktop-apps/web-code-inside-desktop-apps/tauri-capabilities","/playbook/desktop-apps/browser-extensions/untrusted-extension-messages"],"sources":["https://www.electronjs.org/docs/latest/tutorial/security"]},{"id":"DSK-12","revision":"9757960481f5","updated":"2026-10-22","name":"Open outside links only after checking the address","level":"Recommended","rule":"Block navigation and new windows away from the app's own pages. Hand a link to the system browser only when its scheme is `https:` or `mailto:`.","check":"A test clicks links to `file:///etc/passwd`, `smb://example.com/share` and `https://example.com`. Only the last one opens, and only in the system browser. The app window stays on its own page.","check_type":"manual","url":"https://agentwranglers.se/playbook/desktop-apps/web-code-inside-desktop-apps/safe-external-links","related":["/playbook/desktop-apps/web-code-inside-desktop-apps/validate-ipc","/playbook/desktop-apps/web-code-inside-desktop-apps/app-scheme-links"],"sources":["https://www.electronjs.org/docs/latest/tutorial/security"]},{"id":"DSK-13","revision":"0eccb79929bd","updated":"2026-10-27","name":"Keep tokens in the system keychain","level":"Required","risk":"takeover","rule":"Store sign-in tokens and keys in the operating system's credential store, which is the Mac Keychain, Windows Credential Manager or the Linux Secret Service. Never write them to a settings file or local storage.","check":"After sign-in on each platform, a search of the app's data folder for the token value finds nothing. The token appears in the system's credential store under the app's name.","check_type":"static","url":"https://agentwranglers.se/playbook/desktop-apps/web-code-inside-desktop-apps/desktop-keychain","related":["/playbook/mobile-apps/data-on-the-device/keychain-keystore","/playbook/mobile-apps/data-on-the-device/no-secrets-in-app","/playbook/app-ui/client-and-server-state/sensitive-data-out-of-browser-storage","/playbook/developer-tools/configuration-and-telemetry/no-secrets-in-flags"],"sources":["https://www.electronjs.org/docs/latest/api/safe-storage","https://cheatsheetseries.owasp.org/cheatsheets/Secrets_Management_Cheat_Sheet.html"]},{"id":"DSK-30","revision":"6b194f66ca8c","updated":"2026-10-22","name":"Treat every link to the app's own scheme as untrusted input","level":"Required","risk":"takeover","rule":"Parse each link to the app's custom scheme, such as `ledgerly://`, against a fixed list of actions and argument shapes. Ask the user before an action that changes data, and never pass link text to a shell, a file path or a command-line flag.","check":"A test opens the app with `ledgerly://open?doc=../../etc/passwd`, with `ledgerly://x\" --inspect=9229`, with a 100,000 character link and with an unknown action. Each is refused with no side effect, and no debug port opens. A valid link that deletes data shows a confirmation first.","check_type":"manual","url":"https://agentwranglers.se/playbook/desktop-apps/web-code-inside-desktop-apps/app-scheme-links","related":["/playbook/desktop-apps/web-code-inside-desktop-apps/safe-external-links","/playbook/desktop-apps/web-code-inside-desktop-apps/validate-ipc"],"sources":["https://learn.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/aa767914%28v=vs.85%29","https://www.electronjs.org/docs/latest/tutorial/launch-app-from-url-in-another-app"]},{"id":"DSK-31","revision":"ceda50d7c7d7","updated":"2026-10-22","name":"Turn off the Electron fuses the app does not use","level":"Recommended","rule":"Before signing an Electron app, flip its fuses so the binary ignores `ELECTRON_RUN_AS_NODE`, `NODE_OPTIONS` and `--inspect` flags, and checks the integrity of `app.asar`. Read the fuse state of every release build in CI.","check":"A CI step reads the fuses of each packaged build. `RunAsNode`, `EnableNodeOptionsEnvironmentVariable` and `EnableNodeCliInspectArguments` are off, and `EnableEmbeddedAsarIntegrityValidation` and `OnlyLoadAppFromAsar` are on. Starting the app with `ELECTRON_RUN_AS_NODE=1` opens the app, not a Node.js prompt.","check_type":"command","url":"https://agentwranglers.se/playbook/desktop-apps/web-code-inside-desktop-apps/electron-fuses","related":["/playbook/desktop-apps/web-code-inside-desktop-apps/isolate-web-content","/playbook/desktop-apps/signing-and-notarisation/verify-before-publish"],"sources":["https://www.electronjs.org/docs/latest/tutorial/fuses"]},{"id":"DSK-34","revision":"8e44eb6b5442","updated":"2026-10-27","name":"Give each Tauri window only the permissions it uses","level":"Recommended","rule":"In a Tauri app, list every capability in `src-tauri/capabilities` and in `app.security.capabilities` in `tauri.conf.json`. Each capability names its windows by label and grants named permissions, with file and URL scopes limited to the app's own folders and hosts.","check":"A CI test reads every capability file. It fails on a capability without a `windows` list and on a `remote.urls` host outside an approved list. It also fails on an unlisted permission and on a file scope of `$HOME/**` or `/**`.","check_type":"command","url":"https://agentwranglers.se/playbook/desktop-apps/web-code-inside-desktop-apps/tauri-capabilities","related":["/playbook/desktop-apps/web-code-inside-desktop-apps/isolate-web-content","/playbook/desktop-apps/web-code-inside-desktop-apps/validate-ipc"],"sources":["https://v2.tauri.app/security/capabilities/","https://v2.tauri.app/security/scope/"]},{"id":"DSK-14","revision":"110c100c151f","updated":"2026-10-27","name":"Ask for the fewest permissions the extension needs","level":"Required","risk":"data","rule":"Request only permissions the extension uses, and prefer `activeTab` to host permissions. Put features that a minority of users turn on under `optional_permissions` or `optional_host_permissions`, asked for when the user starts them.","check":"A CI script compares the manifest with an approved list of permissions and hosts, and fails on anything new. The manifest has no `<all_urls>`, `*://*/*` or `tabs` unless the approved list gives a written reason. Each permission has a line in the store's justification form.","check_type":"command","url":"https://agentwranglers.se/playbook/desktop-apps/browser-extensions/extension-permissions","related":["/playbook/application-security/secrets-and-configuration/least-privilege-keys","/playbook/desktop-apps/browser-extensions/web-accessible-resources","/playbook/desktop-apps/browser-extensions/extension-ownership-transfer"],"sources":["https://developer.chrome.com/docs/extensions/develop/concepts/activeTab","https://extensionworkshop.com/documentation/publish/add-on-policies/"]},{"id":"DSK-15","revision":"a2be3fc49c1f","updated":"2026-10-27","name":"Ship every line of code inside the package","level":"Required","risk":"takeover","rule":"Build on Manifest V3 and run only code that is inside the submitted package. Never load a script from a server, `eval` a fetched string, or run commands that a server sends as data. Keep the extension pages' content security policy at `script-src 'self'`, adding only `'wasm-unsafe-eval'` when the extension runs WebAssembly.","check":"The manifest says `\"manifest_version\": 3`. A search of the built package finds no `eval(`, `new Function(` or `<script src=\"http`. The `content_security_policy.extension_pages` value has no outside script host and no `'unsafe-eval'`. The store's privacy form answers \"No, I am not using remote code\".","check_type":"http","url":"https://agentwranglers.se/playbook/desktop-apps/browser-extensions/no-remote-code","related":["/playbook/application-security/supply-chain/audit-dependencies","/playbook/desktop-apps/browser-extensions/extension-ownership-transfer"],"sources":["https://developer.chrome.com/docs/webstore/program-policies/mv3-requirements","https://developer.chrome.com/docs/extensions/reference/manifest/content-security-policy","https://developer.chrome.com/docs/extensions/develop/migrate/mv2-deprecation-timeline"]},{"id":"DSK-16","revision":"e9dfee78c568","updated":"2026-10-22","name":"Treat messages from web pages and content scripts as untrusted","level":"Recommended","rule":"Validate every message the background script receives, and check its sender before acting. Let web pages message the extension only from hosts listed under `externally_connectable`.","check":"A test sends each message type with an unknown action, a wrong field type and a sender from an unlisted host. The background script refuses all three and changes nothing. `externally_connectable.matches` lists exact hosts with no `*://*/*`.","check_type":"command","url":"https://agentwranglers.se/playbook/desktop-apps/browser-extensions/untrusted-extension-messages","related":["/playbook/desktop-apps/web-code-inside-desktop-apps/validate-ipc","/playbook/desktop-apps/browser-extensions/content-script-dom"],"sources":["https://developer.chrome.com/docs/extensions/develop/concepts/messaging"]},{"id":"DSK-17","revision":"98a9e9c6dc26","updated":"2026-10-22","name":"Keep extension state in storage instead of the background worker","level":"Recommended","rule":"Save every value the extension needs later with `storage` or IndexedDB, and register event listeners at the top level of the background script. Never keep state only in global variables.","check":"In a test browser, stop the worker from the extensions page in the middle of a task, then trigger the next event. The task goes on from the saved state. A search of the background code finds no listener registered inside a promise or callback.","check_type":"static","url":"https://agentwranglers.se/playbook/desktop-apps/browser-extensions/worker-state-in-storage","related":["/playbook/api-design/reliability/long-running-jobs"],"sources":["https://developer.chrome.com/docs/extensions/develop/concepts/service-workers/lifecycle"]},{"id":"DSK-18","revision":"a1b60cffd057","updated":"2026-10-22","name":"Declare data use truthfully in each store","level":"Recommended","rule":"Fill in the Chrome Web Store privacy practices form and Firefox's `data_collection_permissions` from one list of the data the extension sends. Link a privacy policy that says the same.","check":"The manifest has `browser_specific_settings.gecko.data_collection_permissions`, with `\"none\"` when nothing leaves the browser. A test compares the data list with the hosts called during an end-to-end run. It fails on a host the list does not name.","check_type":"command","url":"https://agentwranglers.se/playbook/desktop-apps/browser-extensions/extension-data-disclosure","related":["/playbook/mobile-apps/privacy-declarations/store-privacy-forms"],"sources":["https://developer.chrome.com/docs/webstore/cws-dashboard-privacy","https://extensionworkshop.com/documentation/develop/firefox-builtin-data-consent/"]},{"id":"DSK-19","revision":"b09824760287","updated":"2026-10-22","name":"Protect the store accounts that publish the extension","level":"Recommended","rule":"Publish from a group or organisation account, never one person's account. Every person on it signs in with a phishing-resistant second factor, and uploads come from CI.","check":"Each store's member list shows at least two owners and a second factor for each. The last 10 published versions each link to a CI run. A version that no CI run made triggers an alert within 1 hour.","check_type":"command","url":"https://agentwranglers.se/playbook/desktop-apps/browser-extensions/extension-store-accounts","related":["/playbook/accounts/second-factors-and-recovery/second-factor-choice","/playbook/engineering/version-control-and-review/code-host-accounts"],"sources":["https://developer.chrome.com/docs/webstore/program-policies/two-step-verification"]},{"id":"DSK-32","revision":"90cdb79c6b20","updated":"2026-10-22","name":"Expose as few extension files to web pages as you can","level":"Recommended","rule":"List under `web_accessible_resources` only the files a web page must load, with `matches` set to the exact sites that need them. In Chrome, set `use_dynamic_url` to true.","check":"A test reads the built manifest. No entry has `<all_urls>` or `*://*/*` in `matches`, and a content script loads every listed file. A test page on a site outside `matches` fails to fetch each listed file.","check_type":"command","url":"https://agentwranglers.se/playbook/desktop-apps/browser-extensions/web-accessible-resources","related":["/playbook/desktop-apps/browser-extensions/extension-permissions"],"sources":["https://developer.chrome.com/docs/extensions/reference/manifest/web-accessible-resources"]},{"id":"DSK-35","revision":"248e88209315","updated":"2026-10-27","name":"Insert text into web pages as text from content scripts","level":"Recommended","rule":"Content scripts put strings into a page with `textContent`, `createElement` and `setAttribute`, never with `innerHTML`, `outerHTML`, `insertAdjacentHTML` or `document.write`. HTML that must go in passes a sanitiser such as DOMPurify first. Controls the user clicks live in the extension's own popup or side panel.","check":"A lint rule such as `eslint-plugin-no-unsanitized` runs on every content script in CI and fails on an unsanitised HTML sink. A test page with the title `<img src=x onerror=alert(1)>` runs the extension, and no alert fires.","check_type":"static","url":"https://agentwranglers.se/playbook/desktop-apps/browser-extensions/content-script-dom","related":["/playbook/application-security/input-and-injection/cross-site-scripting","/playbook/desktop-apps/browser-extensions/untrusted-extension-messages"],"sources":["https://extensionworkshop.com/documentation/develop/build-a-secure-extension/","https://cheatsheetseries.owasp.org/cheatsheets/Cross_Site_Scripting_Prevention_Cheat_Sheet.html"]},{"id":"DSK-36","revision":"664098e11fbe","updated":"2026-10-27","name":"Roll out extension updates in stages","level":"Recommended","review_by":"2027-06-30","rule":"Publish each Chrome Web Store update to at most 10% of users first when the store offers a percentage rollout. Widen it only after 48 hours without a rise in errors, and keep the previous package ready to roll back.","check":"The last 3 updates each started at a share of at most 10% and waited at least 48 hours before 100%. Items under 10,000 users show a tester group release first. Error reports per extension version are on one dashboard.","check_type":"manual","url":"https://agentwranglers.se/playbook/desktop-apps/browser-extensions/extension-staged-rollout","related":["/playbook/desktop-apps/update-integrity/staged-desktop-updates"],"sources":["https://developer.chrome.com/docs/webstore/update"]},{"id":"DSK-37","revision":"3f7bc10a3af2","updated":"2026-10-27","name":"Treat an offer to buy the extension as a threat to its users","level":"Recommended","rule":"Move an extension to a new publisher only after a written check of who they are and what they will change. Tell users before the move in the listing and the release notes, and never sell the extension's users or their data.","check":"A written transfer checklist exists in the repository and names the person who signs it. The listing and release notes of a moved extension announce the new owner at least 14 days before the move. The publisher's member list matches the people in the checklist.","check_type":"static","url":"https://agentwranglers.se/playbook/desktop-apps/browser-extensions/extension-ownership-transfer","related":["/playbook/desktop-apps/browser-extensions/no-remote-code","/playbook/desktop-apps/browser-extensions/extension-permissions"],"sources":["https://developer.chrome.com/docs/webstore/share-ownership","https://developer.chrome.com/docs/webstore/register"]},{"id":"DSK-38","revision":"6c784c762f53","updated":"2026-10-27","name":"Ship the Safari version inside a signed Apple app","level":"Recommended","rule":"Build the Safari version of a web extension from the same source as the Chrome and Firefox versions. Wrap it in a Mac or iOS app made with Apple's packager. Test it in Safari on each release, and sign and submit it like any other app.","check":"CI runs the packager and builds the Safari app on every release. An end-to-end test runs the extension's main flow in Safari on that build. The Safari build's extension version equals the Chrome build's version.","check_type":"command","url":"https://agentwranglers.se/playbook/desktop-apps/browser-extensions/safari-extension-packaging","related":["/playbook/desktop-apps/signing-and-notarisation/mac-notarisation"],"sources":["https://developer.apple.com/documentation/safariservices/safari-web-extensions","https://developer.apple.com/documentation/safariservices/packaging-a-web-extension-for-safari"]},{"id":"DSK-27","revision":"19bdb505ba28","updated":"2026-10-22","name":"Load libraries only from folders attackers cannot write","level":"Required","risk":"takeover","rule":"At start-up on Windows, limit the library search to the app's own folder and System32 with `SetDefaultDllDirectories`. Load every other library by its full path. Install machine-wide apps under Program Files, where only administrators can write.","check":"Put a test library named after one the app loads, such as `version.dll`, in the Downloads folder and in the current folder. Run the installer from Downloads and the app from that folder with a file monitor, such as Process Monitor. The test library is never loaded. A machine-wide install lands under Program Files.","check_type":"command","url":"https://agentwranglers.se/playbook/desktop-apps/installs-and-local-privileges/safe-library-loading","related":["/playbook/desktop-apps/signing-and-notarisation/mac-entitlements","/playbook/desktop-apps/signing-and-notarisation/mac-notarisation","/playbook/desktop-apps/installs-and-local-privileges/privileged-helper-callers"],"sources":["https://learn.microsoft.com/en-us/windows/win32/dlls/dynamic-link-library-security"]},{"id":"DSK-28","revision":"8a65260da57e","updated":"2026-10-27","name":"Check who is calling before a privileged helper acts","level":"Required","risk":"takeover","rule":"A helper or service that runs as root or SYSTEM accepts connections only from your own signed app, or from the signed-in users on Windows. It performs only actions from a fixed list, with checked arguments.","check":"A test signs a small program with another identity and connects it to the helper, which refuses it. A process from a network logon opens the Windows pipe and is refused. A request with an unknown action, or with a path outside the app's own folders, is refused.","check_type":"http","url":"https://agentwranglers.se/playbook/desktop-apps/installs-and-local-privileges/privileged-helper-callers","related":["/playbook/desktop-apps/installs-and-local-privileges/safe-library-loading","/playbook/application-security/input-and-injection/command-injection","/playbook/desktop-apps/installs-and-local-privileges/login-item-consent"],"sources":["https://developer.apple.com/documentation/foundation/nsxpcconnection/setcodesigningrequirement%28_:%29","https://learn.microsoft.com/en-us/windows/win32/ipc/named-pipe-security-and-access-rights"]},{"id":"DSK-29","revision":"ac43ac87530e","updated":"2026-10-22","name":"Start at login only after the user turns it on","level":"Recommended","rule":"Add the app to the login items or startup list only when the user turns on a switch in its settings. The switch starts off. Stop every background process when the user quits, unless they chose to keep one running.","check":"On a fresh install on each platform, the login items and startup lists hold no entry for the app. Turning the switch on adds one, and turning it off or uninstalling removes it. After the user quits, no process of the app is left running.","check_type":"manual","url":"https://agentwranglers.se/playbook/desktop-apps/installs-and-local-privileges/login-item-consent","related":["/playbook/desktop-apps/installs-and-local-privileges/privileged-helper-callers"],"sources":["https://developer.apple.com/app-store/review/guidelines/"]},{"id":"DSK-39","revision":"eab0cca4c31d","updated":"2026-10-27","name":"Ask for system permissions only when a feature needs them","level":"Recommended","rule":"Request each system permission, such as camera, microphone, screen recording, location or contacts, at the moment the user starts the feature that needs it. Give each one a purpose string that names the feature, and keep the app working when the user says no.","check":"On a fresh install, the app shows no permission prompt before the user starts a feature that needs one. Each usage key in the built `Info.plist` names a feature in its text. With each permission refused, a test runs the app's main flows and none crashes.","check_type":"command","url":"https://agentwranglers.se/playbook/desktop-apps/installs-and-local-privileges/privacy-prompts","related":["/playbook/desktop-apps/signing-and-notarisation/mac-entitlements"],"sources":["https://developer.apple.com/documentation/security/hardened-runtime","https://developer.apple.com/documentation/avfoundation/avcapturedevice/requestaccess%28for:completionhandler:%29"]},{"id":"DSK-40","revision":"fb6cd63ff88d","updated":"2026-10-27","name":"Ask the Linux sandbox for the fewest permissions","level":"Recommended","rule":"Ship Flatpak and Snap packages with sandbox permissions limited to what the app uses. Use portals or interfaces for files and devices, and never grant the whole home folder, the whole file system or full session bus access.","check":"A CI step reads the Flatpak manifest and fails on `--filesystem=home`, `--filesystem=host`, `--socket=session-bus` or `--socket=system-bus`. It reads `snapcraft.yaml` and fails on `confinement: classic` or on a plug not in the approved list.","check_type":"command","url":"https://agentwranglers.se/playbook/desktop-apps/installs-and-local-privileges/linux-sandbox-permissions","related":["/playbook/desktop-apps/signing-and-notarisation/linux-package-signing"],"sources":["https://docs.flatpak.org/en/latest/sandbox-permissions.html","https://documentation.ubuntu.com/security/security-features/privilege-restriction/snap-confinement/"]},{"id":"DSK-41","revision":"f78a5e0ddb27","updated":"2026-10-27","name":"Keep symbols for every build you ship","level":"Recommended","rule":"Turn on a crash reporter in every release build, and store the debug symbols of each shipped binary next to its version. A crash report from any version still in use resolves to function names and lines.","check":"The release job fails when the symbol upload for any shipped binary fails. A test build crashes on purpose, and its report on the crash server names the function and source line. Symbols exist for every version that sent a report in the last 90 days.","check_type":"manual","url":"https://agentwranglers.se/playbook/desktop-apps/crashes-telemetry-and-accessibility/desktop-crash-symbols","related":["/playbook/mobile-apps/crashes-and-quality/crash-symbols","/playbook/desktop-apps/crashes-telemetry-and-accessibility/telemetry-opt-in"],"sources":["https://www.electronjs.org/docs/latest/api/crash-reporter","https://www.electronjs.org/docs/latest/tutorial/crash-reporting","https://learn.microsoft.com/en-us/windows/win32/debug/symbol-servers-and-symbol-stores"]},{"id":"DSK-42","revision":"26e775e64884","updated":"2026-10-27","name":"Send usage data only after the user says yes","level":"Recommended","rule":"Usage data and crash reports with an install ID stay off until the user turns them on, in a first-run choice or in settings. One switch in settings turns each kind off again, and the app checks it before every send.","check":"On a fresh install with no choice made, a network capture during 10 minutes of use shows no request to the telemetry host. After the user turns telemetry off, a test runs the main flows and the capture again shows no request.","check_type":"http","url":"https://agentwranglers.se/playbook/desktop-apps/crashes-telemetry-and-accessibility/telemetry-opt-in","related":["/playbook/desktop-apps/crashes-telemetry-and-accessibility/desktop-crash-symbols","/playbook/analytics/privacy-and-consent/analytics-consent","/playbook/developer-tools/configuration-and-telemetry/cli-telemetry-off"],"sources":["https://eur-lex.europa.eu/eli/dir/2002/58/oj","https://eur-lex.europa.eu/eli/reg/2016/679/oj"]},{"id":"DSK-43","revision":"62a79bebcab0","updated":"2026-10-27","name":"Make every window work with a keyboard and a screen reader","level":"Recommended","rule":"Every window, menu and dialog in the app works with the keyboard alone and announces its controls to the system screen reader. Test each release with VoiceOver on Mac, Narrator or NVDA on Windows, and Orca on Linux when you ship there.","check":"For each release, a tester completes the 3 main tasks on each shipped platform with the keyboard alone and with the screen reader on. In an Electron or Tauri app, an automated accessibility scan such as axe-core runs on every window in CI and reports no violations.","check_type":"static","url":"https://agentwranglers.se/playbook/desktop-apps/crashes-telemetry-and-accessibility/desktop-accessibility","related":["/playbook/accessibility/keyboard-and-focus/keyboard-navigation","/playbook/accessibility/keyboard-and-focus/focus-indicators"],"sources":["https://www.w3.org/TR/wcag2ict-22/","https://www.electronjs.org/docs/latest/tutorial/accessibility"]}]}