Feat: add wiki-memory-tool MCP service for multi-agent wiki knowledge#548
Feat: add wiki-memory-tool MCP service for multi-agent wiki knowledge#548aslom wants to merge 1 commit into
Conversation
mrsabath
left a comment
There was a problem hiding this comment.
Summary
MVP wiki service for multi-agent collaboration — solid scope, has assertive tests (test_user_skills.py, test_agents.py, test_user_access.py), uses yaml.safe_load, HMAC-SHA256 for JWTs, and a non-root Dockerfile USER.
Three must-fix items block merge:
- DCO failing — commit is
Signed-off-by: Aleksander Slominski <aslom@apache.org>but authored byaslom@us.ibm.com. DCO requires the sign-off email to match the author's email. Fix withgit commit --amend -s --reset-author(or edit the trailer to use the IBM address) and force-push. verify=Falsein production MCP client (mcp_server.py:44) — ships MITM-vulnerable by default.- Hardcoded JWT fallback secret (
wiki_service.py:47) —"dev-secret-change-me"is now in the public diff; ifJWT_SECRET_KEYis unset in prod, the service silently signs with this. Fail closed instead.
K8s manifest also needs a securityContext, and the Dockerfile/deployment image should be pinned (:latest from a personal registry namespace).
Areas reviewed: Python, Dockerfile, K8s manifests, CI, commit format
Commits: 1 commit (DCO failing — email mismatch)
CI status: failing (DCO)
Assisted-By: Claude Code
43e27b9 to
4385b91
Compare
Resolved issues: 1. verify=False in MCP client — TLS verification now enabled by default, disabled only with explicit WIKI_INSECURE_TLS=1 env var + warning log 2. Hardcoded JWT fallback secret — service now fails with RuntimeError if JWT_SECRET_KEY env var is unset; run_local.py sets a dev-only default 3. :latest image tag — Dockerfile base pinned to sha256 digest, deployment manifest uses semver 0.0.1 tag 4. Missing securityContext — added runAsNonRoot, runAsUser 1001, readOnlyRootFilesystem, allowPrivilegeEscalation false, drop ALL caps 5. print() calls — replaced all 9 with structured logging module calls 6. chmod 777 — reduced to 755 for .venv and uv-cache in Dockerfile Assisted-By: Claude (Anthropic AI) <noreply@anthropic.com> Signed-off-by: Aleksander Slominski <aslom@us.ibm.com>
b25cebb to
e0177f1
Compare
mrsabath
left a comment
There was a problem hiding this comment.
Summary
Round 2 review. All three round-1 must-fix items are addressed in commit 7de6149:
verify=Falsein the MCP client is now gated byWIKI_INSECURE_TLSwith a startup warning (mcp_server.py:47-50)- JWT secret fails fast at import time if
JWT_SECRET_KEYis unset (wiki_service.py:50-52) - K8s deployment now has a proper
securityContext(runAsNonRoot, runAsUser 1001, readOnlyRootFilesystem, drop ALL caps) - Dockerfile base image pinned by SHA256 digest
- Deployment image tag bumped from
:latestto:0.2.0
DCO is also passing (sign-off email now matches author).
Approving. Remaining items below are non-blocking: a possible version-drift between pyproject.toml and deployment.yaml, an autouse test fixture that could leak mutation state across tests, a missing env-var doc entry for WIKI_INSECURE_TLS, and a brittle pyproject parser in deploy.py.
Areas reviewed: Python (delta), Dockerfile, K8s manifests, tests, README, CI
Commits: 4 (all signed-off, DCO passing)
CI status: ✅ passing
Assisted-By: Claude Code
There was a problem hiding this comment.
CodeQL found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.
|
@aslom — gave the wiki-memory-tool a proper end-to-end walkthrough today. Quick report. Tested
I skipped the kind deploy — you already had a live instance, and Shortcomings worth flagging
Suggestions, in priority order
Service itself is solid — ACL model is real, search ranks well, OAuth flow is smooth. Biggest demo unlock is the Kagenti integration glue. Tested by: @mrsabath |
esnible
left a comment
There was a problem hiding this comment.
Can you get make test-docker to work?
Rebase off main and follow the pattern of adding to TEST_A2A_SKIP to skip building if it is too hard to build.
The goal is to ensure that PRs, especially dependabot PRs, break the ability to do a release which requires building the images.
593df0d to
5e059f0
Compare
Resolved issues: 1. verify=False in MCP client — TLS verification now enabled by default, disabled only with explicit WIKI_INSECURE_TLS=1 env var + warning log 2. Hardcoded JWT fallback secret — service now fails with RuntimeError if JWT_SECRET_KEY env var is unset; run_local.py sets a dev-only default 3. :latest image tag — Dockerfile base pinned to sha256 digest, deployment manifest uses semver 0.0.1 tag 4. Missing securityContext — added runAsNonRoot, runAsUser 1001, readOnlyRootFilesystem, allowPrivilegeEscalation false, drop ALL caps 5. print() calls — replaced all 9 with structured logging module calls 6. chmod 777 — reduced to 755 for .venv and uv-cache in Dockerfile Assisted-By: Claude (Anthropic AI) <noreply@anthropic.com> Signed-off-by: Aleksander Slominski <aslom@us.ibm.com>
mrsabath
left a comment
There was a problem hiding this comment.
Re-reviewing the force-pushed commit 5e059f0 only (since my previous APPROVED on this PR).
Most of the changes are clean wins — tomllib for version parsing, kubectl set image instead of rollout restart, session-scoped pytest fixture, useful clean-test-pages admin command, and a clear Status section in the README. Nice work addressing the earlier feedback.
One blocker on the Dockerfile change, plus two smaller notes inline.
Areas reviewed: Dockerfile (security), Python (deploy.py, wiki_cli.py, test_user_skills.py), Markdown
DCO: ✅ pass • CI: ✅ pass • Sign-off: ✅ present
Git-backed wiki service implementing persistent shared memory for AI agents in the Kagenti platform. Validates multi-tenant multi-agent collaboration using MCP with SPIFFE workload identity, GitHub OAuth for humans, and per-topic ACL with team-based access control. Key capabilities: - SPIFFE-authenticated agent endpoints (discovery write, query read) - GitHub OAuth device flow for human users (CLI + JWT) - Full-text search, backlinks, tag graph, activity log - Git-backed storage with optional remote push - Kubernetes deployment with security hardening - MCP server for Claude Code integration - CLI (kwiki) for human interaction Security: - JWT_SECRET_KEY required (no hardcoded fallback) - TLS verification on by default (WIKI_INSECURE_TLS opt-out for dev) - Dockerfile pinned to digest, non-root USER 1001 - K8s securityContext: readOnlyRootFilesystem, drop ALL caps - PAT tokens redacted in error output Testing: - 16 pytest unit tests (test_user_skills.py via TestClient) - Live agent integration tests (test_agents.py) - Live user access tests (test_user_access.py) Relates-to: kagenti/kagenti#1461 Signed-off-by: Aleksander Slominski <aslom@us.ibm.com> Assisted-By: Claude (Anthropic AI) <noreply@anthropic.com>
5e059f0 to
0914738
Compare
mrsabath
left a comment
There was a problem hiding this comment.
Round 4 — verified the three round-3 items in 09147384:
- ✅ Dockerfile is back to digest-pinned
quay.io/fedora/python-314@sha256:381b2b...— supply-chain pin restored. - ✅
deploy.pyprint_summarynow branches onrepo_url; local-only mode printsGit remote: (local-only, no remote configured)and skips the misleadingSecret: wiki-github-patline. - ✅
wiki_cli.pyclean-test-pages predicate is split intopath_prefixes(full-path match) andbasename_prefixes(basename match) — the dead clause is gone.
No new regressions in the force-push. Earlier security gates still hold: JWT_SECRET_KEY fail-fast on import (wiki_service.py), TLS-insecure gated by WIKI_INSECURE_TLS=1 with logged warning, K8s securityContext (runAsNonRoot, readOnlyRootFilesystem, drop ALL caps), image pinned to :0.2.0. The new run_local.py:setdefault('JWT_SECRET_KEY', 'local-dev-secret-do-not-use-in-production') is correct local-dev behavior — production still fails fast.
Areas re-reviewed: Dockerfile, deploy.py, wiki_cli.py, regression scan across security-critical paths
CI status: ✅ DCO passing
Approving.
Summary
MVP wiki service to validate multi-tenant multi-agent collaboration using shared MCP services with Kagenti sandbox and OpenShift.
Implements git-backed wiki with SPIFFE workload identity for agents, GitHub OAuth for humans, per-topic ACL with team-based access control, and GitHub
Pages rendering with light/dark mode.
Related issue(s)
Relates-to: kagenti/kagenti#1461
(Optional) Testing Instructions