@agentmailbox/mcp-auth 1.0.5 → 1.0.10

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.
Files changed (2) hide show
  1. package/index.js +7 -8
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -19,7 +19,7 @@
19
19
  * ],
20
20
  * "env": {
21
21
  * "MCP_OAUTH_CLIENT_ID": "your-client-id",
22
- * "MCP_OAUTH_CLIENT_SECRET": "your-client-secret"
22
+ * "MCP_OAUTH_CLIENT_SECRET": "your-client-secret" // pragma: allowlist secret
23
23
  * }
24
24
  * }
25
25
  * }
@@ -50,26 +50,25 @@ if (!mcpUrl || !tokenEndpoint || !clientId || !clientSecret) {
50
50
  }
51
51
 
52
52
  /**
53
- * Build a minimal environment for the child process.
54
- * Only passes through essential variables to avoid leaking secrets.
53
+ * Build a minimal allow-list environment for the child process.
54
+ * Only includes necessary system variables, avoiding exposure of ambient secrets.
55
55
  */
56
56
  function buildChildEnv(env) {
57
57
  const allowList = [
58
- // Essential for process execution
58
+ // Essential system paths
59
59
  'PATH', 'HOME', 'USERPROFILE',
60
60
  // Temp directories
61
61
  'TMP', 'TEMP', 'TMPDIR',
62
- // Windows-specific
62
+ // Windows system variables
63
63
  'SystemRoot', 'ComSpec', 'WINDIR', 'PATHEXT',
64
- // Proxy settings (important for corporate environments)
64
+ // Proxy configuration
65
65
  'HTTP_PROXY', 'HTTPS_PROXY', 'NO_PROXY',
66
66
  'http_proxy', 'https_proxy', 'no_proxy',
67
67
  // Node.js configuration
68
68
  'NODE_EXTRA_CA_CERTS', 'NODE_OPTIONS',
69
- // MCP-specific
69
+ // mcp-remote configuration directory
70
70
  'MCP_REMOTE_CONFIG_DIR',
71
71
  ];
72
-
73
72
  return Object.fromEntries(
74
73
  allowList.flatMap((key) => (env[key] ? [[key, env[key]]] : []))
75
74
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentmailbox/mcp-auth",
3
- "version": "1.0.5",
3
+ "version": "1.0.10",
4
4
  "description": "OAuth2 Client Credentials wrapper for MCP servers - enables M2M authentication with AgentMailbox",
5
5
  "type": "module",
6
6
  "bin": {