From fb3f6030ae82d4f0832fc9a0f5b79606a9fc58c6 Mon Sep 17 00:00:00 2001 From: Tomelias Date: Fri, 25 Sep 2026 12:37:41 +0300 Subject: [PATCH 1/4] Add MCP Drift Check code scanning workflow --- code-scanning/mcp-drift-check.yml | 46 +++++++++++++++++++ .../mcp-drift-check.properties.json | 7 +++ 2 files changed, 53 insertions(+) create mode 100644 code-scanning/mcp-drift-check.yml create mode 100644 code-scanning/properties/mcp-drift-check.properties.json diff --git a/code-scanning/mcp-drift-check.yml b/code-scanning/mcp-drift-check.yml new file mode 100644 index 0000000000..7624effebb --- /dev/null +++ b/code-scanning/mcp-drift-check.yml @@ -0,0 +1,46 @@ +# This workflow uses an action that is not certified by GitHub. +# It is provided by a third party and is governed by +# separate terms of service, privacy policy, and support +# documentation. + +# MCP Drift Check statically reviews Model Context Protocol configuration files +# for mutable npm/npx package references. It does not execute discovered MCP +# servers, download discovered packages, require an API token, or upload configs. + +name: MCP Drift Check + +on: + push: + branches: [ $default-branch, $protected-branches ] + pull_request: + branches: [ $default-branch ] + +permissions: + contents: read + +jobs: + mcp-drift-check: + permissions: + contents: read + security-events: write + actions: read + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Scan MCP configuration + id: mcp + uses: tomelias10/mcp-drift-check@154b8f0897022d720bbe03e2bc882f82c761c1fb # v0.2.3 + with: + fail-on-high: 'false' + + - name: Upload MCP Drift Check results to GitHub Code Scanning + if: always() + uses: github/codeql-action/upload-sarif@1190a975f95ce23525efb6a3fc21ea29567c1b52 # v3 + with: + sarif_file: ${{ steps.mcp.outputs.sarif-file }} + + - name: Fail on mutable MCP package references + if: steps.mcp.outputs.exit-code == '1' + run: exit 1 diff --git a/code-scanning/properties/mcp-drift-check.properties.json b/code-scanning/properties/mcp-drift-check.properties.json new file mode 100644 index 0000000000..87e2af6636 --- /dev/null +++ b/code-scanning/properties/mcp-drift-check.properties.json @@ -0,0 +1,7 @@ +{ + "name": "MCP Drift Check", + "creator": "Tom Elias", + "description": "Statically detect mutable npm/npx package references in MCP configs before AI agents run them.", + "iconName": "code", + "categories": ["Code Scanning"] +} From bce7d4ea7a7685f09b43cb308a32f32b3c520ce1 Mon Sep 17 00:00:00 2001 From: ELIAS TOM Date: Sun, 22 Nov 2026 17:01:38 +0200 Subject: [PATCH 2/4] fix: pin hardened scanner and CodeQL v4 uploader --- code-scanning/mcp-drift-check.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code-scanning/mcp-drift-check.yml b/code-scanning/mcp-drift-check.yml index 7624effebb..f1c973cce8 100644 --- a/code-scanning/mcp-drift-check.yml +++ b/code-scanning/mcp-drift-check.yml @@ -4,7 +4,7 @@ # documentation. # MCP Drift Check statically reviews Model Context Protocol configuration files -# for mutable npm/npx package references. It does not execute discovered MCP +# for mutable package references (npm/npx, bunx, pnpm, yarn, uvx). It does not execute discovered MCP # servers, download discovered packages, require an API token, or upload configs. name: MCP Drift Check @@ -31,13 +31,13 @@ jobs: - name: Scan MCP configuration id: mcp - uses: tomelias10/mcp-drift-check@154b8f0897022d720bbe03e2bc882f82c761c1fb # v0.2.3 + uses: tomelias10/mcp-drift-check@14309f05fa957542cb189490cbcf80f21094d4bc # hardened Action commit with: fail-on-high: 'false' - name: Upload MCP Drift Check results to GitHub Code Scanning if: always() - uses: github/codeql-action/upload-sarif@1190a975f95ce23525efb6a3fc21ea29567c1b52 # v3 + uses: github/codeql-action/upload-sarif@2892aa5e19bbd11bc0cff5427e3b750a04d9e3c2 # v4.38.2 with: sarif_file: ${{ steps.mcp.outputs.sarif-file }} From c2a65e019dc24f63324654f3c8473d510e3b0ca6 Mon Sep 17 00:00:00 2001 From: ELIAS TOM Date: Sun, 22 Nov 2026 17:01:40 +0200 Subject: [PATCH 3/4] docs: describe current MCP package-runner coverage --- code-scanning/properties/mcp-drift-check.properties.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code-scanning/properties/mcp-drift-check.properties.json b/code-scanning/properties/mcp-drift-check.properties.json index 87e2af6636..24b0d4fdb6 100644 --- a/code-scanning/properties/mcp-drift-check.properties.json +++ b/code-scanning/properties/mcp-drift-check.properties.json @@ -1,7 +1,7 @@ { "name": "MCP Drift Check", "creator": "Tom Elias", - "description": "Statically detect mutable npm/npx package references in MCP configs before AI agents run them.", + "description": "Statically check mutable package references in MCP configs without running discovered servers.", "iconName": "code", "categories": ["Code Scanning"] } From b0aa740d85d3a13977a1f1e99314e6a34ec42b81 Mon Sep 17 00:00:00 2001 From: ELIAS TOM Date: Sun, 22 Nov 2026 17:02:25 +0200 Subject: [PATCH 4/4] docs: wrap scanner security and privacy guarantees --- code-scanning/mcp-drift-check.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/code-scanning/mcp-drift-check.yml b/code-scanning/mcp-drift-check.yml index f1c973cce8..30aabb8bc1 100644 --- a/code-scanning/mcp-drift-check.yml +++ b/code-scanning/mcp-drift-check.yml @@ -4,8 +4,9 @@ # documentation. # MCP Drift Check statically reviews Model Context Protocol configuration files -# for mutable package references (npm/npx, bunx, pnpm, yarn, uvx). It does not execute discovered MCP -# servers, download discovered packages, require an API token, or upload configs. +# for mutable package references (npm/npx, bunx, pnpm, yarn, uvx). +# It does not execute discovered MCP servers, download packages, require +# an API token, or upload configurations. name: MCP Drift Check