From 9ff4cf5d8822336b69bff01ef42aa0719ac57943 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 20 Nov 2026 10:43:28 +0000 Subject: [PATCH] Security: stop pointing users at the PyPI name "personakit"; pin actions - The PyPI project "personakit" belongs to an unrelated author. The MCP server's install hint (`pip install "personakit[mcp]"`) would have installed that third-party package. The hint now names the `mcp` dependency itself, and the module docstring says to install from a checkout. - actions/checkout and actions/setup-python pinned to their v4.4.0 / v5.6.0 commit SHAs in all three workflows. - .gitignore: .env.*, *.pem, *.key, .pypirc. ruff check, the unittest suite (165 tests) and check_hygiene.sh pass. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_014dGcvXseXoR7arNE61q8rg --- .github/workflows/dco.yml | 2 +- .github/workflows/hygiene.yml | 2 +- .github/workflows/tests.yml | 8 ++++---- .gitignore | 4 ++++ personakit/mcp_server.py | 5 +++-- 5 files changed, 13 insertions(+), 8 deletions(-) diff --git a/.github/workflows/dco.yml b/.github/workflows/dco.yml index b7537dd..a170958 100644 --- a/.github/workflows/dco.yml +++ b/.github/workflows/dco.yml @@ -14,7 +14,7 @@ jobs: if: github.event.pull_request.user.login != github.repository_owner runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 with: fetch-depth: 0 - name: Check Signed-off-by on every commit diff --git a/.github/workflows/hygiene.yml b/.github/workflows/hygiene.yml index 2edd1b9..9beb5c9 100644 --- a/.github/workflows/hygiene.yml +++ b/.github/workflows/hygiene.yml @@ -9,6 +9,6 @@ jobs: hygiene: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 - name: Check for private paths, internal ids and credential shapes run: ./scripts/check_hygiene.sh diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 721c2e0..020494f 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -12,8 +12,8 @@ jobs: matrix: python-version: ["3.10", "3.13"] steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 + - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 + - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 with: python-version: ${{ matrix.python-version }} - name: Install (with the optional MCP dependency) @@ -23,8 +23,8 @@ jobs: quality: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 + - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 + - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 with: python-version: "3.13" - name: Install (with the optional MCP dependency and the checkers) diff --git a/.gitignore b/.gitignore index 979002d..2a65e94 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,7 @@ build/ !tests/fixtures/**/*.jsonl .env .coverage +.env.* +*.pem +*.key +.pypirc diff --git a/personakit/mcp_server.py b/personakit/mcp_server.py index 98c9464..3cc1872 100644 --- a/personakit/mcp_server.py +++ b/personakit/mcp_server.py @@ -2,7 +2,8 @@ Assistants can never approve, restrict, hide or forget. Only the owner does that, in `review`. The functions below hold the logic and need no MCP package; `build_server` wraps them. -Install the optional dependency with: pip install "personakit[mcp]" +Install the optional dependency from a checkout of this repository with: pip install -e ".[mcp]" +(not `pip install personakit`: that name on PyPI belongs to an unrelated project). """ from __future__ import annotations @@ -59,7 +60,7 @@ def build_server(store: Store, relevance: retrieve.Relevance = retrieve.overlap) try: from mcp.server.fastmcp import FastMCP except ImportError as exc: # pragma: no cover - exercised only without the extra - raise SystemExit('The MCP server needs the "mcp" package: pip install "personakit[mcp]"') from exc + raise SystemExit('The MCP server needs the "mcp" package: pip install "mcp>=1.2,<2"') from exc server = FastMCP("personakit")