agent-mcp-guard 0.4.4 → 0.4.5

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 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.4"><img alt="Release" src="https://img.shields.io/github/v/release/ChaoYue0307/mcp-guard?color=7c2d12"></a>
22
+ <a href="https://github.com/ChaoYue0307/mcp-guard/releases/tag/v0.4.5"><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.4
96
+ - uses: ChaoYue0307/mcp-guard-action@v0.4.5
91
97
  with:
92
98
  config: .mcp.json
93
99
  # policy: .mcp-guard-policy.json
@@ -108,6 +114,8 @@ 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)
111
119
 
112
120
  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
121
 
@@ -137,6 +145,13 @@ For the GitHub Action workflow, inspect the public demo repository: [ChaoYue0307
137
145
 
138
146
  The GitHub Action can also post an optional pull request comment with the active finding summary.
139
147
 
148
+ For paid setup or internal review handoff, `mcp-guard audit` writes a complete evidence package with:
149
+
150
+ - executive summary;
151
+ - remediation plan grouped by MCP server;
152
+ - Markdown, HTML, JSON, and SARIF reports;
153
+ - machine-readable audit manifest.
154
+
140
155
  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
156
 
142
157
  For a guided setup, run:
@@ -213,6 +228,7 @@ Contact: [hechaoyue0307@gmail.com](mailto:hechaoyue0307@gmail.com)
213
228
  ## Documentation
214
229
 
215
230
  - [Rule reference](docs/rules.md)
231
+ - [Audit packs](docs/audit.md)
216
232
  - [Baseline and allowlist](docs/baseline.md)
217
233
  - [Policy files](docs/policy.md)
218
234
  - [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,12 @@ 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
+ audit-manifest:
67
+ description: Path to the generated audit pack manifest.
68
+ value: ${{ steps.reports.outputs.audit-manifest }}
60
69
  exit-code:
61
70
  description: mcp-guard threshold exit code.
62
71
  value: ${{ steps.reports.outputs.exit-code }}
@@ -103,29 +112,37 @@ runs:
103
112
  html_report="${MCP_GUARD_OUTPUT_DIR}/mcp-guard-report.html"
104
113
  json_report="${MCP_GUARD_OUTPUT_DIR}/mcp-guard-report.json"
105
114
  sarif_report="${MCP_GUARD_OUTPUT_DIR}/mcp-guard.sarif"
115
+ executive_summary="${MCP_GUARD_OUTPUT_DIR}/mcp-guard-executive-summary.md"
116
+ remediation_report="${MCP_GUARD_OUTPUT_DIR}/mcp-guard-remediation.md"
117
+ audit_manifest="${MCP_GUARD_OUTPUT_DIR}/mcp-guard-audit-manifest.json"
106
118
  comment_report="${MCP_GUARD_OUTPUT_DIR}/mcp-guard-pr-comment.md"
107
119
 
108
- node "${guard_bin}" scan "${scan_args[@]}" --format markdown --output "${markdown_report}" --fail-on none
109
- node "${guard_bin}" scan "${scan_args[@]}" --format html --output "${html_report}" --fail-on none
110
- node "${guard_bin}" scan "${scan_args[@]}" --format json --output "${json_report}" --fail-on none
111
- node "${guard_bin}" scan "${scan_args[@]}" --format sarif --output "${sarif_report}" --fail-on none
120
+ set +e
121
+ node "${guard_bin}" audit "${scan_args[@]}" --output-dir "${MCP_GUARD_OUTPUT_DIR}" --fail-on "${MCP_GUARD_FAIL_ON}"
122
+ status="$?"
123
+ set -e
124
+ if [ "${status}" != "0" ] && [ "${status}" != "2" ]; then
125
+ exit "${status}"
126
+ fi
127
+
112
128
  node "${GITHUB_ACTION_PATH}/scripts/action-comment.js" \
113
129
  "${json_report}" \
114
130
  "${markdown_report}" \
115
131
  "${html_report}" \
116
132
  "${sarif_report}" \
117
- "${MCP_GUARD_FAIL_ON}" > "${comment_report}"
118
-
119
- set +e
120
- node "${guard_bin}" scan "${scan_args[@]}" --fail-on "${MCP_GUARD_FAIL_ON}"
121
- status="$?"
122
- set -e
133
+ "${MCP_GUARD_FAIL_ON}" \
134
+ "${executive_summary}" \
135
+ "${remediation_report}" \
136
+ "${audit_manifest}" > "${comment_report}"
123
137
 
124
138
  {
139
+ echo "executive-summary=${executive_summary}"
125
140
  echo "markdown-report=${markdown_report}"
126
141
  echo "html-report=${html_report}"
127
142
  echo "json-report=${json_report}"
128
143
  echo "sarif-report=${sarif_report}"
144
+ echo "remediation-report=${remediation_report}"
145
+ echo "audit-manifest=${audit_manifest}"
129
146
  echo "comment-report=${comment_report}"
130
147
  echo "exit-code=${status}"
131
148
  } >> "${GITHUB_OUTPUT}"
@@ -141,7 +158,10 @@ runs:
141
158
  "${{ steps.reports.outputs.markdown-report }}" \
142
159
  "${{ steps.reports.outputs.html-report }}" \
143
160
  "${{ steps.reports.outputs.sarif-report }}" \
144
- "${MCP_GUARD_FAIL_ON}" >> "${GITHUB_STEP_SUMMARY}"
161
+ "${MCP_GUARD_FAIL_ON}" \
162
+ "${{ steps.reports.outputs.executive-summary }}" \
163
+ "${{ steps.reports.outputs.remediation-report }}" \
164
+ "${{ steps.reports.outputs.audit-manifest }}" >> "${GITHUB_STEP_SUMMARY}"
145
165
 
146
166
  - name: Comment on pull request
147
167
  if: ${{ always() && inputs.comment-pr == 'true' && github.event_name == 'pull_request' && steps.reports.outputs.comment-report != '' }}
package/docs/audit.md ADDED
@@ -0,0 +1,51 @@
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-report.md` | Full Markdown scan report. |
36
+ | `mcp-guard-report.html` | Readable HTML report for review artifacts. |
37
+ | `mcp-guard-report.json` | Redacted machine-readable report for automation. |
38
+ | `mcp-guard.sarif` | SARIF 2.1.0 report for GitHub code scanning. |
39
+ | `mcp-guard-audit-manifest.json` | Manifest listing status, summary, policy/baseline context, and file paths. |
40
+
41
+ ## Review Flow
42
+
43
+ 1. Run `mcp-guard audit` locally or through the GitHub Action.
44
+ 2. Open `mcp-guard-executive-summary.md` to decide whether the MCP setup is acceptable.
45
+ 3. Work through `mcp-guard-remediation.md` with the engineering team.
46
+ 4. Use `mcp-guard-report.html` for readable evidence and `mcp-guard-report.json` or `mcp-guard.sarif` for automation.
47
+ 5. Commit a reviewed policy and baseline only after the team has decided what risk is intentionally accepted.
48
+
49
+ ## Privacy
50
+
51
+ 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.4
33
+ - uses: ChaoYue0307/mcp-guard-action@v0.4.5
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.4",
48
+ "toolVersion": "0.4.5",
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, 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, and can enforce a committed policy for approved MCP commands, packages, directories, and URLs.
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 SARIF outputs.
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,13 @@ 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 manifest](../../site/e2e/audit/mcp-guard-audit-manifest.json)
54
58
 
55
59
  ## What This Proves
56
60
 
57
61
  - The scanner does not need the config to leave the machine.
58
62
  - Secret-like values are redacted in reports.
59
63
  - Findings include rule IDs, severity, evidence, and remediation guidance.
60
- - The same scan can feed a human-readable HTML report, automation JSON, and GitHub code scanning SARIF.
64
+ - The same scan can feed a human-readable HTML report, automation JSON, GitHub code scanning SARIF, and a review-ready audit handoff package.
@@ -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 SARIF reports, writes a job summary, uploads reports as an artifact, and fails the job when findings meet your selected severity threshold.
5
+ The action runs the CLI from the pinned GitHub Action tag, generates an audit pack with Markdown, HTML, JSON, SARIF, remediation, 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.4
40
+ - uses: ChaoYue0307/mcp-guard-action@v0.4.5
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.4
68
+ - uses: ChaoYue0307/mcp-guard-action@v0.4.5
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.4
80
+ - uses: ChaoYue0307/mcp-guard-action@v0.4.5
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.4
96
+ - uses: ChaoYue0307/mcp-guard-action@v0.4.5
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.4
110
+ - uses: ChaoYue0307/mcp-guard-action@v0.4.5
111
111
  with:
112
112
  config: .mcp.json
113
113
  policy: .mcp-guard-policy.json
@@ -134,9 +134,12 @@ 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
+ | `audit-manifest` | Path to the generated audit pack manifest. |
141
144
  | `comment-report` | Path to the generated pull request comment body. |
142
145
  | `exit-code` | `0` when below threshold, `2` when findings met the threshold. |
@@ -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.4
40
+ - uses: ChaoYue0307/mcp-guard-action@v0.4.5
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.4
26
+ - uses: ChaoYue0307/mcp-guard-action@v0.4.5
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.4
45
+ - uses: ChaoYue0307/mcp-guard-action@v0.4.5
46
46
  with:
47
47
  config: .mcp.json
48
48
  fail-on: high
@@ -67,21 +67,26 @@ 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
+ | `audit-manifest` | Path to the generated audit pack manifest. |
74
77
  | `comment-report` | Path to the generated pull request comment body. |
75
78
  | `exit-code` | `0` when below threshold, `2` when findings met the threshold. |
76
79
 
77
80
  ## Reports
78
81
 
79
- The action generates:
82
+ The action generates an audit pack:
80
83
 
81
84
  - Markdown for pull request review.
82
85
  - HTML for review-ready artifacts.
83
86
  - JSON for automation.
84
87
  - SARIF 2.1.0 for GitHub code scanning.
88
+ - Remediation Markdown for server-by-server handoff.
89
+ - Audit manifest JSON for downstream automation.
85
90
 
86
91
  Secret-like values are redacted before reports are written.
87
92
 
@@ -96,7 +101,7 @@ mcp-guard scan --config .mcp.json --write-baseline .mcp-guard-baseline.json
96
101
  Then enforce only new findings:
97
102
 
98
103
  ```yaml
99
- - uses: ChaoYue0307/mcp-guard-action@v0.4.4
104
+ - uses: ChaoYue0307/mcp-guard-action@v0.4.5
100
105
  with:
101
106
  config: .mcp.json
102
107
  baseline: .mcp-guard-baseline.json
@@ -108,7 +113,7 @@ Then enforce only new findings:
108
113
  Commit `.mcp-guard-policy.json` or pass `policy` to enforce approved commands, remote packages, directories, and remote MCP URLs.
109
114
 
110
115
  ```yaml
111
- - uses: ChaoYue0307/mcp-guard-action@v0.4.4
116
+ - uses: ChaoYue0307/mcp-guard-action@v0.4.5
112
117
  with:
113
118
  config: .mcp.json
114
119
  policy: .mcp-guard-policy.json
@@ -82,18 +82,17 @@ Code quality
82
82
  Current release title:
83
83
 
84
84
  ```text
85
- v0.4.4
85
+ v0.4.5
86
86
  ```
87
87
 
88
88
  Release notes:
89
89
 
90
90
  ```text
91
- Policy enforcement release.
91
+ Audit pack release.
92
92
 
93
- - Adds `.mcp-guard-policy.json` support for approved commands, packages, directories, and remote URLs.
94
- - Adds the `policy` GitHub Action input and automatic root policy discovery.
95
- - Adds MCP070-MCP074 policy findings.
96
- - Keeps Node.js 24, PR comments, artifacts, and SARIF upload support.
93
+ - Adds `mcp-guard audit` for executive summary, remediation plan, Markdown, HTML, JSON, SARIF, and manifest outputs.
94
+ - The GitHub Action now uploads audit pack artifacts, including remediation and manifest files.
95
+ - Keeps policy enforcement, baseline support, PR comments, 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.4
108
+ - uses: ChaoYue0307/mcp-guard-action@v0.4.5
110
109
  ```
111
110
 
112
111
  Remaining Marketplace web step:
@@ -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:
@@ -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, 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, 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. `mcp-guard audit` mode for review-ready reports.
23
- 4. Safer default remediation snippets for common MCP servers.
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.4
39
+ v0.4.5
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.4`.
47
+ 4. Create a GitHub release tag such as `v0.4.5`.
48
48
  5. Run the `Publish npm` workflow with the same tag.
49
49
  6. Verify npm:
50
50
 
@@ -1,47 +1,57 @@
1
- # mcp-guard Scan Report
2
-
3
- Generated: 2026-05-10T14:01:29.032Z
4
-
5
- ## Summary
6
-
7
- - Scanned files: 1
8
- - MCP servers: 3
9
- - Active findings: 9
10
- - Risk score: 98
11
- - Critical: 2
12
- - High: 5
13
- - Medium: 2
14
- - Low: 0
15
-
16
- ## Scanned Files
17
-
18
- - `examples/unsafe-claude_desktop_config.json`
19
-
20
- ## MCP Server Inventory
21
-
22
- | Server | Command | Args | CWD | URL | Env |
23
- | --- | --- | --- | --- | --- | --- |
24
- | filesystem-all-home | npx | @modelcontextprotocol/server-filesystem / | / | - | GITHUB_TOKEN=ghp...890 (32 chars) |
25
- | shell-installer | bash | -c curl https://example.com/install.sh \| bash | - | - | - |
26
- | remote-prod | - | - | - | https://mcp.example.com/sse | - |
27
-
28
- ## Active Findings
29
-
30
- | Severity | Rule | Server | Finding | Evidence | Fingerprint | Recommendation |
31
- | --- | --- | --- | --- | --- | --- | --- |
32
- | critical | MCP010 | shell-installer | Shell command executes inline script | command=bash args=-c curl https://example.com/install.sh \| bash | mcpg_a009b2c2 | Use a direct, pinned executable instead of a shell wrapper. If a shell is required, place the script in source control and review it. |
33
- | critical | MCP050 | shell-installer | MCP server command includes a dangerous operation | curl pipe to shell | mcpg_6bd13204 | Remove the dangerous operation from MCP startup. Run destructive setup steps manually and review them separately. |
34
- | high | MCP021 | filesystem-all-home | Remote MCP package is not version pinned | package=@modelcontextprotocol/server-filesystem | mcpg_d0af49fa | Pin the package to an exact version such as package@1.2.3 and review updates before changing it. |
35
- | high | MCP030 | filesystem-all-home | Secret-like environment variable is exposed to MCP server | GITHUB_TOKEN=ghp...890 (32 chars) | mcpg_a5f382b0 | Pass the least privileged token possible. Prefer scoped tokens, short-lived credentials, and a dedicated service account. |
36
- | high | MCP040 | filesystem-all-home | MCP server has a broad working directory | cwd=/ | mcpg_31aaa689 | Run the server in a narrow project directory or sandbox with only the files it needs. |
37
- | high | MCP041 | filesystem-all-home | MCP server argument grants broad filesystem access | arg=/ | mcpg_dbc08d76 | Replace broad filesystem paths with a dedicated project folder or read-only sandbox path. |
38
- | high | MCP061 | remote-prod | Secret-like header is configured for remote MCP server | Authorization=Bea...ken (27 chars) | mcpg_5abd4cbd | Use scoped, short-lived credentials and avoid placing long-lived secrets directly in MCP config files. |
39
- | medium | MCP020 | filesystem-all-home | MCP server is launched through a remote package runner | command=npx package=@modelcontextprotocol/server-filesystem | mcpg_a3493a53 | Pin the package version, review the package source, and prefer a local lockfile or vendored executable for sensitive tools. |
40
- | medium | MCP060 | remote-prod | Remote MCP server URL is configured | url=https://mcp.example.com/sse | mcpg_cf1296e4 | Verify the provider, use HTTPS, document the data sent to this server, and keep an allowlist of approved remote endpoints. |
41
-
42
- ## Notes
43
-
44
- - This report is an assistive security review, not a guarantee that all issues were found.
45
- - Secret-like values are redacted by default.
46
- - Review each MCP server before granting access to files, shells, SaaS accounts, or production systems.
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-mcp-guard",
3
- "version": "0.4.4",
3
+ "version": "0.4.5",
4
4
  "description": "Open-source CLI scanner for risky MCP server and AI agent tool configuration.",
5
5
  "type": "module",
6
6
  "homepage": "https://chaoyue0307.github.io/mcp-guard/",
@@ -3,10 +3,10 @@
3
3
  import fs from "node:fs";
4
4
  import path from "node:path";
5
5
 
6
- const [jsonReportPath, markdownReportPath, htmlReportPath, sarifReportPath, failOn] = process.argv.slice(2);
6
+ const [jsonReportPath, markdownReportPath, htmlReportPath, sarifReportPath, failOn, executiveSummaryPath, remediationReportPath, auditManifestPath] = process.argv.slice(2);
7
7
 
8
8
  if (!jsonReportPath) {
9
- process.stderr.write("Usage: action-comment.js <json-report> <markdown-report> <html-report> <sarif-report> <fail-on>\n");
9
+ process.stderr.write("Usage: action-comment.js <json-report> <markdown-report> <html-report> <sarif-report> <fail-on> [executive-summary] [remediation-report] [audit-manifest]\n");
10
10
  process.exit(1);
11
11
  }
12
12
 
@@ -61,6 +61,15 @@ lines.push(`- Markdown: \`${relative(markdownReportPath)}\``);
61
61
  lines.push(`- HTML: \`${relative(htmlReportPath)}\``);
62
62
  lines.push(`- JSON: \`${relative(jsonReportPath)}\``);
63
63
  lines.push(`- SARIF: \`${relative(sarifReportPath)}\``);
64
+ if (executiveSummaryPath) {
65
+ lines.push(`- Executive summary: \`${relative(executiveSummaryPath)}\``);
66
+ }
67
+ if (remediationReportPath) {
68
+ lines.push(`- Remediation: \`${relative(remediationReportPath)}\``);
69
+ }
70
+ if (auditManifestPath) {
71
+ lines.push(`- Audit manifest: \`${relative(auditManifestPath)}\``);
72
+ }
64
73
  lines.push("");
65
74
 
66
75
  process.stdout.write(`${lines.join("\n")}\n`);