shakerscan-mcp 1.0.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/README.md ADDED
@@ -0,0 +1,295 @@
1
+ # ShakerScan MCP Server
2
+
3
+ A Model Context Protocol (MCP) server for the Shaker Scan control plane. It lets AI assistants like Claude and Cursor trigger scans, inspect findings, and plug security checks into agent workflows without leaving the IDE.
4
+
5
+ ## Features
6
+
7
+ ### Tools
8
+
9
+ | Tool | Description |
10
+ | ----------------------- | ------------------------------------------------------------------ |
11
+ | `scan_target` | Trigger a DAST scan against any URL |
12
+ | `get_scan_status` | Check scan progress and completion |
13
+ | `get_findings` | Retrieve vulnerability findings with severity, CVSS, OWASP mapping |
14
+ | `verify_finding` | Retest a stored finding and persist a verification artifact |
15
+ | `evaluate_policy` | Return `allow`, `block`, or `needs_approval` for a scan |
16
+ | `get_evidence` | Fetch a stored verification or policy artifact |
17
+ | `issue_approval_token` | Mint a short-lived signed approval token |
18
+ | `verify_approval_token` | Validate a signed approval token |
19
+ | `request_remediation` | Create a persisted remediation artifact with fix steps and PR draft |
20
+ | `get_remediation_job` | Fetch a stored remediation artifact |
21
+ | `get_usage` | Read current scan, verify, policy, and API usage |
22
+ | `list_scans` | List recent scans, filter by target |
23
+ | `compare_scans` | Compare two scans to find new/resolved issues |
24
+ | `get_scan_history` | View historical security posture for a domain |
25
+ | `list_targets` | List configured DAST monitoring targets |
26
+
27
+ ### Resources
28
+
29
+ - **OWASP Top 10 (2021)** - Reference guide for web security risks
30
+ - **Severity Guide** - How vulnerabilities are classified
31
+ - **Scan Types Guide** - Understanding different scan modes and phases
32
+
33
+ ### Prompts
34
+
35
+ - **quick_security_check** - Fast scan with summarized results
36
+ - **comprehensive_audit** - Full security audit with all phases
37
+ - **fix_vulnerability** - Remediation guidance for specific vuln types
38
+ - **security_comparison** - Analyze security trends over time
39
+
40
+ ## Installation
41
+
42
+ ### For End Users (via npx)
43
+
44
+ No installation required! Just configure your AI IDE (see Configuration below).
45
+
46
+ ### For Development
47
+
48
+ ```bash
49
+ cd scanner-mcp
50
+ npm install
51
+ npm run build
52
+ ```
53
+
54
+ ## Getting Your API Key
55
+
56
+ 1. Log in to [shakerscan.com](https://shakerscan.com)
57
+ 2. Go to **Control Plane Settings > API Keys**
58
+ 3. Click **New API Key**
59
+ 4. Copy the key (starts with `sk_live_`)
60
+
61
+ > API keys are available for all authenticated users.
62
+
63
+ ## Configuration
64
+
65
+ ### Environment Variables
66
+
67
+ ```bash
68
+ # Required - your API key from shakerscan.com
69
+ export SCANNER_API_KEY="sk_live_your_key_here"
70
+
71
+ # Optional - override API URL (defaults to shakerscan.com for sk_live_ keys)
72
+ # export SCANNER_API_URL="https://shakerscan.com"
73
+ ```
74
+
75
+ ### Claude Code Configuration
76
+
77
+ Add to `~/.claude.json`:
78
+
79
+ ```json
80
+ {
81
+ "mcpServers": {
82
+ "shakerscan": {
83
+ "command": "npx",
84
+ "args": ["-y", "shakerscan-mcp"],
85
+ "env": {
86
+ "SCANNER_API_KEY": "sk_live_your_key_here"
87
+ }
88
+ }
89
+ }
90
+ }
91
+ ```
92
+
93
+ ### Cursor Configuration
94
+
95
+ Add to Cursor's MCP settings (Settings → MCP):
96
+
97
+ ```json
98
+ {
99
+ "mcpServers": {
100
+ "shakerscan": {
101
+ "command": "npx",
102
+ "args": ["-y", "shakerscan-mcp"],
103
+ "env": {
104
+ "SCANNER_API_KEY": "sk_live_your_key_here"
105
+ }
106
+ }
107
+ }
108
+ }
109
+ ```
110
+
111
+ ### Alternative: Global Install
112
+
113
+ ```bash
114
+ npm install -g shakerscan-mcp
115
+ ```
116
+
117
+ Then use `"command": "shakerscan-mcp"` instead of npx.
118
+
119
+ ## How It Hooks Into Agent Workflows
120
+
121
+ Shaker plugs into agentic workflows in two layers:
122
+
123
+ 1. MCP provides executable tools.
124
+ 2. A skill or workflow prompt tells the agent when to use those tools and how to make a gate decision.
125
+
126
+ Recommended pattern:
127
+
128
+ - Claude Code / Cursor: configure MCP with `shakerscan-mcp`
129
+ - Codex-style agents: pair MCP or direct HTTP with the repo skill at `skills/shakerscan-agent-gate/`
130
+ - CI pipelines: call the same API routes directly
131
+
132
+ Recommended control-plane flow:
133
+
134
+ - `scan_target`
135
+ - `get_scan_status`
136
+ - `get_findings`
137
+ - `verify_finding` on critical and high findings that support deterministic retesting
138
+ - `evaluate_policy` for the deploy decision
139
+ pass a `policy_pack` such as `preview-fast`, `release-strict`, or a tenant custom pack when the workflow should not rely on the workspace default
140
+ - `get_evidence` to attach the artifact to CI, a PR, or an audit log
141
+ - `issue_approval_token` when an allow decision needs a downstream proof object
142
+ - `request_remediation` when you need a durable fix plan, patch suggestion, and PR draft for blocked findings
143
+
144
+ Concrete assets in this repo:
145
+
146
+ - `scanner-mcp/examples/github-actions-preview-gate.yml`
147
+ - `skills/shakerscan-agent-gate/SKILL.md`
148
+ - `skills/shakerscan-agent-gate/references/workflows.md`
149
+
150
+ ## Usage Examples
151
+
152
+ ### Quick Security Check
153
+
154
+ ```
155
+ You: "Scan https://example.com for security issues"
156
+
157
+ Claude: [Uses scan_target tool]
158
+ [Uses get_scan_status to wait]
159
+ [Uses get_findings to retrieve results]
160
+
161
+ "The scan completed with a grade of B (82/100).
162
+ Found 3 medium severity issues:
163
+ 1. Missing Content-Security-Policy header
164
+ 2. HSTS max-age is below recommended value
165
+ 3. Cookie missing SameSite attribute
166
+
167
+ Recommendations: ..."
168
+ ```
169
+
170
+ ### Comprehensive Audit
171
+
172
+ ```
173
+ You: "Run a full security audit on my staging server https://staging.myapp.com"
174
+
175
+ Claude: [Uses scan_target with all phases enabled]
176
+ [Monitors progress with get_scan_status]
177
+ [Retrieves and analyzes findings]
178
+
179
+ "Comprehensive audit complete. Grade: C (71/100)
180
+
181
+ Critical Issues:
182
+ - SQL injection in /api/search endpoint
183
+
184
+ High Issues:
185
+ - XSS vulnerability in comment form
186
+ - Missing rate limiting on login
187
+
188
+ Remediation roadmap: ..."
189
+ ```
190
+
191
+ ### Track Security Over Time
192
+
193
+ ```
194
+ You: "How has our security improved since last month?"
195
+
196
+ Claude: [Uses get_scan_history for domain]
197
+ [Uses compare_scans on oldest vs newest]
198
+
199
+ "Security has improved! Score increased from 65 to 82.
200
+
201
+ Resolved:
202
+ - SQL injection (critical)
203
+ - 2 XSS vulnerabilities (high)
204
+
205
+ New issues:
206
+ - 1 medium severity header misconfiguration
207
+
208
+ Trend: Improving"
209
+ ```
210
+
211
+ ### Fix a Vulnerability
212
+
213
+ ````
214
+ You: "Help me fix the XSS vulnerability in our React app"
215
+
216
+ Claude: [Uses fix_vulnerability prompt]
217
+
218
+ "XSS (Cross-Site Scripting) allows attackers to inject
219
+ malicious scripts. Here's how to fix it:
220
+
221
+ Vulnerable pattern:
222
+ ```jsx
223
+ <div dangerouslySetInnerHTML={{__html: userInput}} />
224
+ ```
225
+
226
+ Secure pattern:
227
+ ```jsx
228
+ import DOMPurify from 'dompurify';
229
+ <div dangerouslySetInnerHTML={{__html: DOMPurify.sanitize(userInput)}} />
230
+ ```
231
+
232
+ Additional hardening: ..."
233
+ ````
234
+
235
+ ## Vulnerability Categories
236
+
237
+ | Category | Flag | Checks Included |
238
+ | ----------------------- | ----------------- | ---------------------------------------------------------------------------------------------- |
239
+ | Authentication & Access | `vuln_auth` | CSRF, IDOR, Default Credentials, Rate Limiting, 2FA Bypass, Password Reset, Session Management |
240
+ | Injection | `vuln_injection` | Path Traversal, Deserialization |
241
+ | Web Application | `vuln_web` | File Upload, Open Redirect, Host Header, Business Logic, API Security |
242
+ | Client-Side Exposure | `exposure_client` | JS Dependencies, JS Secrets |
243
+ | Infrastructure Exposure | `exposure_infra` | CI/CD Exposure, Cloud Buckets, Backups, Package Files |
244
+ | Threat Intelligence | `threat_intel` | IP Reputation, Breach Check, Vendor Risk, Typosquatting |
245
+
246
+ ## Development
247
+
248
+ ```bash
249
+ # Install dependencies
250
+ npm install
251
+
252
+ # Build
253
+ npm run build
254
+
255
+ # Watch mode
256
+ npm run dev
257
+
258
+ # Test with MCP Inspector
259
+ npm run inspect
260
+ ```
261
+
262
+ ## Architecture
263
+
264
+ ```
265
+ ┌─────────────────────────────────────┐
266
+ │ Claude Code / Cursor / IDE │
267
+ └──────────────────┬──────────────────┘
268
+ │ JSON-RPC (stdio)
269
+ ┌──────────────────▼──────────────────┐
270
+ │ ShakerScan MCP Server │
271
+ │ ┌─────────┐ ┌─────────┐ ┌───────┐ │
272
+ │ │ Tools │ │Resources│ │Prompts│ │
273
+ │ └────┬────┘ └─────────┘ └───────┘ │
274
+ └───────┼─────────────────────────────┘
275
+ │ HTTPS + API Key (sk_live_*)
276
+ ┌───────▼─────────────────────────────┐
277
+ │ ShakerScan Web App v1 API │
278
+ │ /api/v1/scan, /api/v1/scans, │
279
+ │ /api/v1/findings │
280
+ └───────┬─────────────────────────────┘
281
+
282
+ ┌───────▼─────────────────────────────┐
283
+ │ AWS Scanner Infrastructure │
284
+ │ Lambda/ECS + S3 │
285
+ └───────┬─────────────────────────────┘
286
+
287
+ ┌───────▼─────────────────────────────┐
288
+ │ Supabase (PostgreSQL) │
289
+ │ Scans, Findings, API Keys │
290
+ └─────────────────────────────────────┘
291
+ ```
292
+
293
+ ## License
294
+
295
+ MIT
@@ -0,0 +1,19 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * ShakerScan MCP Server
4
+ *
5
+ * A Model Context Protocol server for Dynamic Application Security Testing (DAST).
6
+ * Enables AI assistants like Claude to trigger security scans, analyze vulnerabilities,
7
+ * and help developers fix security issues without leaving their IDE.
8
+ *
9
+ * Usage:
10
+ * SCANNER_API_KEY=xxx npx shakerscan-mcp
11
+ *
12
+ * Environment Variables:
13
+ * SCANNER_API_KEY - Required: API key for ShakerScan AWS API
14
+ * SCANNER_API_URL - Optional: API endpoint (default: production)
15
+ * SUPABASE_URL - Optional: Supabase URL for direct DB access
16
+ * SUPABASE_SERVICE_KEY - Optional: Supabase service role key
17
+ */
18
+ export {};
19
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA;;;;;;;;;;;;;;;GAeG"}