@mobb.ai/cli-linux-x64 1.4.49 → 1.4.51

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.
Files changed (3) hide show
  1. package/README.md +216 -0
  2. package/mobbdev +0 -0
  3. package/package.json +5 -2
package/README.md ADDED
@@ -0,0 +1,216 @@
1
+ # Bugsy
2
+
3
+ Bugsy is a command-line interface (CLI) tool that provides automatic security vulnerability remediation for your code. It is the community edition version of [Mobb](https://mobb.ai), the first vendor-agnostic automated security vulnerability remediation tool. Bugsy is designed to help developers quickly identify and fix security vulnerabilities in their code.
4
+
5
+ <img width="1888" alt="Bugsy" src="./img/bugsy2.png">
6
+
7
+ ## What is [Mobb](https://mobb.ai)?
8
+
9
+ [Mobb](https://mobb.ai) is the first vendor-agnostic automatic security vulnerability remediation tool. It ingests SAST results from Checkmarx, CodeQL (GitHub Advanced Security), OpenText Fortify, and Snyk and produces code fixes for developers to review and commit to their code.
10
+
11
+ ## What does Bugsy do?
12
+
13
+ Bugsy has two modes - Scan (no SAST report needed) & Analyze (the user needs to provide a pre-generated SAST report from one of the supported SAST tools).
14
+
15
+ Scan
16
+
17
+ - Uses Checkmarx or Snyk CLI tools to run a SAST scan on a given open-source GitHub/GitLab/ADO repo
18
+ - Analyzes the vulnerability report to identify issues that can be remediated automatically
19
+ - Produces the code fixes and redirects the user to the fix report page on the Mobb platform
20
+
21
+ Analyze
22
+
23
+ - Analyzes the a Checkmarx/CodeQL/Fortify/Snyk vulnerability report to identify issues that can be remediated automatically
24
+ - Produces the code fixes and redirects the user to the fix report page on the Mobb platform
25
+
26
+ ## Disclaimer
27
+
28
+ This is a community edition version that only analyzes public GitHub repositories. Analyzing private repositories is allowed for a limited amount of time.
29
+ Bugsy does not detect any vulnerabilities in your code, it uses findings detected by the SAST tools mentioned above.
30
+
31
+ ## Usage
32
+
33
+ ### Command Line Interface
34
+
35
+ You can simply run Bugsy from the command line, using npx:
36
+
37
+ ```shell
38
+ npx mobbdev
39
+ ```
40
+
41
+ This will show you Bugsy's usage help:
42
+
43
+ ```shell
44
+ Bugsy - Trusted, Automatic Vulnerability Fixer 🕵️‍♂️
45
+
46
+ Usage:
47
+ mobbdev <command> [options]
48
+
49
+
50
+ Commands:
51
+ mobbdev scan Scan your code for vulnerabilities, get automated fixes right away.
52
+ mobbdev analyze Provide a vulnerability report and relevant code repository, get automated fixes right away.
53
+
54
+ Options:
55
+ -h, --help Show help [boolean]
56
+
57
+ Examples:
58
+ mobbdev scan -r https://github.com/WebGoat/WebGoat Scan an existing repository
59
+
60
+ Made with ❤️ by Mobb
61
+ ```
62
+
63
+ To run a new SAST scan on a repo and get fixes, run the **Bugsy Scan** command. Example:
64
+
65
+ ```shell
66
+ npx mobbdev scan --repo https://github.com/mobb-dev/simple-vulnerable-java-project
67
+ ```
68
+
69
+ To get fixes for a pre-generated SAST report, run the **Bugsy Analyze** command. Example:
70
+ npx mobbdev analyze --scan-file sast_results.json --repo https://github.com/mobb-dev/simple-vulnerable-java-project
71
+
72
+ Bugsy will automatically generate a fix for each supported vulnerability identified in the results, and refer the developer to review and commit the fixes to their code.
73
+
74
+ To see all the options Bugsy allows, use the Scan or Analyze commands with the -h option:
75
+
76
+ ```shell
77
+ npx mobbdev scan -h
78
+ npx mobbdev analyze -h
79
+ ```
80
+
81
+ ### Model Context Protocol (MCP) Server
82
+
83
+ Bugsy can also be used as an MCP server, allowing AI assistants like Claude to automatically scan and fix vulnerabilities in your code repositories.
84
+
85
+ #### Prerequisites
86
+
87
+ 1. **API Key**: You need a Mobb API key to use the MCP server functionality
88
+ - Sign up at [mobb.ai](https://app.mobb.ai) to get your API key
89
+ - Set the `API_KEY` environment variable: `export API_KEY=your_api_key_here`
90
+
91
+ 2. **Local Git Repository**: The MCP server analyzes git repositories with uncommitted changes
92
+ - Make sure your code is in a local git repository
93
+ - Have some modified, added, or staged files to analyze
94
+
95
+ #### Installation
96
+
97
+ Run mobb-mcp from command line:
98
+
99
+ ```shell
100
+ npx mobbdev mcp
101
+ ```
102
+
103
+ #### Configuration
104
+
105
+ Add Mobb MCP to your Cursor MCP client configuration:
106
+ `API_URL` is only required if you are not using https://app.mobb.ai
107
+
108
+ ```json
109
+ {
110
+ "mcpServers": {
111
+ "mobb-mcp": {
112
+ "command": "npx",
113
+ "args": ["mobbdev", "mcp"],
114
+ "env": {
115
+ "API_KEY": "your_mobb_api_key_here",
116
+ "API_URL": "optional__your_mobb_api_url_here",
117
+ "MVS_AUTO_FIX": "true"
118
+ }
119
+ }
120
+ }
121
+ }
122
+ ```
123
+
124
+ **Environment Variables:**
125
+ - `API_KEY`: Your Mobb API key (required)
126
+ - `API_URL`: Custom Mobb API URL (optional, defaults to https://app.mobb.ai)
127
+ - `MVS_AUTO_FIX`: Override auto-fix setting - set to `"true"` or `"false"` to force enable/disable automatic fix application regardless of user's database setting (optional)
128
+
129
+ #### Usage
130
+
131
+ Once configured, you can use the MCP server through your AI assistant:
132
+
133
+ 1. **Ask Claude to scan for vulnerabilities**:
134
+ ```
135
+ run a scan with mobb-mcp
136
+ ```
137
+ or
138
+ ```
139
+ run fix-vulnerabilities mcp tool
140
+ ```
141
+
142
+ 2. **The MCP server will**:
143
+ - Validate the repository path
144
+ - Check for git changes (modified, added, or staged files)
145
+ - Upload the changed files for analysis
146
+ - Generate automated fixes for detected vulnerabilities
147
+ - Return detailed fix recommendations
148
+
149
+ #### Available MCP Tools
150
+
151
+ - **`fix_vulnerabilities`**: Scans the current code changes and returns fixes for potential vulnerabilities
152
+ - **Parameter**: `path` (string) - The path to the local git repository
153
+ - **Returns**: Detailed vulnerability fixes with code patches and explanations
154
+
155
+ #### Example MCP Workflow
156
+
157
+ 1. Make changes to your code
158
+ 2. Stage or modify files in git
159
+ 3. Ask your AI assistant: "Can you check my code for security vulnerabilities?"
160
+ 4. The assistant will use the MCP server to analyze your changes
161
+ 5. Receive detailed fix recommendations with code patches
162
+
163
+ #### Troubleshooting
164
+
165
+ - **"API_KEY environment variable is not set"**: Make sure you've set your Mobb API key
166
+ - **"Path is not a valid git repository"**: Ensure you're pointing to a valid git repository
167
+ - **"No changed files found"**: Make sure you have modified, added, or staged files in your repository
168
+
169
+ ## Using Bugsy as part of a CI/CD pipeline
170
+
171
+ If you utilize SAST scans as part of the CI/CD pipeline, Bugsy can be easiy added and provide immediate fix for every issue detected.
172
+ Here is a simple example of a command line that will run Bugsy in your pipeline:
173
+
174
+ ```shell
175
+ npx mobbdev analyze --ci --scan-file $SAST_RESULTS_FILENAME --repo $CI_PROJECT_URL --ref $CI_COMMIT_REF_NAME --api-key $MOBB_API_KEY
176
+ ```
177
+
178
+ ### Polling Mode
179
+
180
+ By default, Bugsy uses WebSocket connections for real-time status updates during analysis. However, some proxy environments or firewalls may block WebSocket connections. In these cases, you can use the `--polling` flag to use HTTP polling instead:
181
+
182
+ ```shell
183
+ npx mobbdev analyze --scan-file report.json --repo https://github.com/org/repo --polling
184
+ ```
185
+
186
+ **When to use `--polling`:**
187
+ - Your network blocks WebSocket connections (ws:// or wss://)
188
+ - You're behind a corporate proxy that doesn't support WebSocket
189
+ - You experience connection timeouts with the default WebSocket mode
190
+
191
+ **Polling characteristics:**
192
+ - Polling interval: 5 seconds
193
+ - Timeout: 30 minutes
194
+ - Slightly higher latency compared to WebSocket mode, but works in restricted environments
195
+
196
+ ## Contribution
197
+
198
+ Install the dependencies and run the tests:
199
+
200
+ ```shell
201
+ pnpm install
202
+
203
+ # or use npm run build:dev to watch for changes
204
+ pnpm run build
205
+
206
+ # or use npm test:watch to watch for changes
207
+ pnpm run test
208
+ ```
209
+
210
+ ### Debugging
211
+
212
+ If you're using VSCode, you can use the `launch.json` file to debug the code. Run the `CLI tests` configuration to continuously run and debug the tests.
213
+
214
+ ## Getting support
215
+
216
+ If you need support using Bugsy or just want to share your thoughts and learn more, you are more than welcome to join our [discord server](https://bit.ly/Mobb-discord)
package/mobbdev CHANGED
Binary file
package/package.json CHANGED
@@ -1,12 +1,15 @@
1
1
  {
2
2
  "name": "@mobb.ai/cli-linux-x64",
3
- "version": "1.4.49",
4
- "description": "mobbdev (Bugsy CLI) standalone binary for linux-x64. Installed automatically by @mobb.ai/cli — do not install directly.",
3
+ "version": "1.4.51",
4
+ "description": "Automated secure code remediation tool standalone linux-x64 binary, no Node.js required.",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/mobb-dev/bugsy.git"
8
8
  },
9
9
  "license": "MIT",
10
+ "bin": {
11
+ "mobbdev": "mobbdev"
12
+ },
10
13
  "os": [
11
14
  "linux"
12
15
  ],