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:
tduhamel42
2025-11-12 13:34:42 +01:00
parent f771c7731b
commit b2a720b2e6
3 changed files with 31 additions and 22 deletions
@@ -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")
+2 -2
View File
@@ -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")