mirror of
https://github.com/FuzzingLabs/fuzzforge_ai.git
synced 2026-02-12 22:32:45 +00:00
fix: resolve critical CLI command issues
- Fix OptionInfo bug causing 'ff finding <run_id>' to crash - Add explicit limit=None, offset=0 parameters in main.py calls - Prevents OptionInfo objects from being used in arithmetic operations - Fix command suggestions after workflow completion - Change 'fuzzforge findings' to 'ff finding' (correct syntax) - Add missing 'View findings' suggestion after submission - Fix --fail-on help text - Change from 'severity' to 'SARIF level' (error,warning,note,info) - Matches actual implementation - Update CLI documentation - Fix 'ff finding show' parameter from --rule to --id - Mark unimplemented AI commands as 'Coming Soon' - Correct 'ff ingest' documentation to match actual implementation - Remove fake subcommands, document actual options
This commit is contained in:
@@ -301,7 +301,7 @@ def execute_workflow(
|
||||
),
|
||||
fail_on: Optional[str] = typer.Option(
|
||||
None, "--fail-on",
|
||||
help="Fail build if findings match severity (critical,high,medium,low,all,none). Use with --wait"
|
||||
help="Fail build if findings match SARIF level (error,warning,note,info,all,none). Use with --wait"
|
||||
),
|
||||
export_sarif: Optional[str] = typer.Option(
|
||||
None, "--export-sarif",
|
||||
@@ -423,8 +423,9 @@ def execute_workflow(
|
||||
# Don't fail the whole operation if database save fails
|
||||
console.print(f"⚠️ Failed to save execution to database: {e}", style="yellow")
|
||||
|
||||
console.print(f"\n💡 Monitor progress: [bold cyan]fuzzforge monitor live {response.run_id}[/bold cyan]")
|
||||
console.print(f"💡 Check status: [bold cyan]fuzzforge workflow status {response.run_id}[/bold cyan]")
|
||||
console.print(f"\n💡 Monitor progress: [bold cyan]ff monitor live {response.run_id}[/bold cyan]")
|
||||
console.print(f"💡 Check status: [bold cyan]ff workflow status {response.run_id}[/bold cyan]")
|
||||
console.print(f"💡 View findings: [bold cyan]ff finding {response.run_id}[/bold cyan]")
|
||||
|
||||
# Suggest --live for fuzzing workflows
|
||||
if not live and not wait and "fuzzing" in workflow.lower():
|
||||
@@ -501,7 +502,7 @@ def execute_workflow(
|
||||
console.print(f"⚠️ Failed to check findings: {e}", style="yellow")
|
||||
|
||||
if not fail_on and not export_sarif:
|
||||
console.print(f"💡 View findings: [bold cyan]fuzzforge findings {response.run_id}[/bold cyan]")
|
||||
console.print(f"💡 View findings: [bold cyan]ff finding {response.run_id}[/bold cyan]")
|
||||
|
||||
except KeyboardInterrupt:
|
||||
console.print("\n⏹️ Monitoring cancelled (execution continues in background)", style="yellow")
|
||||
|
||||
@@ -316,7 +316,7 @@ def finding_main(
|
||||
console.print("❌ No project database found", style="red")
|
||||
return
|
||||
|
||||
get_findings(run_id=finding_id, save=True, format="table")
|
||||
get_findings(run_id=finding_id, save=True, format="table", limit=None, offset=0)
|
||||
except Exception as e:
|
||||
console.print(f"❌ Failed to get findings: {e}", style="red")
|
||||
|
||||
@@ -390,7 +390,7 @@ def main():
|
||||
console.print(f"🔍 Displaying finding: {finding_id}")
|
||||
|
||||
try:
|
||||
get_findings(run_id=finding_id, save=True, format="table")
|
||||
get_findings(run_id=finding_id, save=True, format="table", limit=None, offset=0)
|
||||
return
|
||||
except Exception as e:
|
||||
console.print(f"❌ Failed to get finding: {e}", style="red")
|
||||
|
||||
@@ -304,15 +304,15 @@ View and analyze individual findings.
|
||||
|
||||
**Usage:**
|
||||
```bash
|
||||
ff finding [id] # Show latest or specific finding
|
||||
ff finding show <run_id> --rule <rule> # Show specific finding detail
|
||||
ff finding [id] # Show latest or specific finding
|
||||
ff finding show <run_id> --id <id> # Show specific finding detail
|
||||
```
|
||||
|
||||
**Examples:**
|
||||
```bash
|
||||
ff finding # Show latest finding
|
||||
ff finding python_sast-abc123 # Show specific run findings
|
||||
ff finding show python_sast-abc123 --rule f2cf5e3e # Show specific finding
|
||||
ff finding # Show latest finding
|
||||
ff finding python_sast-abc123 # Show specific run findings
|
||||
ff finding show python_sast-abc123 --id f2cf5e3e # Show specific finding
|
||||
```
|
||||
|
||||
---
|
||||
@@ -445,15 +445,20 @@ ff ai [COMMAND]
|
||||
```
|
||||
|
||||
**Subcommands:**
|
||||
- `agent` — Start interactive AI agent
|
||||
- `status` — Check AI agent status
|
||||
- `server [--port]` — Start AI agent server
|
||||
|
||||
**Planned Features (Coming Soon):**
|
||||
- `analyze <run_id>` — Analyze findings with AI
|
||||
- `explain <finding_id>` — Get AI explanation of a finding
|
||||
- `remediate <finding_id>` — Get remediation suggestions
|
||||
|
||||
**Examples:**
|
||||
```bash
|
||||
ff ai analyze python_sast-abc123 # Analyze all findings
|
||||
ff ai explain python_sast-abc123:finding1 # Explain specific finding
|
||||
ff ai remediate python_sast-abc123:finding1 # Get fix suggestions
|
||||
ff ai agent # Start interactive AI agent
|
||||
ff ai status # Check agent status
|
||||
ff ai server --port 8080 # Start server on custom port
|
||||
```
|
||||
|
||||
---
|
||||
@@ -466,19 +471,22 @@ Ingest knowledge into the AI knowledge base.
|
||||
|
||||
**Usage:**
|
||||
```bash
|
||||
ff ingest [COMMAND]
|
||||
ff ingest [path] [OPTIONS]
|
||||
```
|
||||
|
||||
**Subcommands:**
|
||||
- `file <path>` — Ingest a file
|
||||
- `directory <path>` — Ingest directory contents
|
||||
- `workflow <workflow_name>` — Ingest workflow documentation
|
||||
**Options:**
|
||||
- `--recursive, -r` — Recursively ingest directory contents
|
||||
- `--file-types, -t` — Comma-separated file types to ingest (e.g., "md,txt,py")
|
||||
- `--exclude, -e` — Patterns to exclude
|
||||
- `--dataset, -d` — Target dataset name
|
||||
- `--force, -f` — Force reingest even if already processed
|
||||
|
||||
**Examples:**
|
||||
```bash
|
||||
ff ingest file ./docs/security.md # Ingest single file
|
||||
ff ingest directory ./docs # Ingest directory
|
||||
ff ingest workflow python_sast # Ingest workflow docs
|
||||
ff ingest ./docs/security.md # Ingest single file
|
||||
ff ingest ./docs --recursive # Ingest directory recursively
|
||||
ff ingest ./src -t "py,js" --exclude "test_*" # Ingest with filters
|
||||
ff ingest ./docs -d security_docs # Ingest to specific dataset
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
Reference in New Issue
Block a user