CAI in GitLab CI/CD CAI in GitLab CI/CD

Other case studies

The use case

Traditional Static Application Security Testing (SAST) tools rely on pattern matching and predefined rules, which limits their ability to detect complex, context-dependent vulnerabilities. Organizations integrating security into DevSecOps pipelines often struggle with high false-positive rates and miss sophisticated attack vectors that require semantic understanding of the code. Additionally, integrating security analysis into CI/CD workflows typically requires significant configuration and expertise.

This tool provides an AI-powered security analysis framework that integrates seamlessly into GitLab CI/CD pipelines. By leveraging CAI's bug_bounty_agent, the system performs intelligent, context-aware security analysis that goes beyond simple pattern matching. The agent understands code semantics, data flow, and potential attack chains, enabling it to identify vulnerabilities that traditional scanners would miss.

The architecture is designed to be target-agnostic - it can analyze any source code directory, configuration files, or network configurations by simply modifying the CI job parameters. The multi-agent approach allows for specialized analysis (source code analysis, config analysis, comprehensive analysis) that can be run in parallel or sequentially based on pipeline requirements.

Using CAI for source code, GitLab infrastructure and CI configuration

In this video, we can see how CAI analyzes the requested targets inside the GitLab CI, and its results in the created HTML file. The demonstration showcases the complete workflow from code commit to vulnerability reporting, highlighting the seamless integration of AI-powered security analysis into existing DevOps workflows.

Cybersecurity AI (CAI), the framework for AI Security

CAI is the leading open-source framework that democratizes advanced security testing through specialized AI agents. With EU backing, CAI is used by thousands of researchers and organizations worldwide. Unlike traditional SAST tools that rely on pattern matching, CAI's semantic understanding of code enables it to detect complex, context-dependent vulnerabilities that would remain hidden in conventional scans.

The tool generates GitLab-compatible security reports (version 14.0.0 format), HTML dashboards for human review, and JSON reports for programmatic processing. Each vulnerability includes line-level code references, risk descriptions, and specific remediation guidance, enabling development teams to quickly understand and fix security issues without requiring deep security expertise.

Get CAI Open source 🔓

About GitLab CI/CD

GitLab CI/CD is a continuous integration and deployment platform integrated into GitLab that automates the software development lifecycle. It enables teams to build, test, and deploy applications through automated pipelines defined in .gitlab-ci.yml files. Organizations use GitLab CI/CD to implement DevOps best practices, automate testing, and accelerate software delivery.

As organizations embrace DevSecOps, integrating security testing into CI/CD pipelines has become critical. Traditional security tools often require extensive configuration, generate high false-positive rates, and lack the semantic understanding needed to detect sophisticated vulnerabilities. This creates a gap between the speed of development and the depth of security analysis required to protect modern applications.

CAI addresses this challenge by providing AI-powered security analysis that integrates seamlessly into GitLab CI/CD workflows. The tool requires minimal configuration, understands code context and semantics, and generates actionable reports compatible with GitLab's native security dashboard. This enables organizations to maintain rapid development cycles while ensuring comprehensive security coverage.

Time for the exercise

minutes

~3-10 min

(Varies based on codebase size, analysis depth, and infrastructure)



🎯 THE CHALLENGE

Traditional SAST tools struggle with:

  • High false-positive rates requiring manual triage
  • Pattern-matching limitations that miss context-dependent vulnerabilities
  • Complex configuration and integration requirements
  • Inability to understand code semantics and data flow
  • Limited detection of sophisticated attack chains
  • Slow adaptation to new vulnerability patterns

Organizations need security analysis that integrates seamlessly into DevSecOps workflows without sacrificing detection quality or requiring security expertise from every developer.

🛡️ THE SOLUTION

CAI provides an AI-powered security analysis framework that integrates directly into GitLab CI/CD pipelines. Key capabilities include:

  • Semantic code understanding beyond pattern matching
  • Multi-agent architecture for specialized analysis types
  • Target-agnostic design (source code, configs, infrastructure)
  • GitLab-native security report integration
  • Minimal configuration with pipeline variables
  • Actionable remediation guidance with line-level references

The tool generates multi-format reports (GitLab JSON, HTML dashboards, detailed JSON) enabling both automated and human-driven security workflows.

🔬 KEY ARTIFACTS

  • GitLab Security Report (v14.0.0 format) for native dashboard integration
  • Interactive HTML vulnerability dashboards with filtering and sorting
  • Detailed JSON reports with full vulnerability metadata and evidence
  • Line-level code references for rapid remediation
  • Severity classifications (Critical, High, Medium, Low)
  • Vulnerability type categorization (SQL injection, XSS, SSRF, etc.)

✅ RESULTS ACHIEVED (Mock Project)

  • 28 vulnerabilities identified: 13 Critical, 9 High, 6 Medium severity
  • 19 distinct vulnerability types detected (SQL Injection, XSS, Command Injection, SSRF, SSTI, Path Traversal, etc.)
  • Zero-configuration portability across codebases and projects
  • Multi-format reporting for both automation and human review
  • Actionable remediation guidance with specific security recommendations
  • Seamless GitLab integration with native security dashboard support

KEY BENEFITS

🤖 AI-Powered Detection Beyond Pattern Matching
⚡ Seamless CI/CD Integration
🎯 Target-Agnostic Architecture

CAI Security Analysis Dashboard

The tool generates comprehensive HTML dashboards that provide both executive summaries and detailed vulnerability breakdowns. These dashboards enable security teams and developers to quickly understand the security posture of their applications.

CAI Security Analysis Dashboard

Source Code Vulnerability Analysis

The source code analysis module identifies vulnerabilities across multiple categories, providing detailed information about each issue type, affected files, and remediation recommendations. The analysis goes beyond simple pattern matching to understand code context and data flow.

Source Code Vulnerability Analysis