Skip to content

Commit c2de6ea

Browse files
authored
Merge pull request #10 from FuzzingLabs/refactor/remove-monitor-command
refactor: removed monitor command and --live parameter
2 parents 28b0712 + 60b6966 commit c2de6ea

File tree

6 files changed

+248
-690
lines changed

6 files changed

+248
-690
lines changed

β€Žcli/README.mdβ€Ž

Lines changed: 1 addition & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,6 @@ fuzzforge workflows info security_assessment
8080
# Submit a workflow for analysis
8181
fuzzforge workflow security_assessment /path/to/your/code
8282

83-
# Monitor progress in real-time
84-
fuzzforge monitor live <execution-id>
8583

8684
# View findings when complete
8785
fuzzforge finding <execution-id>
@@ -179,7 +177,6 @@ fuzzforge workflow security_assessment /path/to/code --wait
179177
- `--timeout, -t` - Execution timeout in seconds
180178
- `--interactive/--no-interactive, -i/-n` - Interactive parameter input
181179
- `--wait, -w` - Wait for execution to complete
182-
- `--live, -l` - Show live monitoring during execution
183180

184181
#### `fuzzforge workflow status [execution-id]`
185182
Check the status of a workflow execution.
@@ -261,39 +258,6 @@ fuzzforge finding export abc123def456 --format csv --output report.csv
261258
fuzzforge finding export --format html --output report.html
262259
```
263260

264-
### Real-time Monitoring
265-
266-
#### `fuzzforge monitor stats <execution-id>`
267-
Show current fuzzing statistics.
268-
269-
```bash
270-
# Show stats once
271-
fuzzforge monitor stats abc123def456 --once
272-
273-
# Live updating stats (default)
274-
fuzzforge monitor stats abc123def456 --refresh 5
275-
```
276-
277-
#### `fuzzforge monitor crashes <run-id>`
278-
Display crash reports for a fuzzing run.
279-
280-
```bash
281-
fuzzforge monitor crashes abc123def456 --limit 50
282-
```
283-
284-
#### `fuzzforge monitor live <run-id>`
285-
Real-time monitoring dashboard with live updates.
286-
287-
```bash
288-
fuzzforge monitor live abc123def456 --refresh 3
289-
```
290-
291-
Features:
292-
- Live updating statistics
293-
- Progress indicators and bars
294-
- Run status monitoring
295-
- Automatic completion detection
296-
297261
### Configuration Management
298262

299263
#### `fuzzforge config show`
@@ -495,7 +459,6 @@ cli/
495459
β”‚ β”œβ”€β”€ workflows.py # Workflow management
496460
β”‚ β”œβ”€β”€ runs.py # Run management
497461
β”‚ β”œβ”€β”€ findings.py # Findings management
498-
β”‚ β”œβ”€β”€ monitor.py # Real-time monitoring
499462
β”‚ β”œβ”€β”€ config.py # Configuration commands
500463
β”‚ └── status.py # Status information
501464
β”œβ”€β”€ pyproject.toml # Project configuration
@@ -576,7 +539,6 @@ fuzzforge --help
576539
# Command-specific help
577540
ff workflows --help
578541
ff workflow run --help
579-
ff monitor live --help
580542

581543
# Show version
582544
fuzzforge --version
@@ -618,4 +580,4 @@ Contributions are welcome! Please see the main FuzzForge repository for contribu
618580

619581
---
620582

621-
**FuzzForge CLI** - Making security testing workflows accessible and efficient from the command line.
583+
**FuzzForge CLI** - Making security testing workflows accessible and efficient from the command line.

β€Žcli/src/fuzzforge_cli/commands/init.pyβ€Ž

Lines changed: 21 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,10 @@
1010
#
1111
# Additional attribution and requirements are provided in the NOTICE file.
1212

13-
1413
from __future__ import annotations
1514

16-
from pathlib import Path
1715
import os
16+
from pathlib import Path
1817
from textwrap import dedent
1918
from typing import Optional
2019

@@ -32,17 +31,20 @@
3231
@app.command()
3332
def project(
3433
name: Optional[str] = typer.Option(
35-
None, "--name", "-n",
36-
help="Project name (defaults to current directory name)"
34+
None, "--name", "-n", help="Project name (defaults to current directory name)"
3735
),
3836
api_url: Optional[str] = typer.Option(
39-
None, "--api-url", "-u",
40-
help="FuzzForge API URL (defaults to http://localhost:8000)"
37+
None,
38+
"--api-url",
39+
"-u",
40+
help="FuzzForge API URL (defaults to http://localhost:8000)",
4141
),
4242
force: bool = typer.Option(
43-
False, "--force", "-f",
44-
help="Force initialization even if project already exists"
45-
)
43+
False,
44+
"--force",
45+
"-f",
46+
help="Force initialization even if project already exists",
47+
),
4648
):
4749
"""
4850
πŸ“ Initialize a new FuzzForge project in the current directory.
@@ -58,24 +60,20 @@ def project(
5860
# Check if project already exists
5961
if fuzzforge_dir.exists() and not force:
6062
if fuzzforge_dir.is_dir() and any(fuzzforge_dir.iterdir()):
61-
console.print("❌ FuzzForge project already exists in this directory", style="red")
63+
console.print(
64+
"❌ FuzzForge project already exists in this directory", style="red"
65+
)
6266
console.print("Use --force to reinitialize", style="dim")
6367
raise typer.Exit(1)
6468

6569
# Get project name
6670
if not name:
67-
name = Prompt.ask(
68-
"Project name",
69-
default=current_dir.name,
70-
console=console
71-
)
71+
name = Prompt.ask("Project name", default=current_dir.name, console=console)
7272

7373
# Get API URL
7474
if not api_url:
7575
api_url = Prompt.ask(
76-
"FuzzForge API URL",
77-
default="http://localhost:8000",
78-
console=console
76+
"FuzzForge API URL", default="http://localhost:8000", console=console
7977
)
8078

8179
# Confirm initialization
@@ -117,15 +115,15 @@ def project(
117115
]
118116

119117
if gitignore_path.exists():
120-
with open(gitignore_path, 'r') as f:
118+
with open(gitignore_path, "r") as f:
121119
existing_content = f.read()
122120

123121
if "# FuzzForge CLI" not in existing_content:
124-
with open(gitignore_path, 'a') as f:
122+
with open(gitignore_path, "a") as f:
125123
f.write(f"\n{chr(10).join(gitignore_entries)}\n")
126124
console.print("πŸ“ Updated .gitignore with FuzzForge entries")
127125
else:
128-
with open(gitignore_path, 'w') as f:
126+
with open(gitignore_path, "w") as f:
129127
f.write(f"{chr(10).join(gitignore_entries)}\n")
130128
console.print("πŸ“ Created .gitignore")
131129

@@ -145,9 +143,6 @@ def project(
145143
# Submit a workflow for analysis
146144
fuzzforge workflow <workflow-name> /path/to/target
147145
148-
# Monitor run progress
149-
fuzzforge monitor live <run-id>
150-
151146
# View findings
152147
fuzzforge finding <run-id>
153148
```
@@ -159,12 +154,12 @@ def project(
159154
- `.fuzzforge/findings.db` - Local database for runs and findings
160155
"""
161156

162-
with open(readme_path, 'w') as f:
157+
with open(readme_path, "w") as f:
163158
f.write(readme_content)
164159
console.print("πŸ“š Created README.md")
165160

166161
console.print("\nβœ… FuzzForge project initialized successfully!", style="green")
167-
console.print(f"\n🎯 Next steps:")
162+
console.print("\n🎯 Next steps:")
168163
console.print(" β€’ ff workflows - See available workflows")
169164
console.print(" β€’ ff status - Check API connectivity")
170165
console.print(" β€’ ff workflow <workflow> <path> - Start your first analysis")

0 commit comments

Comments
Β (0)