Skip to main content
You can integrate Strix into GitLab CI/CD pipelines to automatically run security tests on merge requests, commits, or scheduled intervals. This provides continuous security testing within your GitLab workflow.

Quick Start Pipeline

Here’s a minimal .gitlab-ci.yml configuration that runs Strix on every merge request:
This pipeline uses Docker-in-Docker (dind) service to run the Strix sandbox container. Ensure Docker is enabled in your GitLab Runner configuration.

Prerequisites

1

Enable Docker support

Ensure your GitLab Runner has Docker-in-Docker (dind) or Docker socket access enabled.
2

Configure CI/CD variables

Add these variables in Settings → CI/CD → Variables:
  • STRIX_LLM - Your LLM provider and model (e.g., openai/gpt-5)
  • LLM_API_KEY - Your LLM API key (mark as masked)
Optionally add:
  • LLM_API_BASE - Custom API endpoint
  • PERPLEXITY_API_KEY - For enhanced search capabilities
3

Get API credentials

Obtain an API key from your chosen provider:

Complete Pipeline Examples

Merge Request Scanning

Scan code changes on every merge request with artifact storage:

Scheduled Comprehensive Scans

Run deeper security assessments on a schedule:

Multi-Stage Pipeline

Integrate Strix into a multi-stage deployment pipeline:

Multi-Target Testing

Test both source code and deployed staging environment:

Authenticated Testing

Perform grey-box testing with credentials:

Runner Configuration

Docker-in-Docker (dind)

The recommended approach uses Docker-in-Docker:

Docker Socket Binding

Alternatively, bind the Docker socket (requires privileged runner):
Binding the Docker socket requires a privileged runner and may have security implications. Use Docker-in-Docker when possible.

Pipeline Configuration Options

Timeout Settings

Set appropriate timeouts based on your scan depth:
  • Quick scans: 30 minutes
  • Standard scans: 1 hour
  • Comprehensive scans: 2 hours

Environment Variables

Handling Results

Artifacts Configuration

Save scan results as pipeline artifacts:

Conditional Failure

Control whether vulnerabilities block the pipeline:

Optimization Tips

1

Use quick scan mode for MRs

Enable --scan-mode quick for faster merge request feedback:
2

Adjust reasoning effort

Set STRIX_REASONING_EFFORT="medium" for faster CI/CD runs:
3

Cache Docker images

Enable Docker layer caching to speed up image pulls:
4

Separate quick and deep scans

Use quick scans for merge requests and scheduled jobs for comprehensive testing:

Troubleshooting

Docker Permission Issues

If you encounter Docker permission errors:

Runner Compatibility

Ensure your GitLab Runner supports Docker:

Memory Limits

For large scans, increase memory limits:

Installation Failures

If the installation script fails:

Security Best Practices

Always mark sensitive variables as “Masked” and “Protected” in GitLab CI/CD settings to prevent exposure in logs.
  • Protect variables - Mark API keys as masked and protected
  • Limit scope - Only scan authorized targets
  • Use protected branches - Run comprehensive scans only on protected branches
  • Review findings - Set up notifications for security findings
  • Rotate credentials - Regularly rotate API keys

Next Steps