@sigildev/sigil 0.1.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 +21 -0
- package/README.md +246 -0
- package/dist/analyzers/ast/python.d.ts +14 -0
- package/dist/analyzers/ast/python.d.ts.map +1 -0
- package/dist/analyzers/ast/python.js +15 -0
- package/dist/analyzers/ast/python.js.map +1 -0
- package/dist/analyzers/ast/taint.d.ts +45 -0
- package/dist/analyzers/ast/taint.d.ts.map +1 -0
- package/dist/analyzers/ast/taint.js +32 -0
- package/dist/analyzers/ast/taint.js.map +1 -0
- package/dist/analyzers/ast/typescript.d.ts +15 -0
- package/dist/analyzers/ast/typescript.d.ts.map +1 -0
- package/dist/analyzers/ast/typescript.js +16 -0
- package/dist/analyzers/ast/typescript.js.map +1 -0
- package/dist/analyzers/deps.d.ts +13 -0
- package/dist/analyzers/deps.d.ts.map +1 -0
- package/dist/analyzers/deps.js +14 -0
- package/dist/analyzers/deps.js.map +1 -0
- package/dist/analyzers/pattern.d.ts +12 -0
- package/dist/analyzers/pattern.d.ts.map +1 -0
- package/dist/analyzers/pattern.js +13 -0
- package/dist/analyzers/pattern.js.map +1 -0
- package/dist/analyzers/types.d.ts +111 -0
- package/dist/analyzers/types.d.ts.map +1 -0
- package/dist/analyzers/types.js +3 -0
- package/dist/analyzers/types.js.map +1 -0
- package/dist/discovery/config-parser.d.ts +7 -0
- package/dist/discovery/config-parser.d.ts.map +1 -0
- package/dist/discovery/config-parser.js +23 -0
- package/dist/discovery/config-parser.js.map +1 -0
- package/dist/discovery/files.d.ts +6 -0
- package/dist/discovery/files.d.ts.map +1 -0
- package/dist/discovery/files.js +43 -0
- package/dist/discovery/files.js.map +1 -0
- package/dist/discovery/manifest.d.ts +6 -0
- package/dist/discovery/manifest.d.ts.map +1 -0
- package/dist/discovery/manifest.js +82 -0
- package/dist/discovery/manifest.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +60 -0
- package/dist/index.js.map +1 -0
- package/dist/reporters/json.d.ts +3 -0
- package/dist/reporters/json.d.ts.map +1 -0
- package/dist/reporters/json.js +4 -0
- package/dist/reporters/json.js.map +1 -0
- package/dist/reporters/sarif.d.ts +3 -0
- package/dist/reporters/sarif.d.ts.map +1 -0
- package/dist/reporters/sarif.js +57 -0
- package/dist/reporters/sarif.js.map +1 -0
- package/dist/reporters/text.d.ts +7 -0
- package/dist/reporters/text.d.ts.map +1 -0
- package/dist/reporters/text.js +89 -0
- package/dist/reporters/text.js.map +1 -0
- package/dist/rules/auth.d.ts +4 -0
- package/dist/rules/auth.d.ts.map +1 -0
- package/dist/rules/auth.js +88 -0
- package/dist/rules/auth.js.map +1 -0
- package/dist/rules/config.d.ts +5 -0
- package/dist/rules/config.d.ts.map +1 -0
- package/dist/rules/config.js +123 -0
- package/dist/rules/config.js.map +1 -0
- package/dist/rules/data.d.ts +4 -0
- package/dist/rules/data.d.ts.map +1 -0
- package/dist/rules/data.js +79 -0
- package/dist/rules/data.js.map +1 -0
- package/dist/rules/deps.d.ts +3 -0
- package/dist/rules/deps.d.ts.map +1 -0
- package/dist/rules/deps.js +68 -0
- package/dist/rules/deps.js.map +1 -0
- package/dist/rules/description.d.ts +3 -0
- package/dist/rules/description.d.ts.map +1 -0
- package/dist/rules/description.js +91 -0
- package/dist/rules/description.js.map +1 -0
- package/dist/rules/index.d.ts +3 -0
- package/dist/rules/index.d.ts.map +1 -0
- package/dist/rules/index.js +154 -0
- package/dist/rules/index.js.map +1 -0
- package/dist/rules/injection.d.ts +5 -0
- package/dist/rules/injection.d.ts.map +1 -0
- package/dist/rules/injection.js +213 -0
- package/dist/rules/injection.js.map +1 -0
- package/dist/rules/permissions.d.ts +5 -0
- package/dist/rules/permissions.d.ts.map +1 -0
- package/dist/rules/permissions.js +170 -0
- package/dist/rules/permissions.js.map +1 -0
- package/dist/rules/validation.d.ts +3 -0
- package/dist/rules/validation.d.ts.map +1 -0
- package/dist/rules/validation.js +67 -0
- package/dist/rules/validation.js.map +1 -0
- package/dist/scanner.d.ts +9 -0
- package/dist/scanner.d.ts.map +1 -0
- package/dist/scanner.js +149 -0
- package/dist/scanner.js.map +1 -0
- package/dist/scoring.d.ts +3 -0
- package/dist/scoring.d.ts.map +1 -0
- package/dist/scoring.js +35 -0
- package/dist/scoring.js.map +1 -0
- package/package.json +57 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 mcp-scanner contributors
|
|
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
ADDED
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
# sigil
|
|
2
|
+
|
|
3
|
+
Deep static security analysis for MCP servers. Finds command injection, path traversal, tool poisoning, credential leaks, and 12 other vulnerability classes — source code analysis that goes beyond description scanning.
|
|
4
|
+
|
|
5
|
+
[](LICENSE)
|
|
6
|
+
[](https://www.npmjs.com/package/sigil)
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## The Problem
|
|
11
|
+
|
|
12
|
+
MCP servers are the bridge between AI agents and the real world — file systems, databases, APIs, shell commands. They're also largely unaudited. Studies of MCP implementations found **43% vulnerable to command injection**, **82% using file operations prone to path traversal**, and **5.5% with active tool poisoning** in their descriptions. Existing scanners check tool descriptions and metadata. They don't read the source code. sigil does.
|
|
13
|
+
|
|
14
|
+
## What sigil Does
|
|
15
|
+
|
|
16
|
+
- **Source code analysis** — Reads TypeScript and Python source, detects dangerous patterns in tool handlers (exec, eval, fs, SQL), flags unsanitized paths. Goes beyond description scanning — analyzes what your code actually does.
|
|
17
|
+
- **16 security rules across 7 categories** — Injection, permissions, data exfiltration, input validation, tool description integrity, authentication, configuration. Each rule maps to documented MCP attack vectors and real CVEs.
|
|
18
|
+
- **Trust score (0-100)** — Quantified security posture with A-F grading. Exit code 1 on FAIL for CI/CD gating. One critical finding = 75 or below.
|
|
19
|
+
|
|
20
|
+
## Quick Start
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
npx sigil .
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
```
|
|
27
|
+
Sigil v0.1.0
|
|
28
|
+
|
|
29
|
+
Scanning: ./my-mcp-server
|
|
30
|
+
Language: TypeScript
|
|
31
|
+
Tools: 5 detected | Resources: 2 detected | Prompts: 0 detected
|
|
32
|
+
|
|
33
|
+
CRITICAL MCS-INJ-001 Command Injection via tool input
|
|
34
|
+
│ src/tools/run-command.ts:24
|
|
35
|
+
│ Tool "execute" passes user input directly to child_process.exec()
|
|
36
|
+
│ without sanitization. Allows arbitrary command execution.
|
|
37
|
+
│
|
|
38
|
+
│ 23│ server.tool("execute", { cmd: z.string() }, async ({ cmd }) => {
|
|
39
|
+
│ > 24│ const result = await exec(cmd);
|
|
40
|
+
│ 25│ return { content: [{ type: "text", text: result.stdout }] };
|
|
41
|
+
|
|
42
|
+
HIGH MCS-PERM-002 Unrestricted filesystem access
|
|
43
|
+
│ src/tools/files.ts:12
|
|
44
|
+
│ Tool "read_file" accepts arbitrary paths with no allowlist or
|
|
45
|
+
│ directory restriction. Can read /etc/passwd, SSH keys, .env files.
|
|
46
|
+
|
|
47
|
+
HIGH MCS-DATA-001 Environment variable exposure
|
|
48
|
+
│ src/tools/debug.ts:8
|
|
49
|
+
│ Tool "get_env" returns process.env without filtering.
|
|
50
|
+
│ Exposes API keys, credentials, and secrets to the LLM.
|
|
51
|
+
|
|
52
|
+
MEDIUM MCS-VALID-001 Missing input schema
|
|
53
|
+
│ src/tools/search.ts:31
|
|
54
|
+
│ Tool "search" has no input validation schema defined.
|
|
55
|
+
│ All inputs accepted without type or constraint checking.
|
|
56
|
+
|
|
57
|
+
LOW MCS-CFG-002 Verbose error messages
|
|
58
|
+
│ src/index.ts:45
|
|
59
|
+
│ Error handler returns full stack traces to the client.
|
|
60
|
+
|
|
61
|
+
──────────────────────────────────────────────────────
|
|
62
|
+
5 findings: 1 critical, 2 high, 1 medium, 1 low
|
|
63
|
+
Trust Score: 32/100 (FAIL)
|
|
64
|
+
──────────────────────────────────────────────────────
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Installation
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
# Run without installing
|
|
71
|
+
npx sigil .
|
|
72
|
+
|
|
73
|
+
# Install globally
|
|
74
|
+
npm install -g sigil
|
|
75
|
+
|
|
76
|
+
# Install as dev dependency
|
|
77
|
+
npm install -D sigil
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
## Usage
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
# Scan an MCP server directory
|
|
84
|
+
sigil .
|
|
85
|
+
sigil ./servers/github-server
|
|
86
|
+
|
|
87
|
+
# Scan all servers in a config file
|
|
88
|
+
sigil claude_desktop_config.json
|
|
89
|
+
sigil .mcp.json
|
|
90
|
+
|
|
91
|
+
# Machine-readable output
|
|
92
|
+
sigil . --output json
|
|
93
|
+
sigil . --output sarif
|
|
94
|
+
|
|
95
|
+
# Filter by severity
|
|
96
|
+
sigil . -s high # Only high and critical findings
|
|
97
|
+
|
|
98
|
+
# Ignore specific rules
|
|
99
|
+
sigil . --ignore MCS-CFG-002,MCS-DEP-002
|
|
100
|
+
|
|
101
|
+
# Quiet mode (findings only, no banner)
|
|
102
|
+
sigil . -q
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
## What It Checks
|
|
106
|
+
|
|
107
|
+
16 rules across 7 categories. Each maps to real MCP attack vectors and documented CVEs.
|
|
108
|
+
|
|
109
|
+
| ID | Rule | Severity | What it detects |
|
|
110
|
+
|----|------|----------|-----------------|
|
|
111
|
+
| MCS-INJ-001 | Command Injection | CRITICAL | Tool inputs passed to `exec`, `spawn(shell)`, `os.system`, `subprocess.run(shell=True)` |
|
|
112
|
+
| MCS-INJ-002 | SQL Injection | CRITICAL | Tool inputs concatenated into SQL strings without parameterized queries |
|
|
113
|
+
| MCS-INJ-003 | Path Traversal | HIGH | Tool inputs used in file paths without canonicalization or directory restriction |
|
|
114
|
+
| MCS-PERM-001 | Overly Broad Capabilities | HIGH | Tools performing dangerous ops (write, delete, fetch, exec) without scope restrictions |
|
|
115
|
+
| MCS-PERM-002 | Unrestricted FS Access | HIGH | File system tools with no directory allowlist or path prefix restriction |
|
|
116
|
+
| MCS-PERM-003 | Arbitrary Code Execution | CRITICAL | Tool inputs passed to `eval()`, `Function()`, `exec()`, `vm.runInNewContext` |
|
|
117
|
+
| MCS-DATA-001 | Env Variable Exposure | HIGH | `process.env` or `os.environ` returned wholesale without filtering |
|
|
118
|
+
| MCS-DATA-002 | Credential Leakage | HIGH | Unfiltered API responses containing auth tokens, session IDs, or credentials |
|
|
119
|
+
| MCS-VALID-001 | Missing Input Schema | MEDIUM | Tools registered with empty or absent input validation schemas |
|
|
120
|
+
| MCS-DESC-001 | Suspicious Descriptions | HIGH | Prompt injection patterns in tool descriptions (override instructions, exfiltration URLs, cross-tool calls) |
|
|
121
|
+
| MCS-AUTH-001 | Hardcoded Credentials | CRITICAL | API keys, tokens, passwords hardcoded in source (`sk-*`, `ghp_*`, `AKIA*`, private keys) |
|
|
122
|
+
| MCS-AUTH-002 | Secrets in Config | HIGH | Credentials inline in MCP config files instead of env var references |
|
|
123
|
+
| MCS-CFG-001 | Debug Mode Enabled | MEDIUM | Debug/development configuration left enabled |
|
|
124
|
+
| MCS-CFG-002 | Verbose Error Messages | LOW | Error handlers returning full stack traces to the client |
|
|
125
|
+
| MCS-CFG-003 | Insecure Transport | MEDIUM | HTTP without TLS, binding to `0.0.0.0`, CORS with `*` |
|
|
126
|
+
| MCS-DEP-001 | Vulnerable Dependencies | Varies | Dependencies with known CVEs (queried against OSV.dev) |
|
|
127
|
+
|
|
128
|
+
## Output Formats
|
|
129
|
+
|
|
130
|
+
### Text (default)
|
|
131
|
+
|
|
132
|
+
Human-readable terminal output with color-coded severity badges and inline code excerpts. See Quick Start above.
|
|
133
|
+
|
|
134
|
+
### JSON
|
|
135
|
+
|
|
136
|
+
```bash
|
|
137
|
+
sigil . --output json
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
Produces a structured `ScanResult` object with full finding details, tool/resource/prompt inventory, and trust score. Pipe to `jq` or consume programmatically.
|
|
141
|
+
|
|
142
|
+
### SARIF
|
|
143
|
+
|
|
144
|
+
```bash
|
|
145
|
+
sigil . --output sarif
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
SARIF v2.1.0 output for integration with GitHub Code Scanning, VS Code SARIF Viewer, and other SARIF-compatible tools. Upload directly to GitHub:
|
|
149
|
+
|
|
150
|
+
```bash
|
|
151
|
+
sigil . --output sarif > results.sarif
|
|
152
|
+
# Upload to GitHub Code Scanning via API or Action
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
## Trust Score
|
|
156
|
+
|
|
157
|
+
```
|
|
158
|
+
Score = 100 - penalties
|
|
159
|
+
|
|
160
|
+
CRITICAL = -25 points each
|
|
161
|
+
HIGH = -15 points each
|
|
162
|
+
MEDIUM = -5 points each
|
|
163
|
+
LOW = -2 points each
|
|
164
|
+
|
|
165
|
+
A (90-100) = PASS D (30-49) = FAIL
|
|
166
|
+
B (70-89) = PASS F (0-29) = FAIL
|
|
167
|
+
C (50-69) = WARN
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
Exit code `0` on PASS (score >= 70). Exit code `1` on FAIL. Use in CI/CD to block deployments.
|
|
171
|
+
|
|
172
|
+
## Configuration
|
|
173
|
+
|
|
174
|
+
Create `.sigil.yml` in your project root:
|
|
175
|
+
|
|
176
|
+
```yaml
|
|
177
|
+
# Rules to ignore
|
|
178
|
+
ignore:
|
|
179
|
+
- MCS-CFG-002 # We intentionally show verbose errors in dev
|
|
180
|
+
- MCS-DEP-002 # We know this server is maintained
|
|
181
|
+
|
|
182
|
+
# Severity overrides
|
|
183
|
+
overrides:
|
|
184
|
+
MCS-VALID-001: low # Downgrade missing schema for our use case
|
|
185
|
+
|
|
186
|
+
# Paths to exclude
|
|
187
|
+
exclude:
|
|
188
|
+
- "tests/**"
|
|
189
|
+
- "examples/**"
|
|
190
|
+
- "**/*.test.ts"
|
|
191
|
+
|
|
192
|
+
# Minimum score to pass (default: 70)
|
|
193
|
+
passScore: 60
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
## How It Works
|
|
197
|
+
|
|
198
|
+
Three-layer analysis pipeline. No dynamic analysis — the scanner never runs your MCP server.
|
|
199
|
+
|
|
200
|
+
1. **Discovery** — Finds MCP server entry points, parses config files (`claude_desktop_config.json`, `.mcp.json`), reads `package.json`/`pyproject.toml`, discovers source files.
|
|
201
|
+
2. **Analysis** — 16 rules run against source code:
|
|
202
|
+
- **Pattern Analyzer** — Context-aware regex detection for injection sinks, dangerous permissions, credential leaks, prompt injection, and configuration issues. Checks surrounding code context to reduce false positives.
|
|
203
|
+
- **Dependency Checker** — Parses dependency manifests, queries OSV.dev for known CVEs.
|
|
204
|
+
3. **Reporting** — Aggregates findings, computes trust score, formats output.
|
|
205
|
+
|
|
206
|
+
## Comparison
|
|
207
|
+
|
|
208
|
+
| Feature | sigil | Snyk agent-scan | Cisco Sigil | Enkrypt AI |
|
|
209
|
+
|---------|-------------|-----------------|-------------------|------------|
|
|
210
|
+
| Open source | MIT | Partial | Partial | No |
|
|
211
|
+
| Analysis depth | Source code pattern analysis | Description scanning | YARA rules + LLM | Agentic static |
|
|
212
|
+
| Languages | TypeScript + Python | Runtime only | Unknown | GitHub repos |
|
|
213
|
+
| Trust scoring | 0-100 + A-F grade | Pass/fail | None | Per-finding |
|
|
214
|
+
| SARIF output | Yes | No | No | No |
|
|
215
|
+
| Config scanning | Yes | No | No | No |
|
|
216
|
+
| Dependency scanning | Yes (OSV.dev) | No | No | No |
|
|
217
|
+
| Description poisoning | Yes | Yes | Yes (LLM) | Yes |
|
|
218
|
+
| Cost | Free | Free (scanner), paid (platform) | Free (scanner), paid (API) | Free tier, paid |
|
|
219
|
+
|
|
220
|
+
**Our edge:** Deep source code analysis (not just description scanning), both TypeScript and Python, trust scoring, config file scanning, dependency checking, and SARIF output — in a single free, open-source CLI. No account required. No data sent to external services (except OSV.dev for dependency CVE checks).
|
|
221
|
+
|
|
222
|
+
## Supported MCP Frameworks
|
|
223
|
+
|
|
224
|
+
- `@modelcontextprotocol/sdk` (TypeScript) — `server.tool()`, `server.resource()`, `server.prompt()`
|
|
225
|
+
- `mcp` / FastMCP (Python) — `@mcp.tool()`, `@mcp.resource()`, `@mcp.prompt()`
|
|
226
|
+
|
|
227
|
+
## Contributing
|
|
228
|
+
|
|
229
|
+
Contributions welcome. Areas where help is needed:
|
|
230
|
+
|
|
231
|
+
- **New rules** — See the rule template in `src/rules/`. Each rule is a self-contained module.
|
|
232
|
+
- **Language support** — Go, Rust, Java MCP server analysis.
|
|
233
|
+
- **False positive reports** — If the scanner flags safe code, open an issue with a minimal repro.
|
|
234
|
+
- **Real-world validation** — Run the scanner on your MCP servers and share results (with permission).
|
|
235
|
+
|
|
236
|
+
```bash
|
|
237
|
+
git clone https://github.com/sigil/sigil
|
|
238
|
+
cd sigil
|
|
239
|
+
npm install
|
|
240
|
+
npm test
|
|
241
|
+
npm run dev -- ./tests/fixtures/vulnerable-ts
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
## License
|
|
245
|
+
|
|
246
|
+
MIT
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { AnalysisContext, Finding } from "../types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Python AST analyzer.
|
|
4
|
+
*
|
|
5
|
+
* Parses Python source files using tree-sitter with the Python grammar
|
|
6
|
+
* and runs rule-specific visitors to detect:
|
|
7
|
+
* - FastMCP instantiation (FastMCP(...))
|
|
8
|
+
* - Tool decorators (@mcp.tool(), @server.tool())
|
|
9
|
+
* - Dangerous sink usage in decorated functions (os.system, subprocess.*, open(), eval(), exec())
|
|
10
|
+
*
|
|
11
|
+
* TODO: Implement tree-sitter parsing and taint tracking
|
|
12
|
+
*/
|
|
13
|
+
export declare function analyzePython(_context: AnalysisContext): Finding[];
|
|
14
|
+
//# sourceMappingURL=python.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"python.d.ts","sourceRoot":"","sources":["../../../src/analyzers/ast/python.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAE5D;;;;;;;;;;GAUG;AACH,wBAAgB,aAAa,CAC3B,QAAQ,EAAE,eAAe,GACxB,OAAO,EAAE,CAEX"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Python AST analyzer.
|
|
3
|
+
*
|
|
4
|
+
* Parses Python source files using tree-sitter with the Python grammar
|
|
5
|
+
* and runs rule-specific visitors to detect:
|
|
6
|
+
* - FastMCP instantiation (FastMCP(...))
|
|
7
|
+
* - Tool decorators (@mcp.tool(), @server.tool())
|
|
8
|
+
* - Dangerous sink usage in decorated functions (os.system, subprocess.*, open(), eval(), exec())
|
|
9
|
+
*
|
|
10
|
+
* TODO: Implement tree-sitter parsing and taint tracking
|
|
11
|
+
*/
|
|
12
|
+
export function analyzePython(_context) {
|
|
13
|
+
return [];
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=python.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"python.js","sourceRoot":"","sources":["../../../src/analyzers/ast/python.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AACH,MAAM,UAAU,aAAa,CAC3B,QAAyB;IAEzB,OAAO,EAAE,CAAC;AACZ,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Simplified taint tracking for single-function analysis.
|
|
3
|
+
*
|
|
4
|
+
* Algorithm:
|
|
5
|
+
* 1. Mark all tool handler parameters as "tainted"
|
|
6
|
+
* 2. Walk the handler function body
|
|
7
|
+
* 3. If a tainted value reaches a dangerous sink without passing through
|
|
8
|
+
* a known sanitizer, produce a finding
|
|
9
|
+
*
|
|
10
|
+
* Known sanitizers:
|
|
11
|
+
* - parseInt(), Number()
|
|
12
|
+
* - encodeURIComponent()
|
|
13
|
+
* - path.resolve() + startsWith() prefix check
|
|
14
|
+
* - Parameterized query patterns ($1, ?, :param)
|
|
15
|
+
* - Allowlist checks (enum, .includes(), switch/case)
|
|
16
|
+
*
|
|
17
|
+
* Known dangerous sinks:
|
|
18
|
+
* - child_process.exec, execSync
|
|
19
|
+
* - child_process.spawn with shell: true
|
|
20
|
+
* - eval(), new Function(), vm.runInNewContext
|
|
21
|
+
* - os.system, subprocess.run(shell=True), subprocess.Popen(shell=True)
|
|
22
|
+
* - fs.readFile, fs.writeFile without path validation
|
|
23
|
+
* - db.query with string concatenation
|
|
24
|
+
* - fetch() / http.request() with tainted URL
|
|
25
|
+
*
|
|
26
|
+
* TODO: Implement taint propagation through variable assignments and function calls
|
|
27
|
+
*/
|
|
28
|
+
export interface TaintSource {
|
|
29
|
+
name: string;
|
|
30
|
+
line: number;
|
|
31
|
+
column: number;
|
|
32
|
+
}
|
|
33
|
+
export interface TaintSink {
|
|
34
|
+
type: "exec" | "eval" | "fs" | "sql" | "fetch";
|
|
35
|
+
name: string;
|
|
36
|
+
line: number;
|
|
37
|
+
column: number;
|
|
38
|
+
}
|
|
39
|
+
export interface TaintResult {
|
|
40
|
+
source: TaintSource;
|
|
41
|
+
sink: TaintSink;
|
|
42
|
+
sanitized: boolean;
|
|
43
|
+
}
|
|
44
|
+
export declare function traceTaint(_sources: TaintSource[], _sinks: TaintSink[]): TaintResult[];
|
|
45
|
+
//# sourceMappingURL=taint.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"taint.d.ts","sourceRoot":"","sources":["../../../src/analyzers/ast/taint.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,KAAK,GAAG,OAAO,CAAC;IAC/C,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,WAAW,CAAC;IACpB,IAAI,EAAE,SAAS,CAAC;IAChB,SAAS,EAAE,OAAO,CAAC;CACpB;AAED,wBAAgB,UAAU,CACxB,QAAQ,EAAE,WAAW,EAAE,EACvB,MAAM,EAAE,SAAS,EAAE,GAClB,WAAW,EAAE,CAGf"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Simplified taint tracking for single-function analysis.
|
|
3
|
+
*
|
|
4
|
+
* Algorithm:
|
|
5
|
+
* 1. Mark all tool handler parameters as "tainted"
|
|
6
|
+
* 2. Walk the handler function body
|
|
7
|
+
* 3. If a tainted value reaches a dangerous sink without passing through
|
|
8
|
+
* a known sanitizer, produce a finding
|
|
9
|
+
*
|
|
10
|
+
* Known sanitizers:
|
|
11
|
+
* - parseInt(), Number()
|
|
12
|
+
* - encodeURIComponent()
|
|
13
|
+
* - path.resolve() + startsWith() prefix check
|
|
14
|
+
* - Parameterized query patterns ($1, ?, :param)
|
|
15
|
+
* - Allowlist checks (enum, .includes(), switch/case)
|
|
16
|
+
*
|
|
17
|
+
* Known dangerous sinks:
|
|
18
|
+
* - child_process.exec, execSync
|
|
19
|
+
* - child_process.spawn with shell: true
|
|
20
|
+
* - eval(), new Function(), vm.runInNewContext
|
|
21
|
+
* - os.system, subprocess.run(shell=True), subprocess.Popen(shell=True)
|
|
22
|
+
* - fs.readFile, fs.writeFile without path validation
|
|
23
|
+
* - db.query with string concatenation
|
|
24
|
+
* - fetch() / http.request() with tainted URL
|
|
25
|
+
*
|
|
26
|
+
* TODO: Implement taint propagation through variable assignments and function calls
|
|
27
|
+
*/
|
|
28
|
+
export function traceTaint(_sources, _sinks) {
|
|
29
|
+
// TODO: Implement
|
|
30
|
+
return [];
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=taint.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"taint.js","sourceRoot":"","sources":["../../../src/analyzers/ast/taint.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAqBH,MAAM,UAAU,UAAU,CACxB,QAAuB,EACvB,MAAmB;IAEnB,kBAAkB;IAClB,OAAO,EAAE,CAAC;AACZ,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { AnalysisContext, Finding } from "../types.js";
|
|
2
|
+
/**
|
|
3
|
+
* TypeScript AST analyzer.
|
|
4
|
+
*
|
|
5
|
+
* Parses TypeScript/JavaScript source files using the TypeScript Compiler API
|
|
6
|
+
* and runs rule-specific visitors to detect:
|
|
7
|
+
* - MCP server instantiation (new McpServer(...), new Server(...))
|
|
8
|
+
* - Tool registrations (.tool() calls) with name, description, schema, handler
|
|
9
|
+
* - Resource registrations (.resource() calls)
|
|
10
|
+
* - Dangerous sink usage in handlers (exec, eval, fs ops, SQL queries, fetch)
|
|
11
|
+
*
|
|
12
|
+
* TODO: Implement AST walking and taint tracking
|
|
13
|
+
*/
|
|
14
|
+
export declare function analyzeTypeScript(_context: AnalysisContext): Finding[];
|
|
15
|
+
//# sourceMappingURL=typescript.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"typescript.d.ts","sourceRoot":"","sources":["../../../src/analyzers/ast/typescript.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAE5D;;;;;;;;;;;GAWG;AACH,wBAAgB,iBAAiB,CAC/B,QAAQ,EAAE,eAAe,GACxB,OAAO,EAAE,CAEX"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TypeScript AST analyzer.
|
|
3
|
+
*
|
|
4
|
+
* Parses TypeScript/JavaScript source files using the TypeScript Compiler API
|
|
5
|
+
* and runs rule-specific visitors to detect:
|
|
6
|
+
* - MCP server instantiation (new McpServer(...), new Server(...))
|
|
7
|
+
* - Tool registrations (.tool() calls) with name, description, schema, handler
|
|
8
|
+
* - Resource registrations (.resource() calls)
|
|
9
|
+
* - Dangerous sink usage in handlers (exec, eval, fs ops, SQL queries, fetch)
|
|
10
|
+
*
|
|
11
|
+
* TODO: Implement AST walking and taint tracking
|
|
12
|
+
*/
|
|
13
|
+
export function analyzeTypeScript(_context) {
|
|
14
|
+
return [];
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=typescript.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"typescript.js","sourceRoot":"","sources":["../../../src/analyzers/ast/typescript.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,iBAAiB,CAC/B,QAAyB;IAEzB,OAAO,EAAE,CAAC;AACZ,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { AnalysisContext, Finding } from "./types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Dependency vulnerability checker.
|
|
4
|
+
*
|
|
5
|
+
* Parses lock files and queries the OSV.dev vulnerability database:
|
|
6
|
+
* - package-lock.json / yarn.lock / pnpm-lock.yaml → extract dependency graph
|
|
7
|
+
* - requirements.txt / poetry.lock / uv.lock → extract dependency list
|
|
8
|
+
* - For each dependency + version, query https://api.osv.dev/v1/query
|
|
9
|
+
*
|
|
10
|
+
* TODO: Implement lock file parsing and OSV.dev queries
|
|
11
|
+
*/
|
|
12
|
+
export declare function analyzeDependencies(_context: AnalysisContext): Promise<Finding[]>;
|
|
13
|
+
//# sourceMappingURL=deps.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deps.d.ts","sourceRoot":"","sources":["../../src/analyzers/deps.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAE3D;;;;;;;;;GASG;AACH,wBAAsB,mBAAmB,CACvC,QAAQ,EAAE,eAAe,GACxB,OAAO,CAAC,OAAO,EAAE,CAAC,CAEpB"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Dependency vulnerability checker.
|
|
3
|
+
*
|
|
4
|
+
* Parses lock files and queries the OSV.dev vulnerability database:
|
|
5
|
+
* - package-lock.json / yarn.lock / pnpm-lock.yaml → extract dependency graph
|
|
6
|
+
* - requirements.txt / poetry.lock / uv.lock → extract dependency list
|
|
7
|
+
* - For each dependency + version, query https://api.osv.dev/v1/query
|
|
8
|
+
*
|
|
9
|
+
* TODO: Implement lock file parsing and OSV.dev queries
|
|
10
|
+
*/
|
|
11
|
+
export async function analyzeDependencies(_context) {
|
|
12
|
+
return [];
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=deps.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deps.js","sourceRoot":"","sources":["../../src/analyzers/deps.ts"],"names":[],"mappings":"AAEA;;;;;;;;;GASG;AACH,MAAM,CAAC,KAAK,UAAU,mBAAmB,CACvC,QAAyB;IAEzB,OAAO,EAAE,CAAC;AACZ,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { AnalysisContext, Finding } from "./types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Regex-based pattern matcher for rules that don't need AST understanding:
|
|
4
|
+
* - Credential patterns (MCS-AUTH-001): high-entropy strings, known key prefixes
|
|
5
|
+
* - Tool description analysis (MCS-DESC-001): prompt injection patterns
|
|
6
|
+
* - Debug/config patterns (MCS-CFG-001, MCS-CFG-002)
|
|
7
|
+
* - Transport config (MCS-CFG-003)
|
|
8
|
+
*
|
|
9
|
+
* TODO: Implement pattern matching
|
|
10
|
+
*/
|
|
11
|
+
export declare function analyzePatterns(_context: AnalysisContext): Finding[];
|
|
12
|
+
//# sourceMappingURL=pattern.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pattern.d.ts","sourceRoot":"","sources":["../../src/analyzers/pattern.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAE3D;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,eAAe,GACxB,OAAO,EAAE,CAEX"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Regex-based pattern matcher for rules that don't need AST understanding:
|
|
3
|
+
* - Credential patterns (MCS-AUTH-001): high-entropy strings, known key prefixes
|
|
4
|
+
* - Tool description analysis (MCS-DESC-001): prompt injection patterns
|
|
5
|
+
* - Debug/config patterns (MCS-CFG-001, MCS-CFG-002)
|
|
6
|
+
* - Transport config (MCS-CFG-003)
|
|
7
|
+
*
|
|
8
|
+
* TODO: Implement pattern matching
|
|
9
|
+
*/
|
|
10
|
+
export function analyzePatterns(_context) {
|
|
11
|
+
return [];
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=pattern.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pattern.js","sourceRoot":"","sources":["../../src/analyzers/pattern.ts"],"names":[],"mappings":"AAEA;;;;;;;;GAQG;AACH,MAAM,UAAU,eAAe,CAC7B,QAAyB;IAEzB,OAAO,EAAE,CAAC;AACZ,CAAC"}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
export type Severity = "critical" | "high" | "medium" | "low";
|
|
2
|
+
export type Grade = "A" | "B" | "C" | "D" | "F";
|
|
3
|
+
export type ScoreLabel = "PASS" | "WARN" | "FAIL";
|
|
4
|
+
export interface Finding {
|
|
5
|
+
ruleId: string;
|
|
6
|
+
severity: Severity;
|
|
7
|
+
title: string;
|
|
8
|
+
message: string;
|
|
9
|
+
location: Location;
|
|
10
|
+
tool?: ToolContext;
|
|
11
|
+
fix?: Fix;
|
|
12
|
+
}
|
|
13
|
+
export interface Location {
|
|
14
|
+
file: string;
|
|
15
|
+
startLine: number;
|
|
16
|
+
endLine: number;
|
|
17
|
+
startColumn?: number;
|
|
18
|
+
endColumn?: number;
|
|
19
|
+
}
|
|
20
|
+
export interface ToolContext {
|
|
21
|
+
name: string;
|
|
22
|
+
description?: string;
|
|
23
|
+
}
|
|
24
|
+
export interface Fix {
|
|
25
|
+
description: string;
|
|
26
|
+
suggestion?: string;
|
|
27
|
+
}
|
|
28
|
+
export interface ToolInfo {
|
|
29
|
+
name: string;
|
|
30
|
+
description?: string;
|
|
31
|
+
inputSchema?: Record<string, unknown>;
|
|
32
|
+
hasHandler: boolean;
|
|
33
|
+
}
|
|
34
|
+
export interface ResourceInfo {
|
|
35
|
+
uri: string;
|
|
36
|
+
name?: string;
|
|
37
|
+
description?: string;
|
|
38
|
+
}
|
|
39
|
+
export interface PromptInfo {
|
|
40
|
+
name: string;
|
|
41
|
+
description?: string;
|
|
42
|
+
arguments?: string[];
|
|
43
|
+
}
|
|
44
|
+
export interface Score {
|
|
45
|
+
value: number;
|
|
46
|
+
grade: Grade;
|
|
47
|
+
label: ScoreLabel;
|
|
48
|
+
}
|
|
49
|
+
export interface ScanResult {
|
|
50
|
+
scanner: {
|
|
51
|
+
name: string;
|
|
52
|
+
version: string;
|
|
53
|
+
};
|
|
54
|
+
target: TargetInfo;
|
|
55
|
+
server: ServerInfo;
|
|
56
|
+
findings: Finding[];
|
|
57
|
+
score: Score;
|
|
58
|
+
timestamp: string;
|
|
59
|
+
duration: number;
|
|
60
|
+
}
|
|
61
|
+
export interface TargetInfo {
|
|
62
|
+
path: string;
|
|
63
|
+
name?: string;
|
|
64
|
+
version?: string;
|
|
65
|
+
language: "typescript" | "python" | "unknown";
|
|
66
|
+
}
|
|
67
|
+
export interface ServerInfo {
|
|
68
|
+
tools: ToolInfo[];
|
|
69
|
+
resources: ResourceInfo[];
|
|
70
|
+
prompts: PromptInfo[];
|
|
71
|
+
}
|
|
72
|
+
export type RuleCategory = "injection" | "permissions" | "data-exfiltration" | "validation" | "description" | "auth" | "config" | "dependencies";
|
|
73
|
+
export interface RuleDefinition {
|
|
74
|
+
id: string;
|
|
75
|
+
name: string;
|
|
76
|
+
severity: Severity;
|
|
77
|
+
category: RuleCategory;
|
|
78
|
+
description: string;
|
|
79
|
+
detect: (context: AnalysisContext) => Finding[];
|
|
80
|
+
}
|
|
81
|
+
export interface AnalysisContext {
|
|
82
|
+
/** Absolute path to the scan root */
|
|
83
|
+
rootDir: string;
|
|
84
|
+
/** Detected language */
|
|
85
|
+
language: "typescript" | "python" | "unknown";
|
|
86
|
+
/** All source file paths (relative to rootDir) */
|
|
87
|
+
sourceFiles: string[];
|
|
88
|
+
/** Raw source code keyed by relative path */
|
|
89
|
+
sources: Map<string, string>;
|
|
90
|
+
/** Discovered MCP server info */
|
|
91
|
+
server: ServerInfo;
|
|
92
|
+
/** Manifest info (package.json / pyproject.toml) */
|
|
93
|
+
manifest?: ManifestInfo;
|
|
94
|
+
/** MCP config entries, if scanned from a config file */
|
|
95
|
+
configEntries?: ConfigEntry[];
|
|
96
|
+
}
|
|
97
|
+
export interface ManifestInfo {
|
|
98
|
+
name?: string;
|
|
99
|
+
version?: string;
|
|
100
|
+
dependencies: Record<string, string>;
|
|
101
|
+
devDependencies: Record<string, string>;
|
|
102
|
+
lockfilePath?: string;
|
|
103
|
+
}
|
|
104
|
+
export interface ConfigEntry {
|
|
105
|
+
name: string;
|
|
106
|
+
command: string;
|
|
107
|
+
args?: string[];
|
|
108
|
+
env?: Record<string, string>;
|
|
109
|
+
}
|
|
110
|
+
export type OutputFormat = "text" | "json" | "sarif";
|
|
111
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/analyzers/types.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/analyzers/types.ts"],"names":[],"mappings":"AAAA,6BAA6B"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ConfigEntry } from "../analyzers/types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Parse an MCP configuration file (claude_desktop_config.json, .mcp.json)
|
|
4
|
+
* and extract server entries.
|
|
5
|
+
*/
|
|
6
|
+
export declare function parseConfig(configPath: string): Promise<ConfigEntry[]>;
|
|
7
|
+
//# sourceMappingURL=config-parser.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config-parser.d.ts","sourceRoot":"","sources":["../../src/discovery/config-parser.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEzD;;;GAGG;AACH,wBAAsB,WAAW,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC,CAoB5E"}
|