fix(onepassword): disable desktop-app integration on broker op calls (#109157)

Without OP_LOAD_DESKTOP_APP_SETTINGS=false and OP_BIOMETRIC_UNLOCK_ENABLED=false,
op 2.35 on macOS reads the 1Password desktop app's settings even on the
service-account path and can block on a per-PID App Data Protection dialog,
hanging the broker until timeoutMs on Mac gateway hosts.
This commit is contained in:
Peter Steinberger
2026-07-16 09:15:03 -07:00
committed by GitHub
parent 9359544e84
commit 8bf4d388b0
3 changed files with 16 additions and 1 deletions
+4
View File
@@ -35,6 +35,10 @@ variables or resolve OpenClaw config secrets.
value.
- The plugin invokes `op` once per cache miss. It does not retry rate limits or
other failures.
- Each `op` call runs with a minimal environment that disables 1Password
desktop-app integration (`OP_LOAD_DESKTOP_APP_SETTINGS=false`,
`OP_BIOMETRIC_UNLOCK_ENABLED=false`), so a 1Password app installed on the
Gateway host never triggers biometric or macOS permission dialogs.
Give the service account read access only to the vaults and items registered in
the plugin config.
+6 -1
View File
@@ -67,7 +67,12 @@ describe("OpClient", () => {
"--cache=false",
],
{
env: { OP_SERVICE_ACCOUNT_TOKEN: fixtureAuth, HOME: root },
env: {
OP_SERVICE_ACCOUNT_TOKEN: fixtureAuth,
HOME: root,
OP_LOAD_DESKTOP_APP_SETTINGS: "false",
OP_BIOMETRIC_UNLOCK_ENABLED: "false",
},
timeoutMs: 1234,
maxBufferBytes: 1024 * 1024,
},
+6
View File
@@ -241,6 +241,12 @@ export class OpClient {
env: {
OP_SERVICE_ACCOUNT_TOKEN: token,
HOME: this.home,
// Force the pure service-account path. Without both overrides, op
// 2.35 on macOS still reads the 1Password desktop app's settings and
// can block on a per-PID App Data Protection dialog until a human
// answers, hanging the broker for timeoutMs on Mac gateway hosts.
OP_LOAD_DESKTOP_APP_SETTINGS: "false",
OP_BIOMETRIC_UNLOCK_ENABLED: "false",
},
timeoutMs: this.timeoutMs,
maxBufferBytes: MAX_STDOUT_BYTES,