Overview
In non-interactive mode, Strix returns different exit codes to indicate:- Success with no vulnerabilities found (0)
- Errors during execution (1)
- Success with vulnerabilities found (2)
Exit Code Reference
Exit Code 0: Success - No Vulnerabilities
- Scan completed without errors
- All agents finished their work
- No vulnerabilities were reported
- Target appears secure
Exit Code 1: Error During Execution
Unable to connect to the language model provider.Solutions:
- Verify
STRIX_LLMenvironment variable is set - Check
LLM_API_KEYis valid and not expired - Verify network connectivity to LLM provider
- Check API rate limits and quotas
- Review LLM provider service status
Docker daemon not running or Docker-related error.Solutions:
- Start Docker daemon:
sudo systemctl start docker - Verify Docker is installed:
docker --version - Check Docker permissions: add user to docker group
- Ensure Docker image can be pulled
- Check available disk space
Invalid configuration or missing required settings.Solutions:
- Verify all required environment variables are set
- Check custom config file syntax if using
--config - Ensure target is accessible and valid
- Review instruction file contents if using
--instruction-file
Unable to reach or access the target.Solutions:
- Verify target URL is correct and accessible
- Check network connectivity
- Verify authentication if required
- Ensure target is running if testing localhost
- Check firewall rules
Unexpected error during execution.Solutions:
- Review error output in stderr
- Check scan logs in output directory
- Report bug if error appears to be in Strix
- Try running in interactive mode for more details
Exit Code 2: Success - Vulnerabilities Found
- Scan completed without errors
- All agents finished their work
- At least one vulnerability was reported
- Vulnerability reports saved to output directory
CI/CD Integration Examples
Basic Build Gate
GitHub Actions
GitLab CI
Jenkins
CircleCI
Advanced Patterns
Warning Mode (Don’t Fail Build)
Allow vulnerabilities but warn:Severity-Based Gating
Fail only on high/critical vulnerabilities:Baseline Comparison
Fail only if new vulnerabilities are found:Conditional Scanning
Run different scans based on branch:Exit Code in Interactive Mode
In interactive mode (default), Strix does not use exit code 2 for vulnerabilities:- Interactive mode expects human supervision
- User manually quits when ready
- Vulnerabilities are shown in TUI during scan
- Exit code 2 is specifically for automation
Troubleshooting
Exit Code 1 Every Time
Problem: Scan always fails with exit code 1 Diagnosis:- Missing environment variables
- LLM API key invalid or expired
- Docker not running
- Target not accessible
- Network connectivity issues
Exit Code 0 When Vulnerabilities Expected
Problem: Scan returns 0 but you expect vulnerabilities Diagnosis:- Quick scan mode missed complex issues (try deep mode)
- Target has good security posture
- Scan needs more specific instructions
- Agent didn’t have enough time (check scan duration)
Can’t Capture Exit Code
Problem: Exit code always appears as 0 in shell script Solutions:Best Practices
Always Archive Results
Provide Clear Error Messages
Use Non-Zero Exit for Both Errors and Vulnerabilities
Set Timeouts
See Also
- Non-Interactive Mode - Automation guide
- Examples - CI/CD integration examples
- Reports - Output format reference