Skip to content
Back to search

tnwks-host-mcp

The image of the host MCP server (a pinned ssh-mcp build) with its checks

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/it3e--tnwks-host-mcp/badge.svg)](/listings/it3e--tnwks-host-mcp)

HTML

<a href="/listings/it3e--tnwks-host-mcp"><img src="/api/listings/it3e--tnwks-host-mcp/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 79 lines
  1. # tnwks-host-mcp
  2. The image of the host server of the tnwks agent platform: the upstream MCP
  3. server [`ssh-mcp`](https://github.com/tufantunc/ssh-mcp) (MIT) at its tag
  4. `v2.26.0`, built from that commit with the steps of its own Dockerfile and
  5. no change of code. The project publishes a Dockerfile and no image, so this
  6. repo builds it, tests it and publishes it on its release tags; tnwks-ops
  7. pins the digest.
  8. ## The image
  9. - **The source.** The `source` stage takes the upstream repository at the
  10. full commit of the tag (`UPSTREAM_COMMIT` in the `Dockerfile`), so the
  11. build gets those bytes or fails. The two stages after it are the stages
  12. of the upstream Dockerfile at that commit: the same base, `node:22-slim`
  13. pinned by digest, the same `npm ci --ignore-scripts` and build. Only the
  14. `COPY` sources name the source stage. The image also gets the upstream
  15. `LICENSE` and OCI labels with the upstream version and commit.
  16. - **The user.** uid 65532, as upstream. The pod runs it with a read-only
  17. root file system and no capability.
  18. - **Nothing secret.** No key, token, host key or config is in the image.
  19. The pod mounts the SSH key of the agent account and the config, and
  20. gives the bearer token of the HTTP mode.
  21. - **The base digest.** The Renovate presets of the template follow each
  22. `FROM` line with a digest, so Renovate opens the updates of the
  23. `node:22-slim` digest by itself. The image test is the gate: an update
  24. merges only when it passes.
  25. - **A new upstream release.** Renovate does not follow the upstream tag. A
  26. person reads the change, sets `UPSTREAM_COMMIT` to the full commit of the
  27. new tag, and updates `tools/ssh-mcp.json` from the image. Then the tests
  28. run. A Renovate regex manager for `UPSTREAM_COMMIT` is a later step, not
  29. built here.
  30. ## Tests
  31. `bin/image-test <image>` (CI runs it on each built image before any push)
  32. runs `tests/test_image.py` with Docker and python3 only. It starts the
  33. server with the flags of its pod: HTTP mode with a bearer token, its own
  34. approval off, `--hostKeyMode=strict` with a pinned host key, and a
  35. read-only root with no capability. It runs the server as the uid of the
  36. runner, because the runner owns the test config and key. So uid 65532 is
  37. proven as the default user of the image only; the rights on the mounted
  38. key and config at uid 65532 are a matter of the pod in tnwks-ops. Its
  39. one target is a fake host (`tests/sshd`) with a normal user, on an internal
  40. network. The keys and the token are made for the run and deleted after it.
  41. Root in a helper container with no network makes the keys and gives them
  42. to the runner's uid, so the test needs no passwd entry for that uid and
  43. passes under any uid of the runner.
  44. It checks:
  45. - the image is the upstream tag and commit, and its default user is uid
  46. 65532;
  47. - a call with no token or another token gets 401;
  48. - a Host header outside `--allowedHosts` gets 403;
  49. - the server lists the tools of `tools/ssh-mcp.json`, no more and no less;
  50. - a listed read runs as the normal user, who can not read a root file;
  51. - a host key that is not the pinned one gets no connection.
  52. The tool rule of the central MCP gateway, which names the tools that the
  53. agent gets, is in tnwks-ops, not here.
  54. ## Workflow
  55. This repo follows the app-repo standard in
  56. [iT3E/app-repo-template](https://github.com/iT3E/app-repo-template), with
  57. CI from [iT3E/github-workflows](https://github.com/iT3E/github-workflows);
  58. `AGENTS.md` has the short version.
  59. - Changes go through PRs, never straight to `main`. Merge only when every
  60. check is green (`gh-merge-safe.sh <pr> iT3E/tnwks-host-mcp`).
  61. - `task precommit:init` installs the hooks: betterleaks, the privacy
  62. denylist (staged files, git identity, commit message) and ruff format.
  63. - Each PR adds a Changie fragment (`changie new`) or carries the
  64. `skip-changelog` label. Merging fragments cuts a release (`vX.Y.Z` tag,
  65. GitHub Release, image `:X.Y.Z`).
  66. - Renovate keeps dependencies current. Patch, digest and non-0.x minor
  67. updates merge themselves once CI is green; majors wait for review on the
  68. Renovate Dashboard issue. Template releases arrive as their own
  69. `renovate/template` PRs.

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.