fullcourtdefense-cli 1.21.27 → 1.21.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/config.d.ts CHANGED
@@ -40,6 +40,18 @@ export interface ResolvedCliCredentials {
40
40
  shieldId?: string;
41
41
  shieldKey?: string;
42
42
  }
43
+ /**
44
+ * Daemon→child credential handoff: the daemon injects its already-decrypted
45
+ * in-memory creds as FCD_SHIELD_ID + FCD_SHIELD_KEY when spawning sweep
46
+ * children (see discoverSweepCredentialEnv in daemon.ts). When BOTH are
47
+ * present the child must use them as-is and skip the DPAPI decrypt — that
48
+ * decrypt spawns powershell.exe, which EDR on hardened fleet machines can
49
+ * block (and flags as suspicious even when it merely fails). Requiring the
50
+ * pair keeps a stray single env var (e.g. AGENTGUARD_SHIELD_KEY from a
51
+ * Cursor-plugin setup) from overriding the machine's enrolled key.
52
+ * Pure — unit-tested.
53
+ */
54
+ export declare function daemonHandoffShieldKey(env?: NodeJS.ProcessEnv): string | undefined;
43
55
  /** Merge saved ~/.fullcourtdefense.yml + env + optional CLI flag overrides. */
44
56
  export declare function resolveCliCredentials(config: BotGuardConfig, overrides?: Partial<ResolvedCliCredentials>): ResolvedCliCredentials;
45
57
  export declare function isCliSetupComplete(config: BotGuardConfig): boolean;
package/dist/config.js CHANGED
@@ -37,6 +37,7 @@ exports.getHomeConfigPath = getHomeConfigPath;
37
37
  exports.loadConfig = loadConfig;
38
38
  exports.getDefaultConfigPath = getDefaultConfigPath;
39
39
  exports.saveShieldConfig = saveShieldConfig;
40
+ exports.daemonHandoffShieldKey = daemonHandoffShieldKey;
40
41
  exports.resolveCliCredentials = resolveCliCredentials;
41
42
  exports.isCliSetupComplete = isCliSetupComplete;
42
43
  exports.requireCliSetup = requireCliSetup;
@@ -229,6 +230,20 @@ function saveShieldConfig(input) {
229
230
  return writeSetupConfig(target, input);
230
231
  }
231
232
  const DEFAULT_API_URL = 'https://api.fullcourtdefense.ai';
233
+ /**
234
+ * Daemon→child credential handoff: the daemon injects its already-decrypted
235
+ * in-memory creds as FCD_SHIELD_ID + FCD_SHIELD_KEY when spawning sweep
236
+ * children (see discoverSweepCredentialEnv in daemon.ts). When BOTH are
237
+ * present the child must use them as-is and skip the DPAPI decrypt — that
238
+ * decrypt spawns powershell.exe, which EDR on hardened fleet machines can
239
+ * block (and flags as suspicious even when it merely fails). Requiring the
240
+ * pair keeps a stray single env var (e.g. AGENTGUARD_SHIELD_KEY from a
241
+ * Cursor-plugin setup) from overriding the machine's enrolled key.
242
+ * Pure — unit-tested.
243
+ */
244
+ function daemonHandoffShieldKey(env = process.env) {
245
+ return env.FCD_SHIELD_ID && env.FCD_SHIELD_KEY ? env.FCD_SHIELD_KEY : undefined;
246
+ }
232
247
  /** Merge saved ~/.fullcourtdefense.yml + env + optional CLI flag overrides. */
233
248
  function resolveCliCredentials(config, overrides = {}) {
234
249
  return {
@@ -248,6 +263,9 @@ function resolveCliCredentials(config, overrides = {}) {
248
263
  || process.env.FULLCOURTDEFENSE_SHIELD_ID
249
264
  || process.env.AGENTGUARD_SHIELD_ID,
250
265
  shieldKey: overrides.shieldKey
266
+ // Daemon handoff BEFORE the DPAPI decrypt: no powershell.exe spawn at
267
+ // all during daemon-driven sweeps (see daemonHandoffShieldKey docs).
268
+ || daemonHandoffShieldKey()
251
269
  || unprotectShieldKeyForCurrentWindowsUser(config.shieldKeyDpapi || '')
252
270
  || config.shieldKey
253
271
  || process.env.FCD_SHIELD_KEY
package/dist/version.json CHANGED
@@ -1,3 +1,3 @@
1
1
  {
2
- "version": "1.21.27"
2
+ "version": "1.21.28"
3
3
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fullcourtdefense-cli",
3
- "version": "1.21.27",
3
+ "version": "1.21.28",
4
4
  "description": "Full Court Defense CLI — security scanning for AI agents from your terminal",
5
5
  "main": "dist/index.js",
6
6
  "bin": {