From 29102901faaba78576ce4bd0c9ea328ada77e3ff Mon Sep 17 00:00:00 2001 From: Affaan Mustafa Date: Tue, 31 Mar 2026 02:34:57 -0700 Subject: [PATCH] fix(security): pin MCP server versions, add dependabot, pin github-script SHA Critical: - Pin all npx -y MCP server packages to specific versions in .mcp.json to prevent supply chain attacks via version hijacking: - @modelcontextprotocol/server-github@2025.4.8 - @modelcontextprotocol/server-memory@2026.1.26 - @modelcontextprotocol/server-sequential-thinking@2025.12.18 - @playwright/mcp@0.0.69 (was 0.0.68) Medium: - Add .github/dependabot.yml for weekly npm + github-actions updates with grouped minor/patch PRs - Pin actions/github-script to SHA (was @v7 tag, now pinned to commit) --- .github/dependabot.yml | 21 +++++++++++++++++++++ .github/workflows/monthly-metrics.yml | 2 +- .mcp.json | 8 ++++---- 3 files changed, 26 insertions(+), 5 deletions(-) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000..196af05b --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,21 @@ +version: 2 +updates: + - package-ecosystem: "npm" + directory: "/" + schedule: + interval: "weekly" + open-pull-requests-limit: 10 + labels: + - "dependencies" + groups: + minor-and-patch: + update-types: + - "minor" + - "patch" + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" + labels: + - "dependencies" + - "ci" diff --git a/.github/workflows/monthly-metrics.yml b/.github/workflows/monthly-metrics.yml index 3221f321..2e04b89d 100644 --- a/.github/workflows/monthly-metrics.yml +++ b/.github/workflows/monthly-metrics.yml @@ -15,7 +15,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Update monthly metrics issue - uses: actions/github-script@v7 + uses: actions/github-script@f28e40c7f34bde8b3046d885e986cb6290c5673b # v7 with: script: | const owner = context.repo.owner; diff --git a/.mcp.json b/.mcp.json index 2051a33c..e2141a2b 100644 --- a/.mcp.json +++ b/.mcp.json @@ -2,7 +2,7 @@ "mcpServers": { "github": { "command": "npx", - "args": ["-y", "@modelcontextprotocol/server-github"] + "args": ["-y", "@modelcontextprotocol/server-github@2025.4.8"] }, "context7": { "command": "npx", @@ -14,15 +14,15 @@ }, "memory": { "command": "npx", - "args": ["-y", "@modelcontextprotocol/server-memory"] + "args": ["-y", "@modelcontextprotocol/server-memory@2026.1.26"] }, "playwright": { "command": "npx", - "args": ["-y", "@playwright/mcp@0.0.68", "--extension"] + "args": ["-y", "@playwright/mcp@0.0.69", "--extension"] }, "sequential-thinking": { "command": "npx", - "args": ["-y", "@modelcontextprotocol/server-sequential-thinking"] + "args": ["-y", "@modelcontextprotocol/server-sequential-thinking@2025.12.18"] } } }