mirror of
https://github.com/FuzzingLabs/fuzzforge_ai.git
synced 2026-10-11 07:08:42 +02: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:
1 parent
f771c7731b
commit
b2a720b2e6
3 files changed
+31
-22
No files matched your search
@@ -301,7 +301,7 @@ def execute_workflow(
|
|||||||
),
|
),
|
||||||
fail_on: Optional[str] = typer.Option(
|
fail_on: Optional[str] = typer.Option(
|
||||||
None, "--fail-on",
|
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(
|
export_sarif: Optional[str] = typer.Option(
|
||||||
None, "--export-sarif",
|
None, "--export-sarif",
|
||||||
@@ -423,8 +423,9 @@ def execute_workflow(
|
|||||||
# Don't fail the whole operation if database save fails
|
# 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"⚠️ 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"\n💡 Monitor progress: [bold cyan]ff 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"💡 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
|
# Suggest --live for fuzzing workflows
|
||||||
if not live and not wait and "fuzzing" in workflow.lower():
|
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")
|
console.print(f"⚠️ Failed to check findings: {e}", style="yellow")
|
||||||
|
|
||||||
if not fail_on and not export_sarif:
|
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:
|
except KeyboardInterrupt:
|
||||||
console.print("\n⏹️ Monitoring cancelled (execution continues in background)", style="yellow")
|
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")
|
console.print("❌ No project database found", style="red")
|
||||||
return
|
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:
|
except Exception as e:
|
||||||
console.print(f"❌ Failed to get findings: {e}", style="red")
|
console.print(f"❌ Failed to get findings: {e}", style="red")
|
||||||
|
|
||||||
@@ -390,7 +390,7 @@ def main():
|
|||||||
console.print(f"🔍 Displaying finding: {finding_id}")
|
console.print(f"🔍 Displaying finding: {finding_id}")
|
||||||
|
|
||||||
try:
|
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
|
return
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
console.print(f"❌ Failed to get finding: {e}", style="red")
|
console.print(f"❌ Failed to get finding: {e}", style="red")
|
||||||
|
|||||||
@@ -304,15 +304,15 @@ View and analyze individual findings.
|
|||||||
|
|
||||||
**Usage:**
|
**Usage:**
|
||||||
```bash
|
```bash
|
||||||
ff finding [id] # Show latest or specific finding
|
ff finding [id] # Show latest or specific finding
|
||||||
ff finding show <run_id> --rule <rule> # Show specific finding detail
|
ff finding show <run_id> --id <id> # Show specific finding detail
|
||||||
```
|
```
|
||||||
|
|
||||||
**Examples:**
|
**Examples:**
|
||||||
```bash
|
```bash
|
||||||
ff finding # Show latest finding
|
ff finding # Show latest finding
|
||||||
ff finding python_sast-abc123 # Show specific run findings
|
ff finding python_sast-abc123 # Show specific run findings
|
||||||
ff finding show python_sast-abc123 --rule f2cf5e3e # Show specific finding
|
ff finding show python_sast-abc123 --id f2cf5e3e # Show specific finding
|
||||||
```
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
@@ -445,15 +445,20 @@ ff ai [COMMAND]
|
|||||||
```
|
```
|
||||||
|
|
||||||
**Subcommands:**
|
**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
|
- `analyze <run_id>` — Analyze findings with AI
|
||||||
- `explain <finding_id>` — Get AI explanation of a finding
|
- `explain <finding_id>` — Get AI explanation of a finding
|
||||||
- `remediate <finding_id>` — Get remediation suggestions
|
- `remediate <finding_id>` — Get remediation suggestions
|
||||||
|
|
||||||
**Examples:**
|
**Examples:**
|
||||||
```bash
|
```bash
|
||||||
ff ai analyze python_sast-abc123 # Analyze all findings
|
ff ai agent # Start interactive AI agent
|
||||||
ff ai explain python_sast-abc123:finding1 # Explain specific finding
|
ff ai status # Check agent status
|
||||||
ff ai remediate python_sast-abc123:finding1 # Get fix suggestions
|
ff ai server --port 8080 # Start server on custom port
|
||||||
```
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
@@ -466,19 +471,22 @@ Ingest knowledge into the AI knowledge base.
|
|||||||
|
|
||||||
**Usage:**
|
**Usage:**
|
||||||
```bash
|
```bash
|
||||||
ff ingest [COMMAND]
|
ff ingest [path] [OPTIONS]
|
||||||
```
|
```
|
||||||
|
|
||||||
**Subcommands:**
|
**Options:**
|
||||||
- `file <path>` — Ingest a file
|
- `--recursive, -r` — Recursively ingest directory contents
|
||||||
- `directory <path>` — Ingest directory contents
|
- `--file-types, -t` — Comma-separated file types to ingest (e.g., "md,txt,py")
|
||||||
- `workflow <workflow_name>` — Ingest workflow documentation
|
- `--exclude, -e` — Patterns to exclude
|
||||||
|
- `--dataset, -d` — Target dataset name
|
||||||
|
- `--force, -f` — Force reingest even if already processed
|
||||||
|
|
||||||
**Examples:**
|
**Examples:**
|
||||||
```bash
|
```bash
|
||||||
ff ingest file ./docs/security.md # Ingest single file
|
ff ingest ./docs/security.md # Ingest single file
|
||||||
ff ingest directory ./docs # Ingest directory
|
ff ingest ./docs --recursive # Ingest directory recursively
|
||||||
ff ingest workflow python_sast # Ingest workflow docs
|
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