Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions sast-engine/cmd/ci.go
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,8 @@ func init() {
ciCmd.Flags().StringP("rules", "r", "", "Path to Python DSL rules file or directory (required)")
ciCmd.Flags().StringP("project", "p", "", "Path to project directory to scan (required)")
ciCmd.Flags().StringP("output", "o", "sarif", "Output format: sarif or json (default: sarif)")
ciCmd.Flags().BoolP("verbose", "v", false, "Show progress and statistics")
ciCmd.Flags().Bool("debug", false, "Show debug diagnostics with timestamps")
ciCmd.Flags().BoolP("verbose", "v", false, "Show statistics and timing information")
ciCmd.Flags().Bool("debug", false, "Show detailed debug diagnostics with file-level progress and timestamps")
ciCmd.Flags().String("fail-on", "", "Fail with exit code 1 if findings match severities (e.g., critical,high)")
ciCmd.Flags().Bool("skip-tests", true, "Skip test files (test_*.py, *_test.py, conftest.py, etc.)")
ciCmd.MarkFlagRequired("rules")
Expand Down
4 changes: 2 additions & 2 deletions sast-engine/cmd/scan.go
Original file line number Diff line number Diff line change
Expand Up @@ -848,8 +848,8 @@ func init() {
scanCmd.Flags().StringP("project", "p", "", "Path to project directory to scan (required)")
scanCmd.Flags().StringP("output", "o", "text", "Output format: text, json, sarif, or csv (default: text)")
scanCmd.Flags().StringP("output-file", "f", "", "Write output to file instead of stdout")
scanCmd.Flags().BoolP("verbose", "v", false, "Show progress and statistics")
scanCmd.Flags().Bool("debug", false, "Show debug diagnostics with timestamps")
scanCmd.Flags().BoolP("verbose", "v", false, "Show statistics and timing information")
scanCmd.Flags().Bool("debug", false, "Show detailed debug diagnostics with file-level progress and timestamps")
scanCmd.Flags().String("fail-on", "", "Fail with exit code 1 if findings match severities (e.g., critical,high)")
scanCmd.Flags().Bool("skip-tests", true, "Skip test files (test_*.py, *_test.py, conftest.py, etc.)")
scanCmd.MarkFlagRequired("project")
Expand Down
10 changes: 5 additions & 5 deletions sast-engine/graph/callgraph/builder/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ func BuildCallGraph(codeGraph *graph.CodeGraph, registry *core.ModuleRegistry, p
indexFunctions(codeGraph, callGraph, registry)

// Phase 2 Task 9: Extract return types from all functions (first pass - PARALLELIZED)
logger.Progress("Extracting return types from %d modules (parallel)...", len(registry.Modules))
logger.Debug("Extracting return types from %d modules (parallel)...", len(registry.Modules))

type returnJob struct {
modulePath string
Expand Down Expand Up @@ -207,7 +207,7 @@ func BuildCallGraph(codeGraph *graph.CodeGraph, registry *core.ModuleRegistry, p
typeEngine.AddReturnTypesToEngine(mergedReturns)

// Phase 2 Task 8: Extract ALL variable assignments BEFORE resolving calls (second pass - PARALLELIZED)
logger.Progress("Extracting variable assignments (parallel)...")
logger.Debug("Extracting variable assignments (parallel)...")

varJobs := make(chan string, 100)
var varProcessed atomic.Int64
Expand Down Expand Up @@ -253,7 +253,7 @@ func BuildCallGraph(codeGraph *graph.CodeGraph, registry *core.ModuleRegistry, p
typeEngine.UpdateVariableBindingsWithFunctionReturns()

// Phase 3 Task 12: Extract class attributes (third pass - PARALLELIZED)
logger.Progress("Extracting class attributes (parallel)...")
logger.Debug("Extracting class attributes (parallel)...")

attrJobs := make(chan returnJob, 100) // Reuse returnJob struct
var attrProcessed atomic.Int64
Expand Down Expand Up @@ -298,7 +298,7 @@ func BuildCallGraph(codeGraph *graph.CodeGraph, registry *core.ModuleRegistry, p
resolution.ResolveAttributePlaceholders(typeEngine.Attributes, typeEngine, registry, codeGraph)

// Process each Python file in the project (fourth pass for call site resolution - PARALLELIZED)
logger.Progress("Resolving call sites (parallel)...")
logger.Debug("Resolving call sites (parallel)...")

callSiteJobs := make(chan returnJob, 100)
var callGraphMutex sync.Mutex // Protect callGraph modifications
Expand Down Expand Up @@ -394,7 +394,7 @@ func BuildCallGraph(codeGraph *graph.CodeGraph, registry *core.ModuleRegistry, p
resolution.PrintAttributeFailureStats(logger)

// Pass 5: Generate taint summaries for all functions
logger.Progress("Generating taint summaries...")
logger.Debug("Generating taint summaries...")
GenerateTaintSummaries(callGraph, codeGraph, registry)
logger.Statistic("Generated taint summaries for %d functions", len(callGraph.Summaries))

Expand Down
Loading