agent-mcp-guard 0.4.4 → 0.4.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +20 -2
- package/action.yml +38 -11
- package/docs/audit.md +53 -0
- package/docs/baseline.md +2 -2
- package/docs/business-playbook.md +2 -1
- package/docs/examples/e2e-example.md +7 -2
- package/docs/github-action.md +10 -6
- package/docs/launch-checklist.md +7 -1
- package/docs/marketplace-action-readme.md +12 -5
- package/docs/marketplace.md +6 -7
- package/docs/operator-runbook.md +1 -0
- package/docs/paid-audit.md +1 -0
- package/docs/roadmap.md +3 -2
- package/docs/trusted-publishing.md +2 -2
- package/examples/sample-report.md +57 -47
- package/package.json +1 -1
- package/scripts/action-comment.js +27 -2
- package/scripts/action-summary.js +30 -2
- package/scripts/prepare-marketplace-action.js +1 -0
- package/site/e2e/audit/mcp-guard-audit-manifest.json +40 -0
- package/site/e2e/audit/mcp-guard-executive-summary.md +43 -0
- package/site/e2e/audit/mcp-guard-remediation-checklist.md +32 -0
- package/site/e2e/audit/mcp-guard-remediation.md +46 -0
- package/site/e2e/audit/mcp-guard-report.html +453 -0
- package/site/e2e/audit/mcp-guard-report.json +176 -0
- package/site/e2e/audit/mcp-guard-report.md +47 -0
- package/site/e2e/audit/mcp-guard.sarif +570 -0
- package/site/e2e/index.html +6 -1
- package/site/e2e/report.html +1 -1
- package/site/e2e/report.json +2 -2
- package/site/e2e/report.md +1 -1
- package/site/e2e/report.sarif +1 -1
- package/src/audit.js +380 -0
- package/src/cli.js +96 -1
package/README.md
CHANGED
|
@@ -19,7 +19,7 @@ Live demo PR: [mcp-guard-demo#1](https://github.com/ChaoYue0307/mcp-guard-demo/p
|
|
|
19
19
|
<a href="https://github.com/marketplace/actions/mcp-guard-mcp-security-scanner"><img alt="GitHub Marketplace" src="https://img.shields.io/badge/Marketplace-mcp--guard-0f766e?logo=github"></a>
|
|
20
20
|
<a href="https://github.com/ChaoYue0307/mcp-guard/actions"><img alt="CI" src="https://github.com/ChaoYue0307/mcp-guard/actions/workflows/ci.yml/badge.svg"></a>
|
|
21
21
|
<a href="LICENSE"><img alt="License" src="https://img.shields.io/badge/license-Apache--2.0-111827"></a>
|
|
22
|
-
<a href="https://github.com/ChaoYue0307/mcp-guard/releases/tag/v0.4.
|
|
22
|
+
<a href="https://github.com/ChaoYue0307/mcp-guard/releases/tag/v0.4.6"><img alt="Release" src="https://img.shields.io/github/v/release/ChaoYue0307/mcp-guard?color=7c2d12"></a>
|
|
23
23
|
</p>
|
|
24
24
|
|
|
25
25
|
## Install
|
|
@@ -65,6 +65,12 @@ Generate SARIF for GitHub code scanning:
|
|
|
65
65
|
mcp-guard scan --format sarif --output mcp-guard.sarif
|
|
66
66
|
```
|
|
67
67
|
|
|
68
|
+
Generate a review-ready audit pack:
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
mcp-guard audit --config .mcp.json --policy .mcp-guard-policy.json --output-dir mcp-guard-audit
|
|
72
|
+
```
|
|
73
|
+
|
|
68
74
|
Use in CI:
|
|
69
75
|
|
|
70
76
|
```bash
|
|
@@ -87,7 +93,7 @@ mcp-guard scan --config .mcp.json --baseline .mcp-guard-baseline.json --fail-on
|
|
|
87
93
|
Use the GitHub Action:
|
|
88
94
|
|
|
89
95
|
```yaml
|
|
90
|
-
- uses: ChaoYue0307/mcp-guard-action@v0.4.
|
|
96
|
+
- uses: ChaoYue0307/mcp-guard-action@v0.4.6
|
|
91
97
|
with:
|
|
92
98
|
config: .mcp.json
|
|
93
99
|
# policy: .mcp-guard-policy.json
|
|
@@ -108,6 +114,9 @@ Use the transparent example to evaluate what the scanner actually does:
|
|
|
108
114
|
- generated HTML report: [site/e2e/report.html](site/e2e/report.html)
|
|
109
115
|
- generated JSON report: [site/e2e/report.json](site/e2e/report.json)
|
|
110
116
|
- generated SARIF report: [site/e2e/report.sarif](site/e2e/report.sarif)
|
|
117
|
+
- generated audit summary: [site/e2e/audit/mcp-guard-executive-summary.md](site/e2e/audit/mcp-guard-executive-summary.md)
|
|
118
|
+
- generated remediation plan: [site/e2e/audit/mcp-guard-remediation.md](site/e2e/audit/mcp-guard-remediation.md)
|
|
119
|
+
- generated remediation checklist: [site/e2e/audit/mcp-guard-remediation-checklist.md](site/e2e/audit/mcp-guard-remediation-checklist.md)
|
|
111
120
|
|
|
112
121
|
The example scans 3 MCP servers and reports 9 active findings with a risk score of 98. It is synthetic, but fully reproducible from committed files.
|
|
113
122
|
|
|
@@ -137,6 +146,14 @@ For the GitHub Action workflow, inspect the public demo repository: [ChaoYue0307
|
|
|
137
146
|
|
|
138
147
|
The GitHub Action can also post an optional pull request comment with the active finding summary.
|
|
139
148
|
|
|
149
|
+
For paid setup or internal review handoff, `mcp-guard audit` writes a complete evidence package with:
|
|
150
|
+
|
|
151
|
+
- executive summary;
|
|
152
|
+
- remediation plan grouped by MCP server;
|
|
153
|
+
- remediation checklist for PR or handoff tracking;
|
|
154
|
+
- Markdown, HTML, JSON, and SARIF reports;
|
|
155
|
+
- machine-readable audit manifest.
|
|
156
|
+
|
|
140
157
|
For stricter governance, commit `.mcp-guard-policy.json` and define the commands, remote packages, filesystem roots, and remote MCP endpoints the team has approved. See [Policy files](docs/policy.md).
|
|
141
158
|
|
|
142
159
|
For a guided setup, run:
|
|
@@ -213,6 +230,7 @@ Contact: [hechaoyue0307@gmail.com](mailto:hechaoyue0307@gmail.com)
|
|
|
213
230
|
## Documentation
|
|
214
231
|
|
|
215
232
|
- [Rule reference](docs/rules.md)
|
|
233
|
+
- [Audit packs](docs/audit.md)
|
|
216
234
|
- [Baseline and allowlist](docs/baseline.md)
|
|
217
235
|
- [Policy files](docs/policy.md)
|
|
218
236
|
- [GitHub Action](docs/github-action.md)
|
package/action.yml
CHANGED
|
@@ -45,6 +45,9 @@ inputs:
|
|
|
45
45
|
default: mcp-guard-report
|
|
46
46
|
|
|
47
47
|
outputs:
|
|
48
|
+
executive-summary:
|
|
49
|
+
description: Path to the generated executive summary.
|
|
50
|
+
value: ${{ steps.reports.outputs.executive-summary }}
|
|
48
51
|
markdown-report:
|
|
49
52
|
description: Path to the generated Markdown report.
|
|
50
53
|
value: ${{ steps.reports.outputs.markdown-report }}
|
|
@@ -57,6 +60,15 @@ outputs:
|
|
|
57
60
|
sarif-report:
|
|
58
61
|
description: Path to the generated SARIF report.
|
|
59
62
|
value: ${{ steps.reports.outputs.sarif-report }}
|
|
63
|
+
remediation-report:
|
|
64
|
+
description: Path to the generated remediation plan.
|
|
65
|
+
value: ${{ steps.reports.outputs.remediation-report }}
|
|
66
|
+
remediation-checklist:
|
|
67
|
+
description: Path to the generated remediation checklist.
|
|
68
|
+
value: ${{ steps.reports.outputs.remediation-checklist }}
|
|
69
|
+
audit-manifest:
|
|
70
|
+
description: Path to the generated audit pack manifest.
|
|
71
|
+
value: ${{ steps.reports.outputs.audit-manifest }}
|
|
60
72
|
exit-code:
|
|
61
73
|
description: mcp-guard threshold exit code.
|
|
62
74
|
value: ${{ steps.reports.outputs.exit-code }}
|
|
@@ -103,29 +115,40 @@ runs:
|
|
|
103
115
|
html_report="${MCP_GUARD_OUTPUT_DIR}/mcp-guard-report.html"
|
|
104
116
|
json_report="${MCP_GUARD_OUTPUT_DIR}/mcp-guard-report.json"
|
|
105
117
|
sarif_report="${MCP_GUARD_OUTPUT_DIR}/mcp-guard.sarif"
|
|
118
|
+
executive_summary="${MCP_GUARD_OUTPUT_DIR}/mcp-guard-executive-summary.md"
|
|
119
|
+
remediation_report="${MCP_GUARD_OUTPUT_DIR}/mcp-guard-remediation.md"
|
|
120
|
+
remediation_checklist="${MCP_GUARD_OUTPUT_DIR}/mcp-guard-remediation-checklist.md"
|
|
121
|
+
audit_manifest="${MCP_GUARD_OUTPUT_DIR}/mcp-guard-audit-manifest.json"
|
|
106
122
|
comment_report="${MCP_GUARD_OUTPUT_DIR}/mcp-guard-pr-comment.md"
|
|
107
123
|
|
|
108
|
-
|
|
109
|
-
node "${guard_bin}"
|
|
110
|
-
|
|
111
|
-
|
|
124
|
+
set +e
|
|
125
|
+
node "${guard_bin}" audit "${scan_args[@]}" --output-dir "${MCP_GUARD_OUTPUT_DIR}" --fail-on "${MCP_GUARD_FAIL_ON}"
|
|
126
|
+
status="$?"
|
|
127
|
+
set -e
|
|
128
|
+
if [ "${status}" != "0" ] && [ "${status}" != "2" ]; then
|
|
129
|
+
exit "${status}"
|
|
130
|
+
fi
|
|
131
|
+
|
|
112
132
|
node "${GITHUB_ACTION_PATH}/scripts/action-comment.js" \
|
|
113
133
|
"${json_report}" \
|
|
114
134
|
"${markdown_report}" \
|
|
115
135
|
"${html_report}" \
|
|
116
136
|
"${sarif_report}" \
|
|
117
|
-
"${MCP_GUARD_FAIL_ON}"
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
set -e
|
|
137
|
+
"${MCP_GUARD_FAIL_ON}" \
|
|
138
|
+
"${executive_summary}" \
|
|
139
|
+
"${remediation_report}" \
|
|
140
|
+
"${remediation_checklist}" \
|
|
141
|
+
"${audit_manifest}" > "${comment_report}"
|
|
123
142
|
|
|
124
143
|
{
|
|
144
|
+
echo "executive-summary=${executive_summary}"
|
|
125
145
|
echo "markdown-report=${markdown_report}"
|
|
126
146
|
echo "html-report=${html_report}"
|
|
127
147
|
echo "json-report=${json_report}"
|
|
128
148
|
echo "sarif-report=${sarif_report}"
|
|
149
|
+
echo "remediation-report=${remediation_report}"
|
|
150
|
+
echo "remediation-checklist=${remediation_checklist}"
|
|
151
|
+
echo "audit-manifest=${audit_manifest}"
|
|
129
152
|
echo "comment-report=${comment_report}"
|
|
130
153
|
echo "exit-code=${status}"
|
|
131
154
|
} >> "${GITHUB_OUTPUT}"
|
|
@@ -141,7 +164,11 @@ runs:
|
|
|
141
164
|
"${{ steps.reports.outputs.markdown-report }}" \
|
|
142
165
|
"${{ steps.reports.outputs.html-report }}" \
|
|
143
166
|
"${{ steps.reports.outputs.sarif-report }}" \
|
|
144
|
-
"${MCP_GUARD_FAIL_ON}"
|
|
167
|
+
"${MCP_GUARD_FAIL_ON}" \
|
|
168
|
+
"${{ steps.reports.outputs.executive-summary }}" \
|
|
169
|
+
"${{ steps.reports.outputs.remediation-report }}" \
|
|
170
|
+
"${{ steps.reports.outputs.remediation-checklist }}" \
|
|
171
|
+
"${{ steps.reports.outputs.audit-manifest }}" >> "${GITHUB_STEP_SUMMARY}"
|
|
145
172
|
|
|
146
173
|
- name: Comment on pull request
|
|
147
174
|
if: ${{ always() && inputs.comment-pr == 'true' && github.event_name == 'pull_request' && steps.reports.outputs.comment-report != '' }}
|
package/docs/audit.md
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# Audit Packs
|
|
2
|
+
|
|
3
|
+
`mcp-guard audit` generates a review-ready evidence package for setup pilots, internal security reviews, and customer handoff notes.
|
|
4
|
+
|
|
5
|
+
It runs the same scanner as `mcp-guard scan`, then writes a directory with human-readable reports, machine-readable outputs, and a manifest.
|
|
6
|
+
|
|
7
|
+
## Usage
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
mcp-guard audit --config .mcp.json --policy .mcp-guard-policy.json --output-dir mcp-guard-audit
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Use a baseline when the team has accepted known findings:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
mcp-guard audit \
|
|
17
|
+
--config .mcp.json \
|
|
18
|
+
--baseline .mcp-guard-baseline.json \
|
|
19
|
+
--policy .mcp-guard-policy.json \
|
|
20
|
+
--output-dir mcp-guard-audit
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Use `--fail-on` in CI when the audit should write artifacts and then fail on active risk:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
mcp-guard audit --config .mcp.json --fail-on high
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Generated Files
|
|
30
|
+
|
|
31
|
+
| File | Purpose |
|
|
32
|
+
| --- | --- |
|
|
33
|
+
| `mcp-guard-executive-summary.md` | Short decision summary for founders, security leads, and engineering managers. |
|
|
34
|
+
| `mcp-guard-remediation.md` | Server-by-server remediation plan with evidence and fixes. |
|
|
35
|
+
| `mcp-guard-remediation-checklist.md` | Checkbox-based remediation tasks for PRs, paid setup handoff, or internal tracking. |
|
|
36
|
+
| `mcp-guard-report.md` | Full Markdown scan report. |
|
|
37
|
+
| `mcp-guard-report.html` | Readable HTML report for review artifacts. |
|
|
38
|
+
| `mcp-guard-report.json` | Redacted machine-readable report for automation. |
|
|
39
|
+
| `mcp-guard.sarif` | SARIF 2.1.0 report for GitHub code scanning. |
|
|
40
|
+
| `mcp-guard-audit-manifest.json` | Manifest listing status, summary, policy/baseline context, and file paths. |
|
|
41
|
+
|
|
42
|
+
## Review Flow
|
|
43
|
+
|
|
44
|
+
1. Run `mcp-guard audit` locally or through the GitHub Action.
|
|
45
|
+
2. Open `mcp-guard-executive-summary.md` to decide whether the MCP setup is acceptable.
|
|
46
|
+
3. Work through `mcp-guard-remediation.md` with the engineering team.
|
|
47
|
+
4. Track concrete work in `mcp-guard-remediation-checklist.md`.
|
|
48
|
+
5. Use `mcp-guard-report.html` for readable evidence and `mcp-guard-report.json` or `mcp-guard.sarif` for automation.
|
|
49
|
+
6. Commit a reviewed policy and baseline only after the team has decided what risk is intentionally accepted.
|
|
50
|
+
|
|
51
|
+
## Privacy
|
|
52
|
+
|
|
53
|
+
The audit pack is generated locally. Secret-like environment variables and headers are redacted in reports before they are written.
|
package/docs/baseline.md
CHANGED
|
@@ -30,7 +30,7 @@ If the scan finds only baseline-accepted findings, the exit code is `0`. If a ne
|
|
|
30
30
|
## GitHub Action
|
|
31
31
|
|
|
32
32
|
```yaml
|
|
33
|
-
- uses: ChaoYue0307/mcp-guard-action@v0.4.
|
|
33
|
+
- uses: ChaoYue0307/mcp-guard-action@v0.4.6
|
|
34
34
|
with:
|
|
35
35
|
config: .mcp.json
|
|
36
36
|
baseline: .mcp-guard-baseline.json
|
|
@@ -45,7 +45,7 @@ The generated Markdown, HTML, JSON, and PR comment separate active findings from
|
|
|
45
45
|
{
|
|
46
46
|
"version": 1,
|
|
47
47
|
"generatedAt": "2026-05-10T00:00:00.000Z",
|
|
48
|
-
"toolVersion": "0.4.
|
|
48
|
+
"toolVersion": "0.4.6",
|
|
49
49
|
"findings": [
|
|
50
50
|
{
|
|
51
51
|
"fingerprint": "mcpg_a009b2c2",
|
|
@@ -17,6 +17,7 @@ Deliverables:
|
|
|
17
17
|
- install the CLI and GitHub Action;
|
|
18
18
|
- run `mcp-guard init` or generate an equivalent workflow manually;
|
|
19
19
|
- generate Markdown, HTML, JSON, and SARIF reports;
|
|
20
|
+
- generate a customer handoff audit pack with executive summary, remediation plan, remediation checklist, reports, and manifest;
|
|
20
21
|
- define an initial `.mcp-guard-policy.json` for approved commands, packages, directories, and remote URLs;
|
|
21
22
|
- create an initial baseline for accepted known findings;
|
|
22
23
|
- enable PR comments and optional SARIF upload;
|
|
@@ -40,7 +41,7 @@ I built mcp-guard, an open-source local scanner for MCP and AI agent tool config
|
|
|
40
41
|
|
|
41
42
|
It checks for risky shell access, unpinned npx packages, broad filesystem permissions, exposed secrets, and remote MCP servers.
|
|
42
43
|
|
|
43
|
-
It now includes `mcp-guard init`, which creates a GitHub Action workflow, can generate a baseline for accepted current findings,
|
|
44
|
+
It now includes `mcp-guard init`, which creates a GitHub Action workflow, can generate a baseline for accepted current findings, can enforce a committed policy for approved MCP commands, packages, directories, and URLs, and can export a review-ready audit pack.
|
|
44
45
|
|
|
45
46
|
I am collecting real-world MCP and AI agent config patterns from teams using Claude, Cursor, Codex, or MCP in production-like workflows. If you can share a redacted config or run the CLI locally, your feedback can help improve the scanner's rules and reports.
|
|
46
47
|
```
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# End-to-End Example
|
|
2
2
|
|
|
3
|
-
This example is designed for transparent product evaluation. It uses a synthetic MCP config committed to the repository, then runs the real `mcp-guard` CLI to generate Markdown, HTML, JSON, and
|
|
3
|
+
This example is designed for transparent product evaluation. It uses a synthetic MCP config committed to the repository, then runs the real `mcp-guard` CLI to generate Markdown, HTML, JSON, SARIF, and audit pack outputs.
|
|
4
4
|
|
|
5
5
|
The input is intentionally unsafe so users can see whether the scanner catches concrete risks.
|
|
6
6
|
|
|
@@ -23,6 +23,7 @@ node ./bin/mcp-guard.js scan --config site/e2e/claude_desktop_config.json --form
|
|
|
23
23
|
node ./bin/mcp-guard.js scan --config site/e2e/claude_desktop_config.json --format html --output site/e2e/report.html
|
|
24
24
|
node ./bin/mcp-guard.js scan --config site/e2e/claude_desktop_config.json --format json --output site/e2e/report.json
|
|
25
25
|
node ./bin/mcp-guard.js scan --config site/e2e/claude_desktop_config.json --format sarif --output site/e2e/report.sarif
|
|
26
|
+
node ./bin/mcp-guard.js audit --config site/e2e/claude_desktop_config.json --output-dir site/e2e/audit
|
|
26
27
|
```
|
|
27
28
|
|
|
28
29
|
## Expected Result
|
|
@@ -51,10 +52,14 @@ Important findings include:
|
|
|
51
52
|
- [HTML report](../../site/e2e/report.html)
|
|
52
53
|
- [JSON report](../../site/e2e/report.json)
|
|
53
54
|
- [SARIF report](../../site/e2e/report.sarif)
|
|
55
|
+
- [Audit executive summary](../../site/e2e/audit/mcp-guard-executive-summary.md)
|
|
56
|
+
- [Audit remediation plan](../../site/e2e/audit/mcp-guard-remediation.md)
|
|
57
|
+
- [Audit remediation checklist](../../site/e2e/audit/mcp-guard-remediation-checklist.md)
|
|
58
|
+
- [Audit manifest](../../site/e2e/audit/mcp-guard-audit-manifest.json)
|
|
54
59
|
|
|
55
60
|
## What This Proves
|
|
56
61
|
|
|
57
62
|
- The scanner does not need the config to leave the machine.
|
|
58
63
|
- Secret-like values are redacted in reports.
|
|
59
64
|
- Findings include rule IDs, severity, evidence, and remediation guidance.
|
|
60
|
-
- The same scan can feed a human-readable HTML report, automation JSON,
|
|
65
|
+
- The same scan can feed a human-readable HTML report, automation JSON, GitHub code scanning SARIF, and a review-ready audit handoff package with a remediation checklist.
|
package/docs/github-action.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Use the `mcp-guard` action to scan MCP and AI agent tool configuration in pull requests and CI.
|
|
4
4
|
|
|
5
|
-
The action runs the CLI from the pinned GitHub Action tag, generates Markdown, HTML, JSON, and
|
|
5
|
+
The action runs the CLI from the pinned GitHub Action tag, generates an audit pack with Markdown, HTML, JSON, SARIF, remediation, checklist, and manifest files, writes a job summary, uploads reports as an artifact, and fails the job when findings meet your selected severity threshold.
|
|
6
6
|
|
|
7
7
|
It can also use a committed baseline to accept known findings, enforce a committed policy file, and optionally post a pull request comment with only the active findings.
|
|
8
8
|
|
|
@@ -37,7 +37,7 @@ jobs:
|
|
|
37
37
|
runs-on: ubuntu-latest
|
|
38
38
|
steps:
|
|
39
39
|
- uses: actions/checkout@v6
|
|
40
|
-
- uses: ChaoYue0307/mcp-guard-action@v0.4.
|
|
40
|
+
- uses: ChaoYue0307/mcp-guard-action@v0.4.6
|
|
41
41
|
with:
|
|
42
42
|
config: .mcp.json
|
|
43
43
|
fail-on: high
|
|
@@ -65,7 +65,7 @@ jobs:
|
|
|
65
65
|
runs-on: ubuntu-latest
|
|
66
66
|
steps:
|
|
67
67
|
- uses: actions/checkout@v6
|
|
68
|
-
- uses: ChaoYue0307/mcp-guard-action@v0.4.
|
|
68
|
+
- uses: ChaoYue0307/mcp-guard-action@v0.4.6
|
|
69
69
|
with:
|
|
70
70
|
config: .mcp.json
|
|
71
71
|
fail-on: high
|
|
@@ -77,7 +77,7 @@ jobs:
|
|
|
77
77
|
Use `fail-on: none` when you want artifacts and summaries without blocking a pull request.
|
|
78
78
|
|
|
79
79
|
```yaml
|
|
80
|
-
- uses: ChaoYue0307/mcp-guard-action@v0.4.
|
|
80
|
+
- uses: ChaoYue0307/mcp-guard-action@v0.4.6
|
|
81
81
|
with:
|
|
82
82
|
fail-on: none
|
|
83
83
|
```
|
|
@@ -93,7 +93,7 @@ mcp-guard scan --config .mcp.json --write-baseline .mcp-guard-baseline.json
|
|
|
93
93
|
Commit `.mcp-guard-baseline.json`, then reference it from the action:
|
|
94
94
|
|
|
95
95
|
```yaml
|
|
96
|
-
- uses: ChaoYue0307/mcp-guard-action@v0.4.
|
|
96
|
+
- uses: ChaoYue0307/mcp-guard-action@v0.4.6
|
|
97
97
|
with:
|
|
98
98
|
config: .mcp.json
|
|
99
99
|
baseline: .mcp-guard-baseline.json
|
|
@@ -107,7 +107,7 @@ Reports will show active findings separately from findings accepted by the basel
|
|
|
107
107
|
Use a policy when you want CI to enforce approved commands, packages, directories, and remote URLs.
|
|
108
108
|
|
|
109
109
|
```yaml
|
|
110
|
-
- uses: ChaoYue0307/mcp-guard-action@v0.4.
|
|
110
|
+
- uses: ChaoYue0307/mcp-guard-action@v0.4.6
|
|
111
111
|
with:
|
|
112
112
|
config: .mcp.json
|
|
113
113
|
policy: .mcp-guard-policy.json
|
|
@@ -134,9 +134,13 @@ See [Policy files](policy.md) for the file format.
|
|
|
134
134
|
|
|
135
135
|
| Output | Description |
|
|
136
136
|
| --- | --- |
|
|
137
|
+
| `executive-summary` | Path to the generated executive summary. |
|
|
137
138
|
| `markdown-report` | Path to the generated Markdown report. |
|
|
138
139
|
| `html-report` | Path to the generated HTML report. |
|
|
139
140
|
| `json-report` | Path to the generated JSON report. |
|
|
140
141
|
| `sarif-report` | Path to the generated SARIF report. |
|
|
142
|
+
| `remediation-report` | Path to the generated remediation plan. |
|
|
143
|
+
| `remediation-checklist` | Path to the generated remediation checklist. |
|
|
144
|
+
| `audit-manifest` | Path to the generated audit pack manifest. |
|
|
141
145
|
| `comment-report` | Path to the generated pull request comment body. |
|
|
142
146
|
| `exit-code` | `0` when below threshold, `2` when findings met the threshold. |
|
package/docs/launch-checklist.md
CHANGED
|
@@ -28,10 +28,16 @@ mcp-guard scan
|
|
|
28
28
|
mcp-guard scan --config .mcp.json --fail-on high
|
|
29
29
|
```
|
|
30
30
|
|
|
31
|
+
## Audit Pack
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
mcp-guard audit --config .mcp.json --policy .mcp-guard-policy.json --output-dir mcp-guard-audit
|
|
35
|
+
```
|
|
36
|
+
|
|
31
37
|
## GitHub Action Setup
|
|
32
38
|
|
|
33
39
|
```yaml
|
|
34
|
-
- uses: ChaoYue0307/mcp-guard-action@v0.4.
|
|
40
|
+
- uses: ChaoYue0307/mcp-guard-action@v0.4.6
|
|
35
41
|
with:
|
|
36
42
|
config: .mcp.json
|
|
37
43
|
baseline: .mcp-guard-baseline.json
|
|
@@ -23,7 +23,7 @@ jobs:
|
|
|
23
23
|
runs-on: ubuntu-latest
|
|
24
24
|
steps:
|
|
25
25
|
- uses: actions/checkout@v6
|
|
26
|
-
- uses: ChaoYue0307/mcp-guard-action@v0.4.
|
|
26
|
+
- uses: ChaoYue0307/mcp-guard-action@v0.4.6
|
|
27
27
|
with:
|
|
28
28
|
config: .mcp.json
|
|
29
29
|
fail-on: high
|
|
@@ -42,7 +42,7 @@ jobs:
|
|
|
42
42
|
runs-on: ubuntu-latest
|
|
43
43
|
steps:
|
|
44
44
|
- uses: actions/checkout@v6
|
|
45
|
-
- uses: ChaoYue0307/mcp-guard-action@v0.4.
|
|
45
|
+
- uses: ChaoYue0307/mcp-guard-action@v0.4.6
|
|
46
46
|
with:
|
|
47
47
|
config: .mcp.json
|
|
48
48
|
fail-on: high
|
|
@@ -67,21 +67,28 @@ jobs:
|
|
|
67
67
|
|
|
68
68
|
| Output | Description |
|
|
69
69
|
| --- | --- |
|
|
70
|
+
| `executive-summary` | Path to the generated executive summary. |
|
|
70
71
|
| `markdown-report` | Path to the generated Markdown report. |
|
|
71
72
|
| `html-report` | Path to the generated HTML report. |
|
|
72
73
|
| `json-report` | Path to the generated JSON report. |
|
|
73
74
|
| `sarif-report` | Path to the generated SARIF report. |
|
|
75
|
+
| `remediation-report` | Path to the generated remediation plan. |
|
|
76
|
+
| `remediation-checklist` | Path to the generated remediation checklist. |
|
|
77
|
+
| `audit-manifest` | Path to the generated audit pack manifest. |
|
|
74
78
|
| `comment-report` | Path to the generated pull request comment body. |
|
|
75
79
|
| `exit-code` | `0` when below threshold, `2` when findings met the threshold. |
|
|
76
80
|
|
|
77
81
|
## Reports
|
|
78
82
|
|
|
79
|
-
The action generates:
|
|
83
|
+
The action generates an audit pack:
|
|
80
84
|
|
|
81
85
|
- Markdown for pull request review.
|
|
82
86
|
- HTML for review-ready artifacts.
|
|
83
87
|
- JSON for automation.
|
|
84
88
|
- SARIF 2.1.0 for GitHub code scanning.
|
|
89
|
+
- Remediation Markdown for server-by-server handoff.
|
|
90
|
+
- Remediation checklist for PR and setup tracking.
|
|
91
|
+
- Audit manifest JSON for downstream automation.
|
|
85
92
|
|
|
86
93
|
Secret-like values are redacted before reports are written.
|
|
87
94
|
|
|
@@ -96,7 +103,7 @@ mcp-guard scan --config .mcp.json --write-baseline .mcp-guard-baseline.json
|
|
|
96
103
|
Then enforce only new findings:
|
|
97
104
|
|
|
98
105
|
```yaml
|
|
99
|
-
- uses: ChaoYue0307/mcp-guard-action@v0.4.
|
|
106
|
+
- uses: ChaoYue0307/mcp-guard-action@v0.4.6
|
|
100
107
|
with:
|
|
101
108
|
config: .mcp.json
|
|
102
109
|
baseline: .mcp-guard-baseline.json
|
|
@@ -108,7 +115,7 @@ Then enforce only new findings:
|
|
|
108
115
|
Commit `.mcp-guard-policy.json` or pass `policy` to enforce approved commands, remote packages, directories, and remote MCP URLs.
|
|
109
116
|
|
|
110
117
|
```yaml
|
|
111
|
-
- uses: ChaoYue0307/mcp-guard-action@v0.4.
|
|
118
|
+
- uses: ChaoYue0307/mcp-guard-action@v0.4.6
|
|
112
119
|
with:
|
|
113
120
|
config: .mcp.json
|
|
114
121
|
policy: .mcp-guard-policy.json
|
package/docs/marketplace.md
CHANGED
|
@@ -82,18 +82,17 @@ Code quality
|
|
|
82
82
|
Current release title:
|
|
83
83
|
|
|
84
84
|
```text
|
|
85
|
-
v0.4.
|
|
85
|
+
v0.4.6
|
|
86
86
|
```
|
|
87
87
|
|
|
88
88
|
Release notes:
|
|
89
89
|
|
|
90
90
|
```text
|
|
91
|
-
|
|
91
|
+
Remediation checklist release.
|
|
92
92
|
|
|
93
|
-
- Adds
|
|
94
|
-
-
|
|
95
|
-
-
|
|
96
|
-
- Keeps Node.js 24, PR comments, artifacts, and SARIF upload support.
|
|
93
|
+
- Adds a checkbox remediation checklist to every `mcp-guard audit` pack.
|
|
94
|
+
- PR comments and job summaries now include first remediation steps, not only finding counts.
|
|
95
|
+
- Keeps executive summary, remediation plan, Markdown, HTML, JSON, SARIF, manifest, policy, baseline, artifacts, and SARIF upload support.
|
|
97
96
|
```
|
|
98
97
|
|
|
99
98
|
## Manual Publishing Steps
|
|
@@ -106,7 +105,7 @@ Completed:
|
|
|
106
105
|
- README, docs, and website examples now use:
|
|
107
106
|
|
|
108
107
|
```yaml
|
|
109
|
-
- uses: ChaoYue0307/mcp-guard-action@v0.4.
|
|
108
|
+
- uses: ChaoYue0307/mcp-guard-action@v0.4.6
|
|
110
109
|
```
|
|
111
110
|
|
|
112
111
|
Remaining Marketplace web step:
|
package/docs/operator-runbook.md
CHANGED
|
@@ -11,6 +11,7 @@ npm test
|
|
|
11
11
|
npm run release:check
|
|
12
12
|
npm --cache ./.npm-cache pack --dry-run
|
|
13
13
|
node ./bin/mcp-guard.js scan --config examples/unsafe-claude_desktop_config.json
|
|
14
|
+
node ./bin/mcp-guard.js audit --config examples/unsafe-claude_desktop_config.json --policy examples/mcp-guard-policy.json --output-dir .release-check/audit-pack
|
|
14
15
|
```
|
|
15
16
|
|
|
16
17
|
If your global npm cache has permission errors, either keep using the local cache flag above or fix ownership:
|
package/docs/paid-audit.md
CHANGED
|
@@ -13,6 +13,7 @@ It is not currently advertised as an active consulting service. Keep public webs
|
|
|
13
13
|
## Deliverables
|
|
14
14
|
|
|
15
15
|
- MCP and agent tool inventory.
|
|
16
|
+
- `mcp-guard audit` evidence pack with executive summary, remediation plan, remediation checklist, reports, and manifest.
|
|
16
17
|
- Risk report covering shell access, package execution, filesystem scope, secrets, remote servers, and dangerous commands.
|
|
17
18
|
- Practical remediation checklist.
|
|
18
19
|
- Optional PR with safer config and policy changes.
|
package/docs/roadmap.md
CHANGED
|
@@ -13,14 +13,15 @@
|
|
|
13
13
|
- Optional GitHub pull request comments from the Marketplace Action.
|
|
14
14
|
- `mcp-guard init` for bootstrapping a GitHub Action workflow and optional baseline.
|
|
15
15
|
- Policy file enforcement for approved commands, packages, directories, and remote URLs.
|
|
16
|
+
- `mcp-guard audit` for review-ready executive summaries, remediation plans, remediation checklists, reports, and manifests.
|
|
16
17
|
- npm Trusted Publishing workflow prepared for tokenless release publishing.
|
|
17
18
|
|
|
18
19
|
## Next
|
|
19
20
|
|
|
20
21
|
1. More MCP client discovery paths.
|
|
21
22
|
2. Rule packs mapped to MCP security best practices.
|
|
22
|
-
3.
|
|
23
|
-
4.
|
|
23
|
+
3. Safer default remediation snippets for common MCP servers.
|
|
24
|
+
4. Package metadata checks for remote MCP server packages.
|
|
24
25
|
|
|
25
26
|
## Later
|
|
26
27
|
|
|
@@ -36,7 +36,7 @@ Configure this once on npmjs.com:
|
|
|
36
36
|
After this is saved, run the workflow from GitHub Actions with the release tag, for example:
|
|
37
37
|
|
|
38
38
|
```text
|
|
39
|
-
v0.4.
|
|
39
|
+
v0.4.6
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
## Release Flow After Setup
|
|
@@ -44,7 +44,7 @@ v0.4.4
|
|
|
44
44
|
1. Update `package.json` and `src/cli.js`.
|
|
45
45
|
2. Run `npm test` and `npm run release:check`.
|
|
46
46
|
3. Commit and push to `main`.
|
|
47
|
-
4. Create a GitHub release tag such as `v0.4.
|
|
47
|
+
4. Create a GitHub release tag such as `v0.4.6`.
|
|
48
48
|
5. Run the `Publish npm` workflow with the same tag.
|
|
49
49
|
6. Verify npm:
|
|
50
50
|
|
|
@@ -1,47 +1,57 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
1
|
+
mcp-guard scan report
|
|
2
|
+
Generated: 2026-05-10T14:16:12.638Z
|
|
3
|
+
Scanned files: 1
|
|
4
|
+
MCP servers: 3
|
|
5
|
+
Active findings: 9
|
|
6
|
+
Risk score: 98
|
|
7
|
+
Critical: 2 High: 5 Medium: 2 Low: 0
|
|
8
|
+
|
|
9
|
+
Scanned config files:
|
|
10
|
+
- examples/unsafe-claude_desktop_config.json
|
|
11
|
+
|
|
12
|
+
Active findings:
|
|
13
|
+
- [CRITICAL] MCP010 Shell command executes inline script
|
|
14
|
+
Server: shell-installer
|
|
15
|
+
Evidence: command=bash args=-c curl https://example.com/install.sh | bash
|
|
16
|
+
Fingerprint: mcpg_a009b2c2
|
|
17
|
+
Fix: Use a direct, pinned executable instead of a shell wrapper. If a shell is required, place the script in source control and review it.
|
|
18
|
+
- [CRITICAL] MCP050 MCP server command includes a dangerous operation
|
|
19
|
+
Server: shell-installer
|
|
20
|
+
Evidence: curl pipe to shell
|
|
21
|
+
Fingerprint: mcpg_6bd13204
|
|
22
|
+
Fix: Remove the dangerous operation from MCP startup. Run destructive setup steps manually and review them separately.
|
|
23
|
+
- [HIGH] MCP021 Remote MCP package is not version pinned
|
|
24
|
+
Server: filesystem-all-home
|
|
25
|
+
Evidence: package=@modelcontextprotocol/server-filesystem
|
|
26
|
+
Fingerprint: mcpg_d0af49fa
|
|
27
|
+
Fix: Pin the package to an exact version such as package@1.2.3 and review updates before changing it.
|
|
28
|
+
- [HIGH] MCP030 Secret-like environment variable is exposed to MCP server
|
|
29
|
+
Server: filesystem-all-home
|
|
30
|
+
Evidence: GITHUB_TOKEN=ghp...890 (32 chars)
|
|
31
|
+
Fingerprint: mcpg_a5f382b0
|
|
32
|
+
Fix: Pass the least privileged token possible. Prefer scoped tokens, short-lived credentials, and a dedicated service account.
|
|
33
|
+
- [HIGH] MCP040 MCP server has a broad working directory
|
|
34
|
+
Server: filesystem-all-home
|
|
35
|
+
Evidence: cwd=/
|
|
36
|
+
Fingerprint: mcpg_31aaa689
|
|
37
|
+
Fix: Run the server in a narrow project directory or sandbox with only the files it needs.
|
|
38
|
+
- [HIGH] MCP041 MCP server argument grants broad filesystem access
|
|
39
|
+
Server: filesystem-all-home
|
|
40
|
+
Evidence: arg=/
|
|
41
|
+
Fingerprint: mcpg_dbc08d76
|
|
42
|
+
Fix: Replace broad filesystem paths with a dedicated project folder or read-only sandbox path.
|
|
43
|
+
- [HIGH] MCP061 Secret-like header is configured for remote MCP server
|
|
44
|
+
Server: remote-prod
|
|
45
|
+
Evidence: Authorization=Bea...ken (27 chars)
|
|
46
|
+
Fingerprint: mcpg_5abd4cbd
|
|
47
|
+
Fix: Use scoped, short-lived credentials and avoid placing long-lived secrets directly in MCP config files.
|
|
48
|
+
- [MEDIUM] MCP020 MCP server is launched through a remote package runner
|
|
49
|
+
Server: filesystem-all-home
|
|
50
|
+
Evidence: command=npx package=@modelcontextprotocol/server-filesystem
|
|
51
|
+
Fingerprint: mcpg_a3493a53
|
|
52
|
+
Fix: Pin the package version, review the package source, and prefer a local lockfile or vendored executable for sensitive tools.
|
|
53
|
+
- [MEDIUM] MCP060 Remote MCP server URL is configured
|
|
54
|
+
Server: remote-prod
|
|
55
|
+
Evidence: url=https://mcp.example.com/sse
|
|
56
|
+
Fingerprint: mcpg_cf1296e4
|
|
57
|
+
Fix: Verify the provider, use HTTPS, document the data sent to this server, and keep an allowlist of approved remote endpoints.
|
package/package.json
CHANGED