secureflow-cli 2.5.0 → 2.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/README.md +306 -306
- package/dist/ignore.d.ts.map +1 -1
- package/dist/ignore.js +4 -1
- package/dist/ignore.js.map +1 -1
- package/dist/mcp/index.d.ts.map +1 -1
- package/dist/mcp/index.js +107 -2
- package/dist/mcp/index.js.map +1 -1
- package/package.json +43 -43
package/README.md
CHANGED
|
@@ -1,306 +1,306 @@
|
|
|
1
|
-
# 🛡️ SecureFlow CLI (`secureflow-cli`)
|
|
2
|
-
|
|
3
|
-
[](https://www.npmjs.com/package/secureflow-cli)
|
|
4
|
-
[](https://github.com/GauravKarakoti/SecureFlow/blob/main/LICENSE)
|
|
5
|
-
[](https://www.typescriptlang.org/)
|
|
6
|
-
[](https://modelcontextprotocol.io/)
|
|
7
|
-
|
|
8
|
-
**Pre-commit secret logging detector, AI vulnerability scanner, and Threat Intelligence MCP Server for modern developer workflows.**
|
|
9
|
-
|
|
10
|
-
The SecureFlow CLI intercepts code vulnerabilities and exposed secrets right at the developer terminal before commits reach remote repositories. It operates in both cloud-assisted and completely offline / air-gapped modes, features audio debriefs, and acts as an MCP server for AI coding assistants.
|
|
11
|
-
|
|
12
|
-
---
|
|
13
|
-
|
|
14
|
-
## 📋 Table of Contents
|
|
15
|
-
|
|
16
|
-
- [🌟 Features](#-features)
|
|
17
|
-
- [📦 Installation](#-installation)
|
|
18
|
-
- [🚀 Quick Start](#-quick-start)
|
|
19
|
-
- [🪝 Git Hook Setup (Husky)](#-git-hook-setup-husky)
|
|
20
|
-
- [📖 Command Line Reference](#-command-line-reference)
|
|
21
|
-
- [Options & Flags](#options--flags)
|
|
22
|
-
- [Failure Thresholds (`--fail-on`)](#failure-thresholds---fail-on)
|
|
23
|
-
- [Multi-Format Reports (`--format`)](#multi-format-reports---format)
|
|
24
|
-
- [🔒 Air-Gapped & Local Mode (`--local`)](#-air-gapped--local-mode---local)
|
|
25
|
-
- [🎙️ Audio Summary Debriefs (`--voice`)](#️-audio-summary-debriefs---voice)
|
|
26
|
-
- [🤖 Threat Intelligence MCP Server (`mcp`)](#-threat-intelligence-mcp-server-mcp)
|
|
27
|
-
- [Connecting to Cursor / Windsurf / Claude Desktop](#connecting-to-cursor--windsurf--claude-desktop)
|
|
28
|
-
- [Available MCP Tools](#available-mcp-tools)
|
|
29
|
-
- [⚙️ Configuration (`.secureflowignore`)](#️-configuration-secureflowignore)
|
|
30
|
-
- [🔄 CI/CD Pipeline Integration](#-cicd-pipeline-integration)
|
|
31
|
-
- [📄 License](#-license)
|
|
32
|
-
|
|
33
|
-
---
|
|
34
|
-
|
|
35
|
-
## 🌟 Features
|
|
36
|
-
|
|
37
|
-
- **⚡ Instant Pre-Commit Scans**: Evaluates staged git files in milliseconds to prevent accidental secret leaks and credential logging.
|
|
38
|
-
- **🧠 Hybrid AI Security Analysis**: Combines deterministic heuristic pattern matching with LLM-backed vulnerability reasoning.
|
|
39
|
-
- **🔐 Air-Gapped / Zero-Upload Mode**: Run with `--local` to guarantee that code snippets never leave your workstation.
|
|
40
|
-
- **🎙️ Voice Debriefs (`--voice` / `-v`)**: Audio debriefs of scan findings directly in your terminal upon scan completion, with automatic headless CI bypass.
|
|
41
|
-
- **🤖 Built-in MCP Server**: `secureflow mcp` exposes live threat intelligence, CVE lookups, and ArmorIQ cryptographic intent verification over JSON-RPC stdio.
|
|
42
|
-
- **📊 Comprehensive Exporters**: Export audit-grade reports in **SARIF** (GitHub Code Scanning), **HTML**, **CSV** (formula injection hardened), **JSON**, and **Markdown**.
|
|
43
|
-
- **🚦 Configurable Quality Gates**: Strict build-failing control using `--fail-on <low|medium|high|critical>`.
|
|
44
|
-
|
|
45
|
-
---
|
|
46
|
-
|
|
47
|
-
## 📦 Installation
|
|
48
|
-
|
|
49
|
-
### Global Installation (Recommended)
|
|
50
|
-
|
|
51
|
-
```bash
|
|
52
|
-
npm install -g secureflow-cli
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
### Project Dev Dependency
|
|
56
|
-
|
|
57
|
-
```bash
|
|
58
|
-
npm install --save-dev secureflow-cli
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
### Run Instantly via `npx`
|
|
62
|
-
|
|
63
|
-
```bash
|
|
64
|
-
npx secureflow --help
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
---
|
|
68
|
-
|
|
69
|
-
## 🚀 Quick Start
|
|
70
|
-
|
|
71
|
-
1. **Stage your changes in git:**
|
|
72
|
-
|
|
73
|
-
```bash
|
|
74
|
-
git add src/
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
2. **Run the security scanner:**
|
|
78
|
-
|
|
79
|
-
```bash
|
|
80
|
-
secureflow
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
3. **Run with an audio summary debrief:**
|
|
84
|
-
|
|
85
|
-
```bash
|
|
86
|
-
secureflow --voice
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
4. **Export a SARIF report for GitHub Code Scanning:**
|
|
90
|
-
```bash
|
|
91
|
-
secureflow --format sarif -o results.sarif
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
---
|
|
95
|
-
|
|
96
|
-
## 🪝 Git Hook Setup (Husky)
|
|
97
|
-
|
|
98
|
-
Prevent sensitive data from ever entering your git history by configuring SecureFlow in your pre-commit hook:
|
|
99
|
-
|
|
100
|
-
```bash
|
|
101
|
-
# Initialize husky in your project
|
|
102
|
-
npx husky init
|
|
103
|
-
|
|
104
|
-
# Add secureflow to your pre-commit hook
|
|
105
|
-
echo "npx secureflow --fail-on high" > .husky/pre-commit
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
Now, every `git commit` automatically triggers a security check on staged files. If a high or critical finding is detected, the commit is safely blocked.
|
|
109
|
-
|
|
110
|
-
---
|
|
111
|
-
|
|
112
|
-
## 📖 Command Line Reference
|
|
113
|
-
|
|
114
|
-
```text
|
|
115
|
-
Usage:
|
|
116
|
-
secureflow [options]
|
|
117
|
-
secureflow mcp [options]
|
|
118
|
-
|
|
119
|
-
Commands:
|
|
120
|
-
mcp Start the Threat Intelligence Model Context Protocol (MCP) server over stdio
|
|
121
|
-
```
|
|
122
|
-
|
|
123
|
-
### Options & Flags
|
|
124
|
-
|
|
125
|
-
| Flag | Shorthand | Default | Description |
|
|
126
|
-
| :--------------------- | :-------- | :------------------ | :------------------------------------------------------------------------------------------------- |
|
|
127
|
-
| `--fail-on <level>` | | `medium` | Exit with error code `1` if findings meet or exceed severity (`low`, `medium`, `high`, `critical`) |
|
|
128
|
-
| `--format <format>` | | `text` | Output report format: `text`, `json`, `sarif`, `csv`, `html`, `markdown` |
|
|
129
|
-
| `--output <path>` | `-o` | `stdout` | Write report to the specified file path |
|
|
130
|
-
| `--voice` | `-v` | `false` | Play an audio debrief of findings in your terminal upon completion |
|
|
131
|
-
| `--local` | | `false` | Skip cloud AI upload and run fully local pattern analysis |
|
|
132
|
-
| `--local-model <tag>` | | `llama3` | Specify local model tag when using local AI providers |
|
|
133
|
-
| `--ignore-file <path>` | | `.secureflowignore` | Custom path to ignore configuration file |
|
|
134
|
-
| `--dry-run` | | `false` | Simulate scan execution without writing output files |
|
|
135
|
-
| `--verbose` | | `false` | Enable verbose diagnostic logging |
|
|
136
|
-
| `--help` | `-h` | | Display CLI usage instructions and exit |
|
|
137
|
-
|
|
138
|
-
---
|
|
139
|
-
|
|
140
|
-
### Failure Thresholds (`--fail-on`)
|
|
141
|
-
|
|
142
|
-
Control the sensitivity of the pre-commit gate:
|
|
143
|
-
|
|
144
|
-
```bash
|
|
145
|
-
# Block only on high and critical findings (standard CI recommendation)
|
|
146
|
-
secureflow --fail-on high
|
|
147
|
-
|
|
148
|
-
# Strict zero-tolerance gate (blocks on any finding, including low)
|
|
149
|
-
secureflow --fail-on low
|
|
150
|
-
|
|
151
|
-
# Allow commits while logging warnings
|
|
152
|
-
secureflow --fail-on none
|
|
153
|
-
```
|
|
154
|
-
|
|
155
|
-
---
|
|
156
|
-
|
|
157
|
-
### Multi-Format Reports (`--format`)
|
|
158
|
-
|
|
159
|
-
- **Text (`text`)**: Clean, ANSI-colored terminal overview with source code context snippets.
|
|
160
|
-
- **SARIF (`sarif`)**: Industry-standard OASIS SARIF 2.1.0 format, ready for direct upload to GitHub Security tab.
|
|
161
|
-
- **HTML (`html`)**: Self-contained, responsive HTML report suitable for sharing and compliance reviews.
|
|
162
|
-
- **CSV (`csv`)**: Formatted tabular output hardened against spreadsheet formula injection (CWE-1236).
|
|
163
|
-
- **JSON (`json`)**: Machine-readable JSON object representing findings and metadata.
|
|
164
|
-
- **Markdown (`markdown` / `md`)**: GitHub-Flavored Markdown table with sanitized code fences.
|
|
165
|
-
|
|
166
|
-
```bash
|
|
167
|
-
secureflow --format html -o security-report.html
|
|
168
|
-
secureflow --format sarif -o results.sarif
|
|
169
|
-
secureflow --format markdown -o findings.md
|
|
170
|
-
```
|
|
171
|
-
|
|
172
|
-
---
|
|
173
|
-
|
|
174
|
-
## 🔒 Air-Gapped & Local Mode (`--local`)
|
|
175
|
-
|
|
176
|
-
When handling proprietary or classified source code, use the `--local` flag:
|
|
177
|
-
|
|
178
|
-
```bash
|
|
179
|
-
secureflow --local
|
|
180
|
-
```
|
|
181
|
-
|
|
182
|
-
### Guarantees under `--local`:
|
|
183
|
-
|
|
184
|
-
- **Zero Cloud Uploads**: The hosted AI API pass (`/api/cli/scan`) is completely bypassed.
|
|
185
|
-
- **Staged Code Stays Local**: File contents are parsed and scanned strictly in-memory on your local machine.
|
|
186
|
-
- **Compatible with Local Models**: Seamlessly pairs with local Ollama or vLLM deployments (`--local-model <tag>`).
|
|
187
|
-
|
|
188
|
-
For hardware requirements, VRAM sizing, and fallback configuration, see the [Local Model & VRAM Guide](../docs/local-inference.md).
|
|
189
|
-
|
|
190
|
-
---
|
|
191
|
-
|
|
192
|
-
## 🎙️ Audio Summary Debriefs (`--voice`)
|
|
193
|
-
|
|
194
|
-
Listen to hands-free voice briefings of scan findings right in your terminal:
|
|
195
|
-
|
|
196
|
-
```bash
|
|
197
|
-
secureflow --voice
|
|
198
|
-
# or shorthand
|
|
199
|
-
secureflow -v
|
|
200
|
-
```
|
|
201
|
-
|
|
202
|
-
### Capabilities:
|
|
203
|
-
|
|
204
|
-
- **Native OS Playback**:
|
|
205
|
-
- macOS: `afplay`
|
|
206
|
-
- Windows: PowerShell `System.Media.SoundPlayer` / `Windows.Media.Playback`
|
|
207
|
-
- Linux: `mpg123` or `aplay`
|
|
208
|
-
- **Fallback**: Automatically saves findings to `secureflow-summary.mp3` if no audio player is present.
|
|
209
|
-
- **CI Safe**: Detects non-interactive environments (`CI=true`, `GITHUB_ACTIONS=true`) and silently skips playback without stalling build runners.
|
|
210
|
-
- **ElevenLabs Integration**: Synthesizes natural voice summaries if `ELEVENLABS_API_KEY` is present.
|
|
211
|
-
|
|
212
|
-
---
|
|
213
|
-
|
|
214
|
-
## 🤖 Threat Intelligence MCP Server (`mcp`)
|
|
215
|
-
|
|
216
|
-
SecureFlow CLI doubles as a **Model Context Protocol (MCP)** server, allowing AI agents in **Cursor**, **Windsurf**, **Claude Desktop**, or **Antigravity** to query threat intelligence and verify tool actions against ArmorIQ policy boundaries.
|
|
217
|
-
|
|
218
|
-
```bash
|
|
219
|
-
secureflow mcp
|
|
220
|
-
```
|
|
221
|
-
|
|
222
|
-
### Connecting to Cursor / Windsurf / Claude Desktop
|
|
223
|
-
|
|
224
|
-
Add this configuration to your `claude_desktop_config.json` or Cursor MCP settings:
|
|
225
|
-
|
|
226
|
-
```json
|
|
227
|
-
{
|
|
228
|
-
"mcpServers": {
|
|
229
|
-
"secureflow": {
|
|
230
|
-
"command": "npx",
|
|
231
|
-
"args": ["-y", "secureflow-cli", "mcp"]
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
```
|
|
236
|
-
|
|
237
|
-
### Available MCP Tools
|
|
238
|
-
|
|
239
|
-
| Tool | Parameters | Description |
|
|
240
|
-
| :-------------------------- | :-------------------------------------- | :------------------------------------------------------------------------------------------ |
|
|
241
|
-
| `query_threat_intelligence` | `query: string`, `intentToken?: string` | Search CVE and threat intelligence databases for vulnerabilities and remediation guidance. |
|
|
242
|
-
| `lookup_cve` | `cveId: string`, `intentToken?: string` | Look up detailed advisories, severity scores, and fix patterns for a CVE or CWE identifier. |
|
|
243
|
-
|
|
244
|
-
_All MCP tool calls are gated behind ArmorIQ cryptographic intent verification to enforce zero-trust boundary compliance and mitigate Prompt Injection (CWE-94)._
|
|
245
|
-
|
|
246
|
-
For comprehensive IDE configuration steps, intent signing keys, and manual testing instructions, see the dedicated [Threat Intelligence MCP Server Guide](../docs/mcp-server.md).
|
|
247
|
-
|
|
248
|
-
---
|
|
249
|
-
|
|
250
|
-
## ⚙️ Configuration (`.secureflowignore`)
|
|
251
|
-
|
|
252
|
-
Define exclusion patterns and placeholder allowances in `.secureflowignore` at the root of your project:
|
|
253
|
-
|
|
254
|
-
```gitignore
|
|
255
|
-
# Ignore specific directories and generated bundles
|
|
256
|
-
dist/
|
|
257
|
-
coverage/
|
|
258
|
-
node_modules/
|
|
259
|
-
*.min.js
|
|
260
|
-
|
|
261
|
-
# Ignore documentation examples
|
|
262
|
-
docs/samples/**
|
|
263
|
-
|
|
264
|
-
# Allow safe mock/test tokens
|
|
265
|
-
[placeholders]
|
|
266
|
-
mock-token-*
|
|
267
|
-
test_api_key_dummy
|
|
268
|
-
EXAMPLE_SECRET
|
|
269
|
-
```
|
|
270
|
-
|
|
271
|
-
---
|
|
272
|
-
|
|
273
|
-
## 🔄 CI/CD Pipeline Integration
|
|
274
|
-
|
|
275
|
-
### GitHub Actions Workflow
|
|
276
|
-
|
|
277
|
-
```yaml
|
|
278
|
-
name: Security Scan
|
|
279
|
-
on: [push, pull_request]
|
|
280
|
-
|
|
281
|
-
jobs:
|
|
282
|
-
secureflow-scan:
|
|
283
|
-
runs-on: ubuntu-latest
|
|
284
|
-
steps:
|
|
285
|
-
- uses: actions/checkout@v4
|
|
286
|
-
|
|
287
|
-
- name: Setup Node.js
|
|
288
|
-
uses: actions/setup-node@v4
|
|
289
|
-
with:
|
|
290
|
-
node-version: 20
|
|
291
|
-
|
|
292
|
-
- name: Run SecureFlow Scanner
|
|
293
|
-
run: npx secureflow-cli --format sarif -o results.sarif --fail-on high
|
|
294
|
-
|
|
295
|
-
- name: Upload SARIF to GitHub Security tab
|
|
296
|
-
if: always()
|
|
297
|
-
uses: github/codeql-action/upload-sarif@v3
|
|
298
|
-
with:
|
|
299
|
-
sarif_file: results.sarif
|
|
300
|
-
```
|
|
301
|
-
|
|
302
|
-
---
|
|
303
|
-
|
|
304
|
-
## 📄 License
|
|
305
|
-
|
|
306
|
-
This package is licensed under the [ISC License](https://github.com/GauravKarakoti/SecureFlow/blob/main/LICENSE). Built with ❤️ by the SecureFlow Team.
|
|
1
|
+
# 🛡️ SecureFlow CLI (`secureflow-cli`)
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/secureflow-cli)
|
|
4
|
+
[](https://github.com/GauravKarakoti/SecureFlow/blob/main/LICENSE)
|
|
5
|
+
[](https://www.typescriptlang.org/)
|
|
6
|
+
[](https://modelcontextprotocol.io/)
|
|
7
|
+
|
|
8
|
+
**Pre-commit secret logging detector, AI vulnerability scanner, and Threat Intelligence MCP Server for modern developer workflows.**
|
|
9
|
+
|
|
10
|
+
The SecureFlow CLI intercepts code vulnerabilities and exposed secrets right at the developer terminal before commits reach remote repositories. It operates in both cloud-assisted and completely offline / air-gapped modes, features audio debriefs, and acts as an MCP server for AI coding assistants.
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## 📋 Table of Contents
|
|
15
|
+
|
|
16
|
+
- [🌟 Features](#-features)
|
|
17
|
+
- [📦 Installation](#-installation)
|
|
18
|
+
- [🚀 Quick Start](#-quick-start)
|
|
19
|
+
- [🪝 Git Hook Setup (Husky)](#-git-hook-setup-husky)
|
|
20
|
+
- [📖 Command Line Reference](#-command-line-reference)
|
|
21
|
+
- [Options & Flags](#options--flags)
|
|
22
|
+
- [Failure Thresholds (`--fail-on`)](#failure-thresholds---fail-on)
|
|
23
|
+
- [Multi-Format Reports (`--format`)](#multi-format-reports---format)
|
|
24
|
+
- [🔒 Air-Gapped & Local Mode (`--local`)](#-air-gapped--local-mode---local)
|
|
25
|
+
- [🎙️ Audio Summary Debriefs (`--voice`)](#️-audio-summary-debriefs---voice)
|
|
26
|
+
- [🤖 Threat Intelligence MCP Server (`mcp`)](#-threat-intelligence-mcp-server-mcp)
|
|
27
|
+
- [Connecting to Cursor / Windsurf / Claude Desktop](#connecting-to-cursor--windsurf--claude-desktop)
|
|
28
|
+
- [Available MCP Tools](#available-mcp-tools)
|
|
29
|
+
- [⚙️ Configuration (`.secureflowignore`)](#️-configuration-secureflowignore)
|
|
30
|
+
- [🔄 CI/CD Pipeline Integration](#-cicd-pipeline-integration)
|
|
31
|
+
- [📄 License](#-license)
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## 🌟 Features
|
|
36
|
+
|
|
37
|
+
- **⚡ Instant Pre-Commit Scans**: Evaluates staged git files in milliseconds to prevent accidental secret leaks and credential logging.
|
|
38
|
+
- **🧠 Hybrid AI Security Analysis**: Combines deterministic heuristic pattern matching with LLM-backed vulnerability reasoning.
|
|
39
|
+
- **🔐 Air-Gapped / Zero-Upload Mode**: Run with `--local` to guarantee that code snippets never leave your workstation.
|
|
40
|
+
- **🎙️ Voice Debriefs (`--voice` / `-v`)**: Audio debriefs of scan findings directly in your terminal upon scan completion, with automatic headless CI bypass.
|
|
41
|
+
- **🤖 Built-in MCP Server**: `secureflow mcp` exposes live threat intelligence, CVE lookups, and ArmorIQ cryptographic intent verification over JSON-RPC stdio.
|
|
42
|
+
- **📊 Comprehensive Exporters**: Export audit-grade reports in **SARIF** (GitHub Code Scanning), **HTML**, **CSV** (formula injection hardened), **JSON**, and **Markdown**.
|
|
43
|
+
- **🚦 Configurable Quality Gates**: Strict build-failing control using `--fail-on <low|medium|high|critical>`.
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## 📦 Installation
|
|
48
|
+
|
|
49
|
+
### Global Installation (Recommended)
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
npm install -g secureflow-cli
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### Project Dev Dependency
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
npm install --save-dev secureflow-cli
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### Run Instantly via `npx`
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
npx secureflow --help
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## 🚀 Quick Start
|
|
70
|
+
|
|
71
|
+
1. **Stage your changes in git:**
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
git add src/
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
2. **Run the security scanner:**
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
secureflow
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
3. **Run with an audio summary debrief:**
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
secureflow --voice
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
4. **Export a SARIF report for GitHub Code Scanning:**
|
|
90
|
+
```bash
|
|
91
|
+
secureflow --format sarif -o results.sarif
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
---
|
|
95
|
+
|
|
96
|
+
## 🪝 Git Hook Setup (Husky)
|
|
97
|
+
|
|
98
|
+
Prevent sensitive data from ever entering your git history by configuring SecureFlow in your pre-commit hook:
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
# Initialize husky in your project
|
|
102
|
+
npx husky init
|
|
103
|
+
|
|
104
|
+
# Add secureflow to your pre-commit hook
|
|
105
|
+
echo "npx secureflow --fail-on high" > .husky/pre-commit
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
Now, every `git commit` automatically triggers a security check on staged files. If a high or critical finding is detected, the commit is safely blocked.
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
## 📖 Command Line Reference
|
|
113
|
+
|
|
114
|
+
```text
|
|
115
|
+
Usage:
|
|
116
|
+
secureflow [options]
|
|
117
|
+
secureflow mcp [options]
|
|
118
|
+
|
|
119
|
+
Commands:
|
|
120
|
+
mcp Start the Threat Intelligence Model Context Protocol (MCP) server over stdio
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
### Options & Flags
|
|
124
|
+
|
|
125
|
+
| Flag | Shorthand | Default | Description |
|
|
126
|
+
| :--------------------- | :-------- | :------------------ | :------------------------------------------------------------------------------------------------- |
|
|
127
|
+
| `--fail-on <level>` | | `medium` | Exit with error code `1` if findings meet or exceed severity (`low`, `medium`, `high`, `critical`) |
|
|
128
|
+
| `--format <format>` | | `text` | Output report format: `text`, `json`, `sarif`, `csv`, `html`, `markdown` |
|
|
129
|
+
| `--output <path>` | `-o` | `stdout` | Write report to the specified file path |
|
|
130
|
+
| `--voice` | `-v` | `false` | Play an audio debrief of findings in your terminal upon completion |
|
|
131
|
+
| `--local` | | `false` | Skip cloud AI upload and run fully local pattern analysis |
|
|
132
|
+
| `--local-model <tag>` | | `llama3` | Specify local model tag when using local AI providers |
|
|
133
|
+
| `--ignore-file <path>` | | `.secureflowignore` | Custom path to ignore configuration file |
|
|
134
|
+
| `--dry-run` | | `false` | Simulate scan execution without writing output files |
|
|
135
|
+
| `--verbose` | | `false` | Enable verbose diagnostic logging |
|
|
136
|
+
| `--help` | `-h` | | Display CLI usage instructions and exit |
|
|
137
|
+
|
|
138
|
+
---
|
|
139
|
+
|
|
140
|
+
### Failure Thresholds (`--fail-on`)
|
|
141
|
+
|
|
142
|
+
Control the sensitivity of the pre-commit gate:
|
|
143
|
+
|
|
144
|
+
```bash
|
|
145
|
+
# Block only on high and critical findings (standard CI recommendation)
|
|
146
|
+
secureflow --fail-on high
|
|
147
|
+
|
|
148
|
+
# Strict zero-tolerance gate (blocks on any finding, including low)
|
|
149
|
+
secureflow --fail-on low
|
|
150
|
+
|
|
151
|
+
# Allow commits while logging warnings
|
|
152
|
+
secureflow --fail-on none
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
---
|
|
156
|
+
|
|
157
|
+
### Multi-Format Reports (`--format`)
|
|
158
|
+
|
|
159
|
+
- **Text (`text`)**: Clean, ANSI-colored terminal overview with source code context snippets.
|
|
160
|
+
- **SARIF (`sarif`)**: Industry-standard OASIS SARIF 2.1.0 format, ready for direct upload to GitHub Security tab.
|
|
161
|
+
- **HTML (`html`)**: Self-contained, responsive HTML report suitable for sharing and compliance reviews.
|
|
162
|
+
- **CSV (`csv`)**: Formatted tabular output hardened against spreadsheet formula injection (CWE-1236).
|
|
163
|
+
- **JSON (`json`)**: Machine-readable JSON object representing findings and metadata.
|
|
164
|
+
- **Markdown (`markdown` / `md`)**: GitHub-Flavored Markdown table with sanitized code fences.
|
|
165
|
+
|
|
166
|
+
```bash
|
|
167
|
+
secureflow --format html -o security-report.html
|
|
168
|
+
secureflow --format sarif -o results.sarif
|
|
169
|
+
secureflow --format markdown -o findings.md
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
---
|
|
173
|
+
|
|
174
|
+
## 🔒 Air-Gapped & Local Mode (`--local`)
|
|
175
|
+
|
|
176
|
+
When handling proprietary or classified source code, use the `--local` flag:
|
|
177
|
+
|
|
178
|
+
```bash
|
|
179
|
+
secureflow --local
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
### Guarantees under `--local`:
|
|
183
|
+
|
|
184
|
+
- **Zero Cloud Uploads**: The hosted AI API pass (`/api/cli/scan`) is completely bypassed.
|
|
185
|
+
- **Staged Code Stays Local**: File contents are parsed and scanned strictly in-memory on your local machine.
|
|
186
|
+
- **Compatible with Local Models**: Seamlessly pairs with local Ollama or vLLM deployments (`--local-model <tag>`).
|
|
187
|
+
|
|
188
|
+
For hardware requirements, VRAM sizing, and fallback configuration, see the [Local Model & VRAM Guide](../docs/local-inference.md).
|
|
189
|
+
|
|
190
|
+
---
|
|
191
|
+
|
|
192
|
+
## 🎙️ Audio Summary Debriefs (`--voice`)
|
|
193
|
+
|
|
194
|
+
Listen to hands-free voice briefings of scan findings right in your terminal:
|
|
195
|
+
|
|
196
|
+
```bash
|
|
197
|
+
secureflow --voice
|
|
198
|
+
# or shorthand
|
|
199
|
+
secureflow -v
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
### Capabilities:
|
|
203
|
+
|
|
204
|
+
- **Native OS Playback**:
|
|
205
|
+
- macOS: `afplay`
|
|
206
|
+
- Windows: PowerShell `System.Media.SoundPlayer` / `Windows.Media.Playback`
|
|
207
|
+
- Linux: `mpg123` or `aplay`
|
|
208
|
+
- **Fallback**: Automatically saves findings to `secureflow-summary.mp3` if no audio player is present.
|
|
209
|
+
- **CI Safe**: Detects non-interactive environments (`CI=true`, `GITHUB_ACTIONS=true`) and silently skips playback without stalling build runners.
|
|
210
|
+
- **ElevenLabs Integration**: Synthesizes natural voice summaries if `ELEVENLABS_API_KEY` is present.
|
|
211
|
+
|
|
212
|
+
---
|
|
213
|
+
|
|
214
|
+
## 🤖 Threat Intelligence MCP Server (`mcp`)
|
|
215
|
+
|
|
216
|
+
SecureFlow CLI doubles as a **Model Context Protocol (MCP)** server, allowing AI agents in **Cursor**, **Windsurf**, **Claude Desktop**, or **Antigravity** to query threat intelligence and verify tool actions against ArmorIQ policy boundaries.
|
|
217
|
+
|
|
218
|
+
```bash
|
|
219
|
+
secureflow mcp
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
### Connecting to Cursor / Windsurf / Claude Desktop
|
|
223
|
+
|
|
224
|
+
Add this configuration to your `claude_desktop_config.json` or Cursor MCP settings:
|
|
225
|
+
|
|
226
|
+
```json
|
|
227
|
+
{
|
|
228
|
+
"mcpServers": {
|
|
229
|
+
"secureflow": {
|
|
230
|
+
"command": "npx",
|
|
231
|
+
"args": ["-y", "secureflow-cli", "mcp"]
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
### Available MCP Tools
|
|
238
|
+
|
|
239
|
+
| Tool | Parameters | Description |
|
|
240
|
+
| :-------------------------- | :-------------------------------------- | :------------------------------------------------------------------------------------------ |
|
|
241
|
+
| `query_threat_intelligence` | `query: string`, `intentToken?: string` | Search CVE and threat intelligence databases for vulnerabilities and remediation guidance. |
|
|
242
|
+
| `lookup_cve` | `cveId: string`, `intentToken?: string` | Look up detailed advisories, severity scores, and fix patterns for a CVE or CWE identifier. |
|
|
243
|
+
|
|
244
|
+
_All MCP tool calls are gated behind ArmorIQ cryptographic intent verification to enforce zero-trust boundary compliance and mitigate Prompt Injection (CWE-94)._
|
|
245
|
+
|
|
246
|
+
For comprehensive IDE configuration steps, intent signing keys, and manual testing instructions, see the dedicated [Threat Intelligence MCP Server Guide](../docs/mcp-server.md).
|
|
247
|
+
|
|
248
|
+
---
|
|
249
|
+
|
|
250
|
+
## ⚙️ Configuration (`.secureflowignore`)
|
|
251
|
+
|
|
252
|
+
Define exclusion patterns and placeholder allowances in `.secureflowignore` at the root of your project:
|
|
253
|
+
|
|
254
|
+
```gitignore
|
|
255
|
+
# Ignore specific directories and generated bundles
|
|
256
|
+
dist/
|
|
257
|
+
coverage/
|
|
258
|
+
node_modules/
|
|
259
|
+
*.min.js
|
|
260
|
+
|
|
261
|
+
# Ignore documentation examples
|
|
262
|
+
docs/samples/**
|
|
263
|
+
|
|
264
|
+
# Allow safe mock/test tokens
|
|
265
|
+
[placeholders]
|
|
266
|
+
mock-token-*
|
|
267
|
+
test_api_key_dummy
|
|
268
|
+
EXAMPLE_SECRET
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
---
|
|
272
|
+
|
|
273
|
+
## 🔄 CI/CD Pipeline Integration
|
|
274
|
+
|
|
275
|
+
### GitHub Actions Workflow
|
|
276
|
+
|
|
277
|
+
```yaml
|
|
278
|
+
name: Security Scan
|
|
279
|
+
on: [push, pull_request]
|
|
280
|
+
|
|
281
|
+
jobs:
|
|
282
|
+
secureflow-scan:
|
|
283
|
+
runs-on: ubuntu-latest
|
|
284
|
+
steps:
|
|
285
|
+
- uses: actions/checkout@v4
|
|
286
|
+
|
|
287
|
+
- name: Setup Node.js
|
|
288
|
+
uses: actions/setup-node@v4
|
|
289
|
+
with:
|
|
290
|
+
node-version: 20
|
|
291
|
+
|
|
292
|
+
- name: Run SecureFlow Scanner
|
|
293
|
+
run: npx secureflow-cli --format sarif -o results.sarif --fail-on high
|
|
294
|
+
|
|
295
|
+
- name: Upload SARIF to GitHub Security tab
|
|
296
|
+
if: always()
|
|
297
|
+
uses: github/codeql-action/upload-sarif@v3
|
|
298
|
+
with:
|
|
299
|
+
sarif_file: results.sarif
|
|
300
|
+
```
|
|
301
|
+
|
|
302
|
+
---
|
|
303
|
+
|
|
304
|
+
## 📄 License
|
|
305
|
+
|
|
306
|
+
This package is licensed under the [ISC License](https://github.com/GauravKarakoti/SecureFlow/blob/main/LICENSE). Built with ❤️ by the SecureFlow Team.
|
package/dist/ignore.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ignore.d.ts","sourceRoot":"","sources":["../src/ignore.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,sBAAsB;IACrC,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAE1D;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,MAAM,GAAG,sBAAsB,CA+B7E;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,
|
|
1
|
+
{"version":3,"file":"ignore.d.ts","sourceRoot":"","sources":["../src/ignore.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,sBAAsB;IACrC,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAE1D;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,MAAM,GAAG,sBAAsB,CA+B7E;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CA6BtD;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,CA2BlE;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,EAAE,aAAa,GAAE,MAAM,EAAO,GAAG,OAAO,CAOxF;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAClC,cAAc,CAAC,EAAE,MAAM,EACvB,OAAO,GAAE,MAAsB,GAC9B;IAAE,MAAM,EAAE,sBAAsB,CAAC;IAAC,gBAAgB,EAAE,MAAM,EAAE,CAAA;CAAE,GAAG,IAAI,CAsBvE"}
|
package/dist/ignore.js
CHANGED
|
@@ -65,7 +65,10 @@ export function globToRegexSource(glob) {
|
|
|
65
65
|
i += 3;
|
|
66
66
|
}
|
|
67
67
|
else if (glob.startsWith("**", i)) {
|
|
68
|
-
|
|
68
|
+
// `**` is only recursive as a whole path segment; `a**b` is one segment.
|
|
69
|
+
const segmentStart = i === 0 || glob[i - 1] === "/";
|
|
70
|
+
const segmentEnd = i + 2 === glob.length || glob[i + 2] === "/";
|
|
71
|
+
out += segmentStart && segmentEnd ? ".*" : "[^/]*";
|
|
69
72
|
i += 2;
|
|
70
73
|
}
|
|
71
74
|
else if (glob[i] === "*") {
|
package/dist/ignore.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|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.d.ts","sourceRoot":"","sources":["../../src/mcp/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AAInE,MAAM,WAAW,uBAAuB;IACtC,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,mBAAmB,EAAE,MAAM,CAAC;CAC7B;AAED,eAAO,MAAM,cAAc,EAAE,uBAAuB,EA8CnD,CAAC;AAqBF,MAAM,WAAW,wBAAwB;IACvC,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE;QACN,SAAS,EAAE,MAAM,CAAC;QAClB,SAAS,EAAE,MAAM,CAAC;QAClB,SAAS,EAAE,MAAM,CAAC;KACnB,CAAC;CACH;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC7B,WAAW,CAAC,EAAE,MAAM,GACnB,wBAAwB,CA4D1B;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/mcp/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AAInE,MAAM,WAAW,uBAAuB;IACtC,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,mBAAmB,EAAE,MAAM,CAAC;CAC7B;AAED,eAAO,MAAM,cAAc,EAAE,uBAAuB,EA8CnD,CAAC;AAqBF,MAAM,WAAW,wBAAwB;IACvC,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE;QACN,SAAS,EAAE,MAAM,CAAC;QAClB,SAAS,EAAE,MAAM,CAAC;QAClB,SAAS,EAAE,MAAM,CAAC;KACnB,CAAC;CACH;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC7B,WAAW,CAAC,EAAE,MAAM,GACnB,wBAAwB,CA4D1B;AAgFD,wBAAgB,0BAA0B,IAAI,MAAM,CAiLnD;AAED,wBAAsB,2BAA2B,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAgBhF;AAED,wBAAsB,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC,CAKpD"}
|
package/dist/mcp/index.js
CHANGED
|
@@ -110,6 +110,77 @@ export function verifyDeclaredIntent(toolName, args, intentToken) {
|
|
|
110
110
|
},
|
|
111
111
|
};
|
|
112
112
|
}
|
|
113
|
+
const REMEDIATION_CONTEXT_SCHEMA = {
|
|
114
|
+
type: "object",
|
|
115
|
+
properties: {
|
|
116
|
+
history: {
|
|
117
|
+
type: "array",
|
|
118
|
+
maxItems: 1000,
|
|
119
|
+
description: "Caller-provided remediation outcomes; never fetched from a dashboard database.",
|
|
120
|
+
items: {
|
|
121
|
+
type: "object",
|
|
122
|
+
properties: {
|
|
123
|
+
advisoryId: { type: "string", pattern: "^[A-Za-z0-9][A-Za-z0-9-]{0,63}$" },
|
|
124
|
+
status: { type: "string", enum: ["APPLIED", "FAILED", "PENDING", "GENERATED"] },
|
|
125
|
+
},
|
|
126
|
+
required: ["advisoryId", "status"],
|
|
127
|
+
additionalProperties: false,
|
|
128
|
+
},
|
|
129
|
+
},
|
|
130
|
+
advisoryId: {
|
|
131
|
+
type: "string",
|
|
132
|
+
pattern: "^[A-Za-z0-9][A-Za-z0-9-]{0,63}$",
|
|
133
|
+
description: "Optional case-insensitive advisory filter.",
|
|
134
|
+
},
|
|
135
|
+
intentToken: { type: "string" },
|
|
136
|
+
},
|
|
137
|
+
required: ["history"],
|
|
138
|
+
additionalProperties: false,
|
|
139
|
+
};
|
|
140
|
+
const STATUSES = ["APPLIED", "FAILED", "PENDING", "GENERATED"];
|
|
141
|
+
const ID = /^[A-Za-z0-9][A-Za-z0-9-]{0,63}$/;
|
|
142
|
+
/** Aggregate bounded caller-supplied history, without inventing production evidence. */
|
|
143
|
+
function summarizeRemediationHistory(args) {
|
|
144
|
+
if (Object.keys(args).some((key) => !["history", "advisoryId", "intentToken"].includes(key))) {
|
|
145
|
+
throw new Error("Unknown remediation-context argument");
|
|
146
|
+
}
|
|
147
|
+
if (args.intentToken !== undefined && typeof args.intentToken !== "string") {
|
|
148
|
+
throw new Error("intentToken must be a string");
|
|
149
|
+
}
|
|
150
|
+
const filter = args.advisoryId;
|
|
151
|
+
if (filter !== undefined && (typeof filter !== "string" || !ID.test(filter))) {
|
|
152
|
+
throw new Error("advisoryId must be an alphanumeric/hyphen identifier of 1–64 characters");
|
|
153
|
+
}
|
|
154
|
+
if (!Array.isArray(args.history) || args.history.length > 1000) {
|
|
155
|
+
throw new Error("history must be an array of at most 1000 outcomes");
|
|
156
|
+
}
|
|
157
|
+
const counts = { APPLIED: 0, FAILED: 0, PENDING: 0, GENERATED: 0 };
|
|
158
|
+
for (const value of args.history) {
|
|
159
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) {
|
|
160
|
+
throw new Error("Each history item must be an object");
|
|
161
|
+
}
|
|
162
|
+
const item = value;
|
|
163
|
+
if (Object.keys(item).some((key) => !["advisoryId", "status"].includes(key)) ||
|
|
164
|
+
typeof item.advisoryId !== "string" ||
|
|
165
|
+
!ID.test(item.advisoryId) ||
|
|
166
|
+
!STATUSES.includes(item.status)) {
|
|
167
|
+
throw new Error("Each history item requires a valid advisoryId and remediation status");
|
|
168
|
+
}
|
|
169
|
+
if (filter === undefined || item.advisoryId.toUpperCase() === filter.toUpperCase()) {
|
|
170
|
+
counts[item.status] += 1;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
const completed = counts.APPLIED + counts.FAILED;
|
|
174
|
+
return {
|
|
175
|
+
source: "caller_provided",
|
|
176
|
+
advisoryId: typeof filter === "string" ? filter.toUpperCase() : null,
|
|
177
|
+
sampleSize: Object.values(counts).reduce((sum, count) => sum + count, 0),
|
|
178
|
+
counts,
|
|
179
|
+
completed,
|
|
180
|
+
applicationSuccessRate: completed === 0 ? null : counts.APPLIED / completed,
|
|
181
|
+
interpretation: "APPLIED / (APPLIED + FAILED); application is not proof of vulnerability resolution",
|
|
182
|
+
};
|
|
183
|
+
}
|
|
113
184
|
export function createThreatIntelMcpServer() {
|
|
114
185
|
const server = new Server({
|
|
115
186
|
name: "secureflow-threat-intelligence",
|
|
@@ -122,9 +193,20 @@ export function createThreatIntelMcpServer() {
|
|
|
122
193
|
server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
123
194
|
return {
|
|
124
195
|
tools: [
|
|
196
|
+
{
|
|
197
|
+
name: "get_remediation_context",
|
|
198
|
+
description: "Summarize caller-provided historical remediation outcomes, optionally by advisory. Returns application rates with explicit sample counts; does not access production data.",
|
|
199
|
+
inputSchema: REMEDIATION_CONTEXT_SCHEMA,
|
|
200
|
+
annotations: {
|
|
201
|
+
readOnlyHint: true,
|
|
202
|
+
destructiveHint: false,
|
|
203
|
+
idempotentHint: true,
|
|
204
|
+
openWorldHint: false,
|
|
205
|
+
},
|
|
206
|
+
},
|
|
125
207
|
{
|
|
126
208
|
name: "query_threat_intelligence",
|
|
127
|
-
description: "Search
|
|
209
|
+
description: "Search the bundled advisory examples for security context and remediation recommendations. Does not query a live CVE service.",
|
|
128
210
|
inputSchema: {
|
|
129
211
|
type: "object",
|
|
130
212
|
properties: {
|
|
@@ -163,7 +245,7 @@ export function createThreatIntelMcpServer() {
|
|
|
163
245
|
});
|
|
164
246
|
server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
165
247
|
const { name, arguments: args } = request.params;
|
|
166
|
-
const intentToken = args?.intentToken;
|
|
248
|
+
const intentToken = typeof args?.intentToken === "string" ? args.intentToken : undefined;
|
|
167
249
|
// Cryptographic intent verification gate: reject any drift or injection attempt fail-closed
|
|
168
250
|
const intentVerification = verifyDeclaredIntent(name, args || {}, intentToken);
|
|
169
251
|
if (!intentVerification.allowed) {
|
|
@@ -181,6 +263,29 @@ export function createThreatIntelMcpServer() {
|
|
|
181
263
|
],
|
|
182
264
|
};
|
|
183
265
|
}
|
|
266
|
+
if (name === "get_remediation_context") {
|
|
267
|
+
try {
|
|
268
|
+
const summary = summarizeRemediationHistory(args || {});
|
|
269
|
+
return {
|
|
270
|
+
content: [{ type: "text", text: JSON.stringify(summary) }],
|
|
271
|
+
structuredContent: summary,
|
|
272
|
+
};
|
|
273
|
+
}
|
|
274
|
+
catch (error) {
|
|
275
|
+
return {
|
|
276
|
+
isError: true,
|
|
277
|
+
content: [
|
|
278
|
+
{
|
|
279
|
+
type: "text",
|
|
280
|
+
text: JSON.stringify({
|
|
281
|
+
code: "INVALID_ARGUMENTS",
|
|
282
|
+
error: error instanceof Error ? error.message : "Invalid remediation context",
|
|
283
|
+
}),
|
|
284
|
+
},
|
|
285
|
+
],
|
|
286
|
+
};
|
|
287
|
+
}
|
|
288
|
+
}
|
|
184
289
|
if (name === "query_threat_intelligence") {
|
|
185
290
|
const query = String(args?.query || "").toLowerCase();
|
|
186
291
|
const matches = KNOWLEDGE_BASE.filter((item) => item.description.toLowerCase().includes(query) ||
|
package/dist/mcp/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/mcp/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,EAAE,MAAM,EA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AAM,CAAC,KAAK,UAAU,cAAc;IAClC,MAAM,MAAM,GAAG,0BAA0B,EAAE,CAAC;IAC5C,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAC;IAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAChC,OAAO,CAAC,KAAK,CAAC,6DAA6D,CAAC,CAAC;AAC/E,CAAC;AAED,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IACjE,cAAc,EAAE,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;QAC7B,OAAO,CAAC,KAAK,CAAC,kCAAkC,EAAE,GAAG,CAAC,CAAC;QACvD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC,CAAC,CAAC;AACL,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "secureflow-cli",
|
|
3
|
-
"version": "2.
|
|
4
|
-
"description": "Pre-commit secret logging detector for secure development workflows",
|
|
5
|
-
"main": "./dist/index.js",
|
|
6
|
-
"bin": {
|
|
7
|
-
"secureflow": "dist/index.js"
|
|
8
|
-
},
|
|
9
|
-
"publishConfig": {
|
|
10
|
-
"access": "public"
|
|
11
|
-
},
|
|
12
|
-
"scripts": {
|
|
13
|
-
"build": "tsc",
|
|
14
|
-
"typecheck": "tsc --noEmit",
|
|
15
|
-
"prepare": "npm run build",
|
|
16
|
-
"publish": "npm publish",
|
|
17
|
-
"test": "vitest run",
|
|
18
|
-
"test:e2e": "vitest run src/e2e.test.ts",
|
|
19
|
-
"test:watch": "vitest"
|
|
20
|
-
},
|
|
21
|
-
"keywords": [
|
|
22
|
-
"security",
|
|
23
|
-
"secrets",
|
|
24
|
-
"scanner",
|
|
25
|
-
"pre-commit",
|
|
26
|
-
"husky",
|
|
27
|
-
"secureflow"
|
|
28
|
-
],
|
|
29
|
-
"author": "Gaurav Karakoti",
|
|
30
|
-
"license": "ISC",
|
|
31
|
-
"type": "module",
|
|
32
|
-
"files": [
|
|
33
|
-
"dist"
|
|
34
|
-
],
|
|
35
|
-
"dependencies": {
|
|
36
|
-
"@modelcontextprotocol/sdk": "^1.32.
|
|
37
|
-
},
|
|
38
|
-
"devDependencies": {
|
|
39
|
-
"@types/node": "^26.6.
|
|
40
|
-
"typescript": "^6",
|
|
41
|
-
"vitest": "^5.0.5"
|
|
42
|
-
}
|
|
43
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "secureflow-cli",
|
|
3
|
+
"version": "2.6.0",
|
|
4
|
+
"description": "Pre-commit secret logging detector for secure development workflows",
|
|
5
|
+
"main": "./dist/index.js",
|
|
6
|
+
"bin": {
|
|
7
|
+
"secureflow": "dist/index.js"
|
|
8
|
+
},
|
|
9
|
+
"publishConfig": {
|
|
10
|
+
"access": "public"
|
|
11
|
+
},
|
|
12
|
+
"scripts": {
|
|
13
|
+
"build": "tsc",
|
|
14
|
+
"typecheck": "tsc --noEmit",
|
|
15
|
+
"prepare": "npm run build",
|
|
16
|
+
"publish": "npm publish",
|
|
17
|
+
"test": "vitest run",
|
|
18
|
+
"test:e2e": "vitest run src/e2e.test.ts",
|
|
19
|
+
"test:watch": "vitest"
|
|
20
|
+
},
|
|
21
|
+
"keywords": [
|
|
22
|
+
"security",
|
|
23
|
+
"secrets",
|
|
24
|
+
"scanner",
|
|
25
|
+
"pre-commit",
|
|
26
|
+
"husky",
|
|
27
|
+
"secureflow"
|
|
28
|
+
],
|
|
29
|
+
"author": "Gaurav Karakoti",
|
|
30
|
+
"license": "ISC",
|
|
31
|
+
"type": "module",
|
|
32
|
+
"files": [
|
|
33
|
+
"dist"
|
|
34
|
+
],
|
|
35
|
+
"dependencies": {
|
|
36
|
+
"@modelcontextprotocol/sdk": "^1.32.2"
|
|
37
|
+
},
|
|
38
|
+
"devDependencies": {
|
|
39
|
+
"@types/node": "^26.6.6",
|
|
40
|
+
"typescript": "^6",
|
|
41
|
+
"vitest": "^5.0.5"
|
|
42
|
+
}
|
|
43
|
+
}
|