Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions code-scanning/mcp-drift-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# 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 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

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@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@2892aa5e19bbd11bc0cff5427e3b750a04d9e3c2 # v4.38.2
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
7 changes: 7 additions & 0 deletions code-scanning/properties/mcp-drift-check.properties.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"name": "MCP Drift Check",
"creator": "Tom Elias",
"description": "Statically check mutable package references in MCP configs without running discovered servers.",
"iconName": "code",
"categories": ["Code Scanning"]
}
Loading