gitlab-duo-mcp-devsecops-agent
Autonomous DevSecOps & Security Gate Agent with Model Context Protocol (MCP) for GitLab Duo (,000 Hackathon)
Code generation by modern LLMs is largely solved. The critical bottleneck in modern software delivery is "Life After Code" β managing the complex, error-prone DevSecOps lifecycle between commit and production deployment: - Manual code reviews miss subtle plaintext credential leaks and dynamic SQL injection patterns. - Pinned dependency CVEs slip into production builds when SBOM analysis is decoupled from the pull request evaluation gate. - Engineering teams need autonomous agents that enforce deterministic security gates and synthesize pull request remediation patches automatically.
Summary extracted from the README.
GitLab Duo MCP DevSecOps Agent π¦π‘οΈ
Submitted to Life After Code: The GitLab Transcend Hackathon ($45,000 Cash Prize Pool)
Hosted on: Devpost by GitLab (with judges from GitLab, Google, Anthropic)
Tracks: Autonomous DevSecOps, Continuous Security Scanning, Compliance Gates, MCP Integration
Supported Protocols & Platforms: Model Context Protocol (MCP Spec 2025-11-25), GitLab Duo Agent Platform, TypeScript ESM
Live Interactive Studio: https://liutingqiu.github.io/gitlab-duo-mcp-devsecops-agent/
GitHub Repository: https://github.com/liutingqiu/gitlab-duo-mcp-devsecops-agent
Author & Lead Engineer: Tingqiu Liu (@liutingqiu,tianqi689@gmail.com)
π Executive Summary & Problem Statement
Code generation by modern LLMs is largely solved. The critical bottleneck in modern software delivery is "Life After Code" β managing the complex, error-prone DevSecOps lifecycle between commit and production deployment:
- Manual code reviews miss subtle plaintext credential leaks and dynamic SQL injection patterns.
- Pinned dependency CVEs slip into production builds when SBOM analysis is decoupled from the pull request evaluation gate.
- Engineering teams need autonomous agents that enforce deterministic security gates and synthesize pull request remediation patches automatically.
GitLab Duo MCP DevSecOps Agent solves this by implementing an autonomous security gate agent using the open Model Context Protocol (MCP Spec 2025-11-25) directly compatible with the GitLab Duo Agent Platform:
- Model Context Protocol (MCP) Integration: Exposes three standardized MCP tools:
gitlab_sast_deep_scan: AST-level static analysis for secret leaks, injection flaws, and unsafe deserialization.gitlab_dependency_license_audit: Continuous SBOM dependency audit against vulnerability databases.gitlab_compliance_gate_enforcer: Cryptographically attests pipeline commits and halts deployment if findings breach thresholds.
- Automated Remediating Pull Requests: Synthesizes actionable patch diffs and targeted remediation branches for detected vulnerabilities.
- Zero-Friction Live Web Terminal: Deployed to GitHub Pages with interactive staged changes simulation and real-time gate evaluation.
ποΈ Technical Architecture
[Developer Commit / Merge Request]
β
βΌ
[GitLab Duo MCP Agent Controller]
β β β
βΌ βΌ βΌ
gitlab_sast_deep_scan gitlab_dependency_audit gitlab_compliance_gate
β β β
ββββββββββββββββΌβββββββββββββββ
βΌ
[Pass Gate?] βββΆ NO βββΆ Generate Remediation Branch & Patch Diff
β
YES
βΌ
[Deploy to Production Pipeline] + Cryptographic Attestation
π§ͺ Automated Test Verification
node --test tests/devsecops.test.js
β 1. GITLAB_DUO_MCP_TOOLS advertises 3 compliant MCP tools (0.5ms)
β 2. analyzeStagedChanges detects hardcoded secrets and SQL injection patterns (0.2ms)
β 3. evaluateSecurityGate blocks pipeline when critical vulnerabilities exceed threshold (0.2ms)
β 4. Clean files pass security gate seamlessly (0.1ms)
β 5. analyzeStagedChanges throws on empty commitSha or empty files (0.4ms)
βΉ pass 5
βΉ fail 0
π Live Interactive Links
- Interactive Studio: https://liutingqiu.github.io/gitlab-duo-mcp-devsecops-agent/
- GitHub Repository: https://github.com/liutingqiu/gitlab-duo-mcp-devsecops-agent
- Official Devpost Challenge: Life After Code: The GitLab Transcend Hackathon ($45,000 Cash)