correctover-scan 1.4.0 → 1.6.0

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Correctover
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,23 +1,42 @@
1
1
  # correctover-scan
2
2
 
3
- > CCS Security Scanner for MCP configurations — 14 security checks mapped to OWASP AISVS 1.0
3
+ > Security scanner for MCP servers and AI agents detects credential exposure, SSRF, command injection risk and missing auth across your MCP configuration. 14 checks mapped to OWASP AISVS 1.0. Run anywhere with `npx correctover-scan`.
4
4
 
5
5
  ![npm](https://img.shields.io/npm/v/correctover-scan)
6
- ![license](https://img.shields.io/npm/l/correctover-scan)
6
+ ![license](https://img.shields.io/npm/l/correctover-scan) [![IETF Internet-Draft](https://img.shields.io/badge/IETF-draft--correctover--ccs-blue)](https://datatracker.ietf.org/doc/draft-correctover-ccs/)
7
7
 
8
- Scan your AI Agent MCP configuration files for security issues. Detects credential exposure, SSRF vulnerabilities, missing auth, and 11 more security checks.
8
+ ---
9
9
 
10
- ## Quick Start
10
+ ### Verifiable artifacts behind this tool
11
+
12
+ - **Third-party interoperability** — joint assessment merged into the [EMILIA protocol](https://github.com/emiliaprotocol/emilia-protocol/pull/693)
13
+ - **66 signed conformance test vectors** — reproducible by anyone: [ccs-conformance-vectors](https://github.com/DSHCorrectover/ccs-conformance-vectors)
14
+ - **Published methodology** — [Zenodo DOI 10.5281/zenodo.21783723](https://doi.org/10.5281/zenodo.21783723)
15
+ - **Need a human audit?** — 116-check manual audit methodology, 5-day turnaround: [Agent Output Audit](https://correctover.com/agent-audit.html)
16
+
17
+ `correctover-scan` audits the MCP (Model Context Protocol) configuration files used by Claude Code, Claude Desktop, Cursor, VS Code and other AI agent tools. It scans for credential leaks, SSRF exposure, missing transport encryption, over-broad tool permissions and more — 14 security checks covering the issues that turn MCP integrations into RCE, data exfiltration and prompt-injection paths. Zero install: `npx correctover-scan` runs locally, works in CI, and outputs SARIF for GitHub code scanning.
18
+
19
+ **v1.4.0** adds a second mode: `--bundle` code-layer signal scanning for published npm packages and bundled/minified JavaScript — 17 checks over shipped code, with [file+line findings, minified-code reformatting and context-based false-positive suppression](#-bundle--published-package-code-scan-v140).
20
+
21
+ ## ⚡ Quick Start — running in 30 seconds
22
+
23
+ Zero config, no account, no sign-up — scan the current directory for MCP configuration issues:
24
+
25
+ ```bash
26
+ npx correctover-scan@latest
27
+ ```
28
+
29
+ It auto-detects MCP config files (`.cursor/mcp.json`, `claude_desktop_config.json`, `.claude/mcp.json`, `mcp.json`, `.vscode/mcp.json` and more) and runs 14 checks. Everything runs locally on your machine — config files are not uploaded.
11
30
 
12
31
  ```bash
13
32
  # Scan a specific config file
14
33
  npx correctover-scan mcp.json
15
34
 
16
- # Auto-detect and scan all MCP configs in current directory
17
- npx correctover-scan
35
+ # Recursively scan a project directory
36
+ npx correctover-scan -d ./my-project -r
18
37
 
19
- # Scan a directory
20
- npx correctover-scan -d ./my-project
38
+ # SARIF output for GitHub code scanning
39
+ npx correctover-scan mcp.json -f sarif > report.sarif
21
40
  ```
22
41
 
23
42
  ## What It Checks
@@ -63,12 +82,74 @@ Auto-detects these files:
63
82
  - `.mcp/mcp.json`
64
83
  - `config/mcp.json`
65
84
 
85
+ ## 📦 Bundle / published-package code scan (v1.4.0)
86
+
87
+ ### Usage
88
+
89
+ ```bash
90
+ # Audit an unpacked npm package: reads package.json entry (main/module/bin)
91
+ # and every .js/.mjs/.cjs/.ts file in the tree (node_modules skipped)
92
+ npx correctover-scan@latest --bundle ./node_modules/some-pkg
93
+ npx correctover-scan@latest -b ./pkg # -b is shorthand for --bundle
94
+
95
+ # Audit a single minified/bundled JS file
96
+ npx correctover-scan@latest --bundle dist/app.min.js
97
+
98
+ # A positional .js/.mjs/.cjs/.ts target auto-selects bundle mode
99
+ npx correctover-scan@latest ./cli.js
100
+
101
+ # Outputs: text (default), JSON, or SARIF with file+line locations
102
+ npx correctover-scan@latest -b ./pkg -f json
103
+ npx correctover-scan@latest -b ./pkg -f sarif > bundle.sarif
104
+ npx correctover-scan@latest -b ./pkg -o report.txt # write the report to a file
105
+ npx correctover-scan@latest -b ./pkg -f json -o bundle.json
106
+ ```
107
+
108
+ Exit code is `1` when any check produces a fail-level finding — drop the command straight into CI.
109
+
110
+ ### What bundle mode is — and what it is not
111
+
112
+ Bundle mode is **signal scanning over shipped/minified code**. Minifiers rename local variables, but property names, string literals, URLs, environment-variable names and error messages survive bundling — so the attack-surface signals the checks rely on are still present in the published artifact.
113
+
114
+ - **12 automatic checks** return a verdict (pass / warn / fail) — hardcoded secrets, cloud-metadata/SSRF, `shell:true`/`exec` subprocess calls, dynamic `eval`/`Function`/`vm`, plaintext endpoints, MCP transport auth, permission gates, missing timeouts/kill-switch/input validation, env-credential flow, sandbox signals.
115
+ - **5 semi-automatic checks** (token budget, audit logging/telemetry, supply-chain/SBOM, error handling/retry, output truncation/filtering) **enumerate the signals** they find in shipped code — the signal's presence is verifiable, but whether the control is actually enforced needs human review. Those signals are listed in the JSON output and never counted as fails.
116
+ - Every finding is grounded at **file + line with a code snippet**. Minified files are detected and lightly reformatted internally (statement/block expansion, no dependencies) so line numbers stay usable; already-formatted source is scanned untouched.
117
+ - Known-benign patterns are suppressed with context heuristics and reported as info — for example cloud-SDK metadata credential providers (AWS IMDS / GCP metadata), `shell:false` fixed-argument spawn calls, sandbox VM implementations, localhost/spec-namespace URLs and placeholder/example strings.
118
+
119
+ **Honest scope:** bundle mode does not prove reachability or intent — a signal that is located correctly may still be unreachable in practice, and conclusions on the semi-automatic checks remain a manual-review job. It is an automated triage layer that points a reviewer at the exact lines to examine; it does **not** replace the **116-check manual audit methodology**, where reviewers trace data flow and what each capability can actually be made to do. Scanning covers JavaScript/TypeScript code, configuration and protocol-layer signals; deep logic compiled into native binaries (e.g. Bun `--compile` single-file executables) is outside static analysis and is not covered by bundle mode. Everything runs locally — package code is not uploaded.
120
+
121
+ ### Bundle checks (17)
122
+
123
+ Check ids continue the config scanner's 14-check scheme so text/JSON/SARIF outputs stay aligned.
124
+
125
+ | # | Check | Type | Severity | AISVS |
126
+ |---|-------|------|----------|-------|
127
+ | 1 | Hardcoded credentials in code (sk-/ghp_/AKIA/AIza/xox patterns, placeholder-aware) | automatic | 🔴 Critical | C5.1 |
128
+ | 2 | Plaintext HTTP outbound endpoints (localhost/spec/example hosts suppressed) | automatic | 🟠 High | C10.1 |
129
+ | 3 | Cloud metadata & intranet addresses / SSRF (169.254.x, RFC1918, GCP metadata; cloud-SDK & guard context suppressed) | automatic | 🔴 Critical | C10.3 |
130
+ | 4 | Subprocess execution — `shell:true` / `exec` (`shell:false` fixed-arg spawn not flagged) | automatic | 🟠 High | C4.1 |
131
+ | 5 | Dynamic code execution — `eval` / `new Function` / `vm` (sandbox/shim contexts suppressed) | automatic | 🟠 High | C4.1 |
132
+ | 6 | Environment-variable credential flow (hardcoded fallback secrets flagged) | automatic | 🟡 Medium | C5.1 |
133
+ | 7 | Permission modes & tool gates (`allowedTools`, `dangerouslySkipPermissions`) | automatic | 🟠 High | C9.3 |
134
+ | 8 | MCP transport authentication (remote sse/http/ws without Authorization signal) | automatic | 🟠 High | C10.2 |
135
+ | 9 | Timeout & interruption signals (`AbortSignal.timeout` / `timeout` options) | automatic | 🟡 Medium | C9.1 |
136
+ | 10 | Kill switch — `AbortController` / `AbortSignal` presence | automatic | 🟠 High | C9.5 |
137
+ | 11 | Sandbox isolation signals (bwrap / sandbox manager) | automatic | 🟡 Medium | C4.1 |
138
+ | 12 | Input validation / schema signals | automatic | 🟠 High | C2.1 |
139
+ | 13 | Token budget constants (`MAX_*_TOKENS` / cost limits) | semi-automatic | 🟠 High | C9.1 |
140
+ | 14 | Audit logging / telemetry endpoints | semi-automatic | 🟡 Medium | C12.1 |
141
+ | 15 | Supply chain / vendor SBOM (native artifacts, vendor versions) | semi-automatic | 🟡 Medium | C6.1 |
142
+ | 16 | Error handling / retry / fallback | semi-automatic | 🟡 Medium | C12.2 |
143
+ | 17 | Output truncation / filtering | semi-automatic | 🟡 Medium | C7.1 |
144
+
145
+ The free-tier daily scan allowance applies to bundle scans too (counted the same way as config scans); a Pro license removes the limit. License verification runs sub-millisecond on the core verification hot path.
146
+
66
147
  ## CI/CD Integration
67
148
 
68
149
  ### GitHub Actions
69
150
 
70
151
  ```yaml
71
- - uses: Correctover/correctover-scan-action@v1
152
+ - uses: DSHCorrectover/correctover-scan-action@v1
72
153
  with:
73
154
  path: ./mcp.json
74
155
  ```
@@ -82,34 +163,38 @@ Try the online version: [correctover.com/scan](https://correctover.com/scan/)
82
163
  - **OWASP AISVS 1.0** — AI System Vulnerability Severity
83
164
  - **GB/T《智能体应用安全基本要求》** — Chinese National Mandatory Standard
84
165
 
85
- ## Free Tier
166
+ ## Manual audit
86
167
 
87
- 50 scans/day no credit card required.
168
+ The free automated scan covers surface-level configuration checks. A manual Correctover audit goes deeper:
88
169
 
89
- Unlock unlimited: [correctover.com/checkout](https://correctover.com/checkout)
170
+ - **116-check manual audit methodology** — reviewers trace what each MCP tool can actually be made to do, not just whether a config field is present
171
+ - Findings grounded in **real MCP ecosystem CVEs**
172
+ - **5-day turnaround**, delivered as a PDF report with recommended fixes
173
+ - A **free 1-page summary** of your configuration first — you decide whether to continue after reading it
90
174
 
91
- ```bash
92
- export CORRECTOVER_LICENSE_KEY=your-key-here
93
- ```
175
+ For first customers, if the manual audit finds no critical-severity issue, you pay nothing.
94
176
 
95
- ## Related Correctover Tools
96
-
97
- | Tool | Install | Description |
98
- |------|---------|-------------|
99
- | **Security Scanner** | `npx correctover-scan` | MCP config security audit (14 checks) |
100
- | **Self-Healing Test** | `pip install correctover-test` | Agent self-healing test suite |
101
- | **Vulnerability Scan** | `pip install correctover-security-audit` | 215 fault type scanner |
102
- | **Compliance Check** | `pip install correctover-compliance-check` | OAuth 2.1 + CCS v1.0 |
103
- | **Runtime Guard** | `pip install correctover-runtime-guard` | 22µs RCE/SSRF interception |
104
- | **MCP Server** | `npm install correctover-mcp-server` | 6-dimension validation |
177
+ - Get your free 1-page summary: email [234114134@coze.email](mailto:234114134@coze.email?subject=Free%20audit%20scan%20summary)
178
+ - Learn more about the manual audit: https://correctover.com/agent-audit.html
105
179
 
106
180
  ## Links
107
181
 
108
182
  - [correctover.com](https://correctover.com) — AI Agent Runtime Assurance
109
- - [CCS Standard](https://correctover.com/ccs) — Conformance Specification (DOI: 10.5281/zenodo.21234580)
183
+ - [CCS Standard](https://correctover.com/ccs) — Conformance Specification
110
184
  - [Web Scanner](https://correctover.com/scan/) — Online version
111
- - [GitHub](https://github.com/Correctover) — Source code
185
+ - [GitHub](https://github.com/DSHCorrectover) — Source code
186
+ - [Conformance test vectors](https://github.com/DSHCorrectover/ccs-conformance-vectors) — 66 signed, reproducible
187
+ - [EMILIA interoperability](https://github.com/emiliaprotocol/emilia-protocol/pull/693) — merged joint assessment
188
+ - [Framework paper (Zenodo)](https://doi.org/10.5281/zenodo.21783723) — DOI 10.5281/zenodo.21783723
189
+ - [Agent Output Audit](https://correctover.com/agent-audit.html) — 116-check manual audit, 5-day turnaround
190
+
191
+ ## Specification
192
+
193
+ CCS (Correctover Conformance Shape) is published as an individual Internet-Draft: **[draft-correctover-ccs](https://datatracker.ietf.org/doc/draft-correctover-ccs/)**.
194
+
195
+ An Internet-Draft is an individual submission. It is not an RFC, an adopted working-group item, or IETF endorsement; the Datatracker page is authoritative for revision and status.
112
196
 
113
197
  ## License
114
198
 
115
199
  MIT © Correctover
200
+