ssh-mcp-pro 1.1.5 → 1.2.3
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/CHANGELOG.md +46 -0
- package/README.md +47 -7
- package/SECURITY.md +4 -0
- package/SECURITY_DECISIONS.md +32 -1
- package/dist/agent-bin.js +0 -0
- package/dist/connector-profile.d.ts +19 -2
- package/dist/connector-profile.d.ts.map +1 -1
- package/dist/connector-profile.js +36 -14
- package/dist/connector-profile.js.map +1 -1
- package/dist/http-security.d.ts.map +1 -1
- package/dist/http-security.js +19 -4
- package/dist/http-security.js.map +1 -1
- package/dist/http-server-lifecycle.d.ts +17 -0
- package/dist/http-server-lifecycle.d.ts.map +1 -0
- package/dist/http-server-lifecycle.js +122 -0
- package/dist/http-server-lifecycle.js.map +1 -0
- package/dist/http-server-router.d.ts +28 -0
- package/dist/http-server-router.d.ts.map +1 -0
- package/dist/http-server-router.js +108 -0
- package/dist/http-server-router.js.map +1 -0
- package/dist/http-server-runtime.d.ts +21 -0
- package/dist/http-server-runtime.d.ts.map +1 -0
- package/dist/http-server-runtime.js +415 -0
- package/dist/http-server-runtime.js.map +1 -0
- package/dist/http-session-registry.d.ts.map +1 -1
- package/dist/http-session-registry.js.map +1 -1
- package/dist/index.js +12 -5
- package/dist/index.js.map +1 -1
- package/dist/mcp.d.ts +1 -1
- package/dist/mcp.js +1 -1
- package/dist/prompts.d.ts +2 -11
- package/dist/prompts.d.ts.map +1 -1
- package/dist/prompts.js +8 -1
- package/dist/prompts.js.map +1 -1
- package/dist/remote/agent-cli.d.ts.map +1 -1
- package/dist/remote/agent-cli.js +20 -1
- package/dist/remote/agent-cli.js.map +1 -1
- package/dist/remote/agent-connection-lifecycle.d.ts +47 -0
- package/dist/remote/agent-connection-lifecycle.d.ts.map +1 -0
- package/dist/remote/agent-connection-lifecycle.js +304 -0
- package/dist/remote/agent-connection-lifecycle.js.map +1 -0
- package/dist/remote/agent-executor.d.ts.map +1 -1
- package/dist/remote/agent-executor.js +89 -67
- package/dist/remote/agent-executor.js.map +1 -1
- package/dist/remote/agent-handler.d.ts +22 -8
- package/dist/remote/agent-handler.d.ts.map +1 -1
- package/dist/remote/agent-handler.js +151 -98
- package/dist/remote/agent-handler.js.map +1 -1
- package/dist/remote/config.d.ts.map +1 -1
- package/dist/remote/config.js +14 -0
- package/dist/remote/config.js.map +1 -1
- package/dist/remote/control-plane.d.ts.map +1 -1
- package/dist/remote/control-plane.js +16 -0
- package/dist/remote/control-plane.js.map +1 -1
- package/dist/remote/oauth-handler.d.ts +6 -0
- package/dist/remote/oauth-handler.d.ts.map +1 -1
- package/dist/remote/oauth-handler.js +61 -1
- package/dist/remote/oauth-handler.js.map +1 -1
- package/dist/remote/policy-update-guard.d.ts +14 -0
- package/dist/remote/policy-update-guard.d.ts.map +1 -0
- package/dist/remote/policy-update-guard.js +27 -0
- package/dist/remote/policy-update-guard.js.map +1 -0
- package/dist/remote/policy.d.ts.map +1 -1
- package/dist/remote/policy.js +13 -2
- package/dist/remote/policy.js.map +1 -1
- package/dist/remote/safe-file.d.ts +6 -0
- package/dist/remote/safe-file.d.ts.map +1 -0
- package/dist/remote/safe-file.js +192 -0
- package/dist/remote/safe-file.js.map +1 -0
- package/dist/remote/store.d.ts.map +1 -1
- package/dist/remote/store.js.map +1 -1
- package/dist/remote/types.d.ts +5 -0
- package/dist/remote/types.d.ts.map +1 -1
- package/dist/remote/websocket.d.ts +38 -13
- package/dist/remote/websocket.d.ts.map +1 -1
- package/dist/remote/websocket.js +90 -126
- package/dist/remote/websocket.js.map +1 -1
- package/dist/render-http.js +2 -1
- package/dist/render-http.js.map +1 -1
- package/dist/resources.d.ts +2 -7
- package/dist/resources.d.ts.map +1 -1
- package/dist/resources.js.map +1 -1
- package/dist/retry.d.ts.map +1 -1
- package/dist/retry.js +4 -2
- package/dist/retry.js.map +1 -1
- package/dist/server-http.d.ts +1 -1
- package/dist/server-http.d.ts.map +1 -1
- package/dist/server-http.js +1 -421
- package/dist/server-http.js.map +1 -1
- package/dist/session.d.ts +4 -0
- package/dist/session.d.ts.map +1 -1
- package/dist/session.js +38 -15
- package/dist/session.js.map +1 -1
- package/dist/tools/connector.provider.d.ts.map +1 -1
- package/dist/tools/connector.provider.js +2 -1
- package/dist/tools/connector.provider.js.map +1 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/docs/agent-runtime-config.md +34 -0
- package/docs/development/api-stability.md +44 -0
- package/docs/development/coding-standards.md +41 -0
- package/docs/development/commit-conventions.md +35 -0
- package/docs/development/dependency-management.md +60 -0
- package/docs/development/deprecation-policy.md +29 -0
- package/docs/development/local-setup.md +46 -0
- package/docs/development/release-process.md +31 -0
- package/docs/development/testing-policy.md +47 -0
- package/docs/explanation/architecture.md +44 -0
- package/docs/how-to/README.md +14 -0
- package/docs/how-to/configure-ssh-policy.md +50 -0
- package/docs/openssf-evidence.md +75 -0
- package/docs/openssf-gap-analysis.md +63 -0
- package/docs/openssf-proposal-links.md +37 -0
- package/docs/professionalization-plan.md +81 -0
- package/docs/reference/README.md +21 -0
- package/docs/reference/cli.md +41 -0
- package/docs/reference/compatibility.md +46 -0
- package/docs/reference/configuration.md +72 -0
- package/docs/remote-mcp-hardening.md +27 -0
- package/docs/repo-maturity-report.md +565 -0
- package/docs/security/assurance-case.md +58 -0
- package/docs/security/dependency-audit-exceptions.json +4 -0
- package/docs/security/dependency-audit-exceptions.md +15 -0
- package/docs/security/input-validation.md +54 -0
- package/docs/security/release-integrity.md +28 -0
- package/docs/security/scanning-policy.md +50 -0
- package/docs/security/secrets-management.md +49 -0
- package/docs/security/threat-model.md +65 -0
- package/docs/testing.md +24 -0
- package/docs/troubleshooting.md +56 -0
- package/docs/tutorials/getting-started.md +84 -0
- package/mcp.json +1 -1
- package/package.json +86 -70
- package/registry/ssh-mcp-pro/mcp.json +1 -1
- package/server.json +3 -3
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# Configuration Reference
|
|
2
|
+
|
|
3
|
+
The canonical, exhaustive `SSH_MCP_*` table lives in
|
|
4
|
+
[README.md#configuration](../../README.md#configuration) and isn't duplicated here — a
|
|
5
|
+
second copy of a 40+ row table would drift out of sync with the first. This page groups
|
|
6
|
+
that table by concern, for when you know *what kind* of setting you need but not its
|
|
7
|
+
exact name.
|
|
8
|
+
|
|
9
|
+
## Session and resource limits
|
|
10
|
+
|
|
11
|
+
`SSH_MCP_MAX_SESSIONS`, `SSH_MCP_SESSION_TTL`, `SSH_MCP_COMMAND_TIMEOUT`,
|
|
12
|
+
`SSH_MCP_MAX_COMMAND_OUTPUT_BYTES`, `SSH_MCP_MAX_STREAM_CHUNKS`, `SSH_MCP_MAX_FILE_SIZE`,
|
|
13
|
+
`SSH_MCP_MAX_FILE_WRITE_BYTES`, `SSH_MCP_MAX_TRANSFER_BYTES`.
|
|
14
|
+
|
|
15
|
+
## SSH security policy
|
|
16
|
+
|
|
17
|
+
`SSH_MCP_HOST_KEY_POLICY`, `SSH_MCP_KNOWN_HOSTS_PATH`, `SSH_MCP_ALLOW_ROOT_LOGIN`,
|
|
18
|
+
`SSH_MCP_ALLOWED_CIPHERS`, `SSH_MCP_ALLOW_RAW_SUDO`, `SSH_MCP_ALLOW_DESTRUCTIVE_COMMANDS`,
|
|
19
|
+
`SSH_MCP_ALLOW_DESTRUCTIVE_FS`, `SSH_MCP_ALLOWED_HOSTS`, `SSH_MCP_COMMAND_ALLOW`,
|
|
20
|
+
`SSH_MCP_COMMAND_DENY`, `SSH_MCP_PATH_ALLOW_PREFIXES`, `SSH_MCP_PATH_DENY_PREFIXES`. See
|
|
21
|
+
[docs/how-to/configure-ssh-policy.md](../how-to/configure-ssh-policy.md) for task-based
|
|
22
|
+
guidance and [docs/security/threat-model.md](../security/threat-model.md) for why these
|
|
23
|
+
defaults exist.
|
|
24
|
+
|
|
25
|
+
## Local transfer and tunnel policy
|
|
26
|
+
|
|
27
|
+
`SSH_MCP_LOCAL_PATH_ALLOW_PREFIXES`, `SSH_MCP_LOCAL_PATH_DENY_PREFIXES`,
|
|
28
|
+
`SSH_MCP_TUNNEL_ALLOW_BIND_HOSTS`, `SSH_MCP_TUNNEL_DENY_BIND_HOSTS`,
|
|
29
|
+
`SSH_MCP_TUNNEL_ALLOW_REMOTE_HOSTS`, `SSH_MCP_TUNNEL_DENY_REMOTE_HOSTS`,
|
|
30
|
+
`SSH_MCP_TUNNEL_ALLOW_PORTS`, `SSH_MCP_TUNNEL_DENY_PORTS`.
|
|
31
|
+
|
|
32
|
+
## Policy engine
|
|
33
|
+
|
|
34
|
+
`SSH_MCP_POLICY_FILE`, `SSH_MCP_POLICY_MODE` — a JSON policy file plus enforce/explain
|
|
35
|
+
mode, for centralizing the settings above instead of many separate environment
|
|
36
|
+
variables. No config-schema version field currently exists for the policy file (see
|
|
37
|
+
[docs/development/api-stability.md](../development/api-stability.md)).
|
|
38
|
+
|
|
39
|
+
## HTTP transport
|
|
40
|
+
|
|
41
|
+
`SSH_MCP_HTTP_HOST`, `SSH_MCP_HTTP_PORT`, `SSH_MCP_HTTP_ALLOWED_ORIGINS`,
|
|
42
|
+
`SSH_MCP_HTTP_BEARER_TOKEN_FILE`, `SSH_MCP_ENABLE_LEGACY_SSE`,
|
|
43
|
+
`SSH_MCP_HTTP_MAX_REQUEST_BODY_BYTES`, `SSH_MCP_HTTP_MAX_SESSIONS`,
|
|
44
|
+
`SSH_MCP_HTTP_SESSION_IDLE_TTL_MS`, `SSH_MCP_HTTP_PUBLIC_URL`,
|
|
45
|
+
`SSH_MCP_HTTP_TRUST_PROXY`. See [docs/remote-mcp-hardening.md](../remote-mcp-hardening.md).
|
|
46
|
+
|
|
47
|
+
## OAuth (HTTP auth mode)
|
|
48
|
+
|
|
49
|
+
`SSH_MCP_HTTP_AUTH_MODE`, `SSH_MCP_OAUTH_ISSUER`, `SSH_MCP_OAUTH_AUDIENCE`,
|
|
50
|
+
`SSH_MCP_OAUTH_JWKS_URL`, `SSH_MCP_OAUTH_RESOURCE`, `SSH_MCP_OAUTH_REQUIRED_SCOPES`,
|
|
51
|
+
`SSH_MCP_OAUTH_ALLOWED_ALGORITHMS`.
|
|
52
|
+
|
|
53
|
+
## Remote agent WebSocket boundary
|
|
54
|
+
|
|
55
|
+
`AGENT_WS_PATH`, `AGENT_WS_HELLO_TIMEOUT_MS`, `AGENT_WS_HEARTBEAT_INTERVAL_MS`,
|
|
56
|
+
`AGENT_WS_IDLE_TIMEOUT_MS`, `AGENT_WS_MAX_CONNECTIONS`,
|
|
57
|
+
`AGENT_WS_MAX_CONNECTIONS_PER_AGENT`, `MAX_ACTION_TIMEOUT_SECONDS`,
|
|
58
|
+
`MAX_OUTPUT_BYTES`. The idle timeout is normalized to at least two heartbeat intervals.
|
|
59
|
+
See [docs/remote-mcp-hardening.md](../remote-mcp-hardening.md) for operational guidance.
|
|
60
|
+
|
|
61
|
+
## Tool exposure and connectors
|
|
62
|
+
|
|
63
|
+
`SSH_MCP_TOOL_PROFILE` / `SSH_MCP_CONNECTOR_PROFILE`,
|
|
64
|
+
`SSH_MCP_CONNECTOR_CREDENTIAL_PROVIDER`, `SSH_MCP_CONNECTOR_CREDENTIAL_COMMAND`,
|
|
65
|
+
`SSH_MCP_CONNECTOR_CREDENTIAL_COMMAND_ARGS`,
|
|
66
|
+
`SSH_MCP_CONNECTOR_CREDENTIAL_COMMAND_TIMEOUT_MS`,
|
|
67
|
+
`SSH_MCP_CONNECTOR_DEFAULT_USERNAME`, `SSH_MCP_REMOTE_AGENT_MCP_PASSTHROUGH`. See
|
|
68
|
+
[Tool Profiles](../../README.md#tool-profiles) for what each profile exposes.
|
|
69
|
+
|
|
70
|
+
## Misc
|
|
71
|
+
|
|
72
|
+
`SSH_MCP_DEBUG`, `SSH_MCP_RATE_LIMIT*` (global and per-session rate limiting).
|
|
@@ -9,8 +9,35 @@ Use this checklist before exposing `ssh-mcp-pro` through a public Streamable HTT
|
|
|
9
9
|
- The HTTP session registry cleans expired sessions before opening a new session. If capacity is still full, it evicts the oldest idle session with reason `capacity-evict-oldest` instead of returning a persistent 503 that can surface as an upstream 502.
|
|
10
10
|
- Watch logs for `HTTP MCP session removed`, `idle-timeout`, and `capacity-evict-oldest` to confirm cleanup is happening.
|
|
11
11
|
|
|
12
|
+
## Remote agent WebSocket lifecycle
|
|
13
|
+
|
|
14
|
+
- Keep `AGENT_WS_HELLO_TIMEOUT_MS` short enough that unauthenticated sockets cannot remain open indefinitely. The default is `10000` milliseconds.
|
|
15
|
+
- `AGENT_WS_MAX_CONNECTIONS` bounds all accepted agent WebSockets, including connections still waiting for `agent.hello`. The default is `128`.
|
|
16
|
+
- `AGENT_WS_MAX_CONNECTIONS_PER_AGENT` bounds active and replacement candidates for one enrolled agent. The default is `2`, which permits one live connection and one authenticated replacement attempt.
|
|
17
|
+
- `AGENT_WS_HEARTBEAT_INTERVAL_MS` defaults to `30000`. The server sends protocol pings and treats pong or text traffic as activity.
|
|
18
|
+
- `AGENT_WS_IDLE_TIMEOUT_MS` defaults to `90000` and is normalized to at least two heartbeat intervals. Idle connections close cleanly and are forcibly terminated if the close handshake does not complete.
|
|
19
|
+
- The `/readyz` response reports `agent_connections_open` and `agent_connections_unauthenticated`. Audit events record global/per-agent capacity rejection, hello timeout, idle timeout, replacement, and safe numeric close codes.
|
|
20
|
+
- Keep WebSocket compression disabled at the public boundary. Agent messages are text-only and capped at 1 MiB.
|
|
21
|
+
|
|
12
22
|
## OAuth and token verification
|
|
13
23
|
|
|
24
|
+
The remote control plane requires explicit browser confirmation before redirecting
|
|
25
|
+
users to GitHub OAuth. `/oauth/authorize` shows the client destination and scopes;
|
|
26
|
+
a same-browser, short-lived HttpOnly/SameSite transaction cookie is required by
|
|
27
|
+
`POST /oauth/approve` and the GitHub callback. Real HTTPS deployments add `Secure`.
|
|
28
|
+
Clients must keep PKCE and exact registered redirect URI matching. Public dynamic
|
|
29
|
+
client registrations are limited to 20 per TCP peer per five minutes per process,
|
|
30
|
+
with the existing global database cap retained. Deployments behind shared proxies
|
|
31
|
+
should also enforce edge rate limits and monitor registration exhaustion.
|
|
32
|
+
|
|
33
|
+
Remote REST endpoints enforce OAuth token capabilities independently: agent list
|
|
34
|
+
and details require `agents:read`; audit history requires `agents:admin`.
|
|
35
|
+
|
|
36
|
+
Remote agent file writes use verified same-directory temporary files and atomic
|
|
37
|
+
replacement so an interrupted write does not truncate an existing target. Renaming
|
|
38
|
+
requires write permission on the containing directory, in addition to file access.
|
|
39
|
+
|
|
40
|
+
|
|
14
41
|
- Prefer OAuth mode for public endpoints.
|
|
15
42
|
- Configure `SSH_MCP_OAUTH_ISSUER`, `SSH_MCP_OAUTH_JWKS_URL`, and either `SSH_MCP_OAUTH_AUDIENCE` or `SSH_MCP_OAUTH_RESOURCE` explicitly.
|
|
16
43
|
- Use `SSH_MCP_OAUTH_ALLOWED_ALGORITHMS` to pin accepted JWT algorithms when your authorization server has a stable signing policy.
|