[{"data":1,"prerenderedAt":808},["ShallowReactive",2],{"/en-us/blog/developing-gitlab-duo-blending-ai-and-root-cause-analysis-to-fix-ci-cd":3,"navigation-en-us":45,"banner-en-us":445,"footer-en-us":455,"blog-post-authors-en-us-Rutvik Shah|Michael Friedrich":694,"blog-related-posts-en-us-developing-gitlab-duo-blending-ai-and-root-cause-analysis-to-fix-ci-cd":720,"assessment-promotions-en-us":760,"next-steps-en-us":798},{"id":4,"title":5,"authorSlugs":6,"body":9,"categorySlug":10,"config":11,"content":15,"description":9,"extension":30,"isFeatured":13,"meta":31,"navigation":13,"path":32,"publishedDate":22,"seo":33,"stem":39,"tagSlugs":40,"__hash__":44},"blogPosts/en-us/blog/developing-gitlab-duo-blending-ai-and-root-cause-analysis-to-fix-ci-cd.yml","Developing Gitlab Duo Blending Ai And Root Cause Analysis To Fix Ci Cd",[7,8],"rutvik-shah","michael-friedrich",null,"ai-ml",{"slug":12,"featured":13,"template":14},"developing-gitlab-duo-blending-ai-and-root-cause-analysis-to-fix-ci-cd",true,"BlogPost",{"title":16,"description":17,"authors":18,"heroImage":21,"date":22,"body":23,"category":10,"tags":24},"Developing GitLab Duo: Blending AI and Root Cause Analysis to fix CI/CD pipelines","Discover how we've infused Root Cause Analysis with AI to help remedy broken CI/CD pipelines, including example scenarios and take-away exercises.",[19,20],"Rutvik Shah","Michael Friedrich","https://res.cloudinary.com/about-gitlab-com/image/upload/v1750097321/Blog/Hero%20Images/Blog/Hero%20Images/blog-hero-banner-1-0178-820x470-fy25_7JlF3WlEkswGQbcTe8DOTB_1750097321081.png","2024-06-06","___Generative AI marks a monumental shift in the software development industry, making it easier to develop, secure, and operate software. Our new blog series, written by our product and engineering teams, gives you an inside look at how we create, test, and deploy the AI features you need integrated throughout the enterprise. Get to know new capabilities within GitLab Duo and how they will help DevSecOps teams deliver better results for customers.___\n\nHave you ever encountered a broken [CI/CD](https://about.gitlab.com/topics/ci-cd/benefits-continuous-integration/) pipeline and had to halt your DevSecOps workflow, or even delay software deployment, as you try to figure out the root cause? Traditionally, when something goes wrong in the process of creating software, developers have to troubleshoot, dig through log files, and often do a lot of trial and error development. [GitLab Duo Root Cause Analysis](https://about.gitlab.com/gitlab-duo/), part of our suite of AI-powered features, removes the guesswork by determining the root cause for a failed CI/CD pipeline. In this article, you'll learn what Root Cause Analysis is and how to apply the AI-powered GitLab Duo feature to your DevSecOps workflow.\n\n> Discover the future of AI-driven software development with our GitLab 17 virtual launch event. [Watch today!](https://about.gitlab.com/eighteen/)\n\n### What is Root Cause Analysis?\n\nGitLab Duo Root Cause Analysis is an AI-powered feature that assists you in determining a root cause and suggesting a fix for a CI/CD job log failure by analyzing the logs.\n\nWhile Root Cause Analysis is often seen in product incident management, its workflows and debugging practices can be found in any DevSecOps workflow. Ops teams, administrators, and platform engineers are challenged by infrastructure-as-code (IaC) deployment errors, Kubernetes and GitOps problems, and long stack traces while investigating pipeline failures.\n\nGitLab Duo Root Cause Analysis keeps everyone in the same interface and uses AI-powered help to summarize, analyze, and propose fixes so that organizations can release secure software faster.\n\nA pipeline can encounter failures for a variety of reasons, including syntax errors in the code, missing dependencies that the pipeline relies on, test failures during the build process, Kubernetes and IaC deployment timeouts, and numerous other potential issues. When such failures occur, it becomes the responsibility of everyone to meticulously review the logs generated by the pipeline. This job log review process involves scrutinizing the detailed output to identify the specific errors and pinpoint the root cause of the pipeline failure. For example, the following pipeline has multiple job failures that need to be investigated and fixed.\n\n![Image depicting multiple job failures](https://res.cloudinary.com/about-gitlab-com/image/upload/v1750097332/Blog/Content%20Images/Blog/Content%20Images/image3_aHR0cHM6_1750097332601.png)\n\nThe duration required to fix these failures can vary significantly and is largely influenced by several factors such as:\n- the developer's familiarity with the project\n- their level of experience in dealing with similar issues\n- their overall skill level in troubleshooting and problem-solving within the context of the pipeline.\n\nManual analysis can be exceedingly challenging and time-consuming, given that log data consists of application logs and system messages with a wide variety of potential sources of failures. A typical pipeline fix can consist of several iterations and context switching. The complexity and the unstructured nature of the logs is a perfect fit for speeding up the task using generative AI.  Using AI can reduce the time to identify and fix a pipeline error significantly and also lower the barrier of expertise that would be needed to fix a pipeline such as the above.\n\nWatch GitLab Duo Root Cause Analysis in action:\n\n\u003C!-- blank line -->\n\n\u003Cfigure class=\"video_container\">\n\n \u003Ciframe src=\"https://www.youtube.com/embed/sTpSLwX5DIs?si=J6-0Bf6PtYjrHX1K\" frameborder=\"0\" allowfullscreen=\"true\"> \u003C/iframe>\n\n\u003C/figure>\n\n\u003C!-- blank line -->\n\n### How does Root Cause Analysis work?\n\n[Root Cause Analysis](https://docs.gitlab.com/ee/user/ai_experiments.html#root-cause-analysis) works by forwarding a portion of the CI/CD job log to the [GitLab AI Gateway](https://docs.gitlab.com/ee/architecture/blueprints/ai_gateway/). GitLab ensures that the portion sent will fit inside the large language model (LLM) token limits alongside a prompt that has been pre-crafted to provide insights into why the job might have failed. The prompt also instructs the LLM to provide an example of how a user might fix a broken job.\n\nHere are two example scenarios where Root Cause Analysis can provide assistance.\n\n#### 1. Analyze a Python dependency error\n\nA Python application can import package modules with functionality that is not provided in the standard library. The project [Challenge - Root Cause Analysis - Python Config](https://gitlab.com/gitlab-da/use-cases/ai/ai-workflows/gitlab-duo-challenges/root-cause-analysis/challenge-root-cause-analysis-python-config) implements an application that parses configuration and initializes an SQLite database, which both work well without any dependencies. It uses best practices in CI/CD with a Python environment and caching. The latest feature implementation adds a Redis caching client, and now the CI/CD build is failing for some reason.\nBy using Root Cause Analysis, you can immediately learn that the `ModuleNotFoundError` text means that the module is actually not installed in the Python environment. GitLab Duo also suggests an example fix: Installing the Redis module through the PIP package manager.\n![Image depicting 'modulenotfounderror' and GL Duo suggested resolution](https://res.cloudinary.com/about-gitlab-com/image/upload/v1750097332/Blog/Content%20Images/Blog/Content%20Images/image2_aHR0cHM6_1750097332602.png)\n\nThe failing pipeline can be viewed [here](https://gitlab.com/gitlab-da/use-cases/ai/ai-workflows/gitlab-duo-challenges/root-cause-analysis/challenge-root-cause-analysis-python-config/-/jobs/6992716398).\nThe Root Cause Analysis prompt provides a summary of the problem, which seems to be a problem with a missing `redis` module. Let's try to fix the problem by installing the `redis` module. You can either call `pip install redis` in the CI/CD job `script` section, or use a more sophisticated approach with the `requirements.txt` file. The latter is useful for a single source of truth for dependencies installed in the development environment and CI/CD pipelines.\n\n```yaml\ntest:\n  extends: [.python-req]\n  stage: test   before_script:\n    # [🦊] hint: Root cause analysis.\n    # Solution 1: Install redis using pip\n    - pip install redis\n    # Solution 2: Add redis to requirements.txt, use pip\n    - pip install -r requirements.txt\n  script:\n    - python src/main.py\n```\n\nAfter fixing the missing Python dependency, the CI/CD job fails again. Use Root Cause Analysis again to learn that no Redis service is running in the job. Switch to using GitLab Duo Chat and use the prompt `How to start a Redis service in CI/CD` to learn how to configure the `services` attribute in the CI/CD job.\n\n![Depicts the prompt for how to start a Redis service](https://res.cloudinary.com/about-gitlab-com/image/upload/v1750097333/Blog/Content%20Images/Blog/Content%20Images/image6_aHR0cHM6_1750097332602.png)\n\nModify the `.gitlab-ci.yml` with the `test` job, and specify the `redis` service.\n\n```yaml\ntest:\n  extends: [.python-req]\n  stage: test   before_script:\n    # [🦊] hint: Root cause analysis.\n    # Solution 1: Install redis using pip\n    - pip install redis\n    # Solution 2: Add redis to requirements.txt, use pip\n    - pip install -r requirements.txt\n  script:\n    - python src/main.py\n\n  # Solution 3 - Running Redis\n  services:\n    - redis\n```\n\nRunning the Redis server allows you to successfully execute the Python application, and print its output into the CI/CD job log.\n\n![output of Python application](https://res.cloudinary.com/about-gitlab-com/image/upload/v1750097332/Blog/Content%20Images/Blog/Content%20Images/image4_aHR0cHM6_1750097332603.png)\n\nThe solution is provided in the [solution/ directory](https://gitlab.com/gitlab-da/use-cases/ai/ai-workflows/gitlab-duo-challenges/root-cause-analysis/challenge-root-cause-analysis-python-config/-/tree/main/solution?ref_type=heads).\n\n**Tip:** You can also ask [GitLab Duo Chat](https://docs.gitlab.com/ee/user/gitlab_duo_chat.html) to follow up on potential future problems:\n\n```markdown\nHow to lint Python code? Which tools are recommended for CI/CD.\nHow to pin a package version in Python requirements file?\t\nWhat are possible ways that this exception stacktrace is triggered in the future?\nAre there ways to prevent the application from failing?\n```\nThe next example is more advanced and includes multiple failures.\n#### 2. Analyze missing Go runtime\n\nCI/CD jobs can be executed in containers, spawned from the contributed `image` attribute. If the container does not provide a programming language runtime, the executed `script` sections referencing the `go` binary fail. For example, the error message `/bin/sh: eval: line 149: go: not found` needs to be understood and fixed.\nIf the `go` command is not found in the container's runtime context, this can have multiple reasons:\n\n1. The job uses a minimal container image, for example `alpine`, and the Go language runtime was not installed.\n1. The job uses the wrong default container image, for example, specified on top of the CI/CD configuration, or using the `default` keyword.\n1. The job does not use a container image but the shell executor. The host operating system does not have the Go language runtime installed, or it is otherwise broken/not configured.\n\nThe project [Challenge - Root Cause Analysis - Go GitLab Release Fetcher](https://gitlab.com/gitlab-da/use-cases/ai/ai-workflows/gitlab-duo-challenges/root-cause-analysis/challenge-root-cause-analysis-go-gitlab-release-fetcher) provides an exercise challenge to analyze and fix CI/CD problems with a GitLab release fetcher application, written in Go. The `build` and `docker-build` CI/CD jobs are failing. Fixing the problem requires different scopes: Understanding why the Go runtime is not installed, and learning about the `Dockerfile` syntax.\n![Screenshot showing Change Docker Label job failed](https://res.cloudinary.com/about-gitlab-com/image/upload/v1750097332/Blog/Content%20Images/Blog/Content%20Images/image5_aHR0cHM6_1750097332603.png)\n\nThe [`solution/` directory](https://gitlab.com/gitlab-da/use-cases/ai/ai-workflows/gitlab-duo-challenges/root-cause-analysis/challenge-root-cause-analysis-go-gitlab-release-fetcher) provides two possible solutions after Root Cause Analysis.\n## Practice using Root Cause Analysis\n\nHere are some scenarios to use to practice using Root Cause Analysis.\n\n- When you are running into Kubernetes deployment errors or timeouts.\n- With OpenTofu or Terraform IaC pipelines failing to provision your cloud resources.\n\n- When the Ansible playbook fails with a cryptic permission error in CI/CD.\n\n- When the Java stack trace is 10 pages long.\n\n- With a shell script highlighting an execution error.\n\n- When a Perl script fails in a single line, which is the only line in the script.\n\n- When the CI/CD job times out and it is unclear which section would cause this.\n\n- When a network connection timeout is reached, and you think it cannot be DNS.\n\n### What is next for GitLab Duo Root Cause Analysis?\n\nWe want to help our users to get their pipelines back to passing in fewer iterations. The Root Cause Analysis will open and show the response in GitLab Duo Chat, our AI assistant. Users can build on the recommendation to generate a more precise fix by asking specific questions (e.g., programming language-specific fixes) or asking for alternative fixes based on the root cause.\n\nFor example, here is the Root Cause Analysis for a failing job:\n\n![Root Cause Analysis response](https://res.cloudinary.com/about-gitlab-com/image/upload/v1750097332/Blog/Content%20Images/Blog/Content%20Images/image1_aHR0cHM6_1750097332603.png)\n\nUsers can ask follow-up questions that build upon the AI-generated response.\n\n- I do not want to create my own Docker image. Please explain different ways to fix the problem.\n\n- I don't have access to the Docker image creation. It seems that the Go binary is missing. Are there alternative images you can suggest?\n\nGitLab also will be running quality benchmarks for the generated responses and shipping usability improvements.\n\nPlease see our [Root Cause Analysis GA epic](https://gitlab.com/groups/gitlab-org/-/epics/13080) for more details. We would also love your feedback on the feature. Please leave a comment on our [Root Cause Analysis feedback issue](https://gitlab.com/groups/gitlab-org/-/epics/13872).\n\n## Get started with Root Cause Analysis\n\nPlease see our [documentation](https://docs.gitlab.com/ee/user/ai_experiments.html#root-cause-analysis) on how to enable the feature available to our GitLab Ultimate customers. Also, GitLab Duo Root Cause Analysis will soon be coming to GitLab self-managed and GitLab Dedicated.\n\nNot a GitLab Ultimate customer? Start [a free trial](https://gitlab.com/-/trial_registrations/new?glm_source=about.gitlab.com/blog&glm_content=default-saas-trial) today.\n## Read more of our \"Developing GitLab Duo\" series\n\n- [Developing GitLab Duo: How we validate and test AI models at scale](https://about.gitlab.com/blog/developing-gitlab-duo-ai-impact-analytics-dashboard-measures-the-roi-of-ai/)\n\n- [Developing GitLab Duo: AI Impact analytics dashboard measures the ROI of AI](https://about.gitlab.com/blog/developing-gitlab-duo-ai-impact-analytics-dashboard-measures-the-roi-of-ai/)\n\n- [Developing GitLab Duo: How we are dogfooding our AI features](https://about.gitlab.com/blog/developing-gitlab-duo-ai-impact-analytics-dashboard-measures-the-roi-of-ai/)\n\n- [Developing GitLab Duo: Secure and thoroughly test AI-generated code](https://about.gitlab.com/blog/how-gitlab-duo-helps-secure-and-thoroughly-test-ai-generated-code/)",[25,26,27,28,29],"AI/ML","tutorial","DevSecOps","DevSecOps platform","features","yml",{},"/en-us/blog/developing-gitlab-duo-blending-ai-and-root-cause-analysis-to-fix-ci-cd",{"title":34,"description":17,"ogTitle":34,"ogDescription":17,"noIndex":35,"ogImage":21,"ogUrl":36,"ogSiteName":37,"ogType":38,"canonicalUrls":36},"GitLab Duo: AI-powered CI/CD pipeline root cause analysis",false,"https://about.gitlab.com/blog/developing-gitlab-duo-blending-ai-and-root-cause-analysis-to-fix-ci-cd","https://about.gitlab.com","article","en-us/blog/developing-gitlab-duo-blending-ai-and-root-cause-analysis-to-fix-ci-cd",[41,26,42,43,29],"aiml","devsecops","devsecops-platform","DIhRwfEQ8LDL2v2g3Pbe9lL0WPw0QndcDglJ3lNGYnM",{"data":46},{"logo":47,"freeTrial":52,"sales":57,"login":62,"items":67,"search":375,"minimal":406,"duo":425,"pricingDeployment":435},{"config":48},{"href":49,"dataGaName":50,"dataGaLocation":51},"/","gitlab logo","header",{"text":53,"config":54},"Get free trial",{"href":55,"dataGaName":56,"dataGaLocation":51},"https://gitlab.com/-/trial_registrations/new?glm_source=about.gitlab.com&glm_content=default-saas-trial/","free trial",{"text":58,"config":59},"Talk to sales",{"href":60,"dataGaName":61,"dataGaLocation":51},"/sales/","sales",{"text":63,"config":64},"Sign in",{"href":65,"dataGaName":66,"dataGaLocation":51},"https://gitlab.com/users/sign_in/","sign in",[68,95,190,195,296,356],{"text":69,"config":70,"cards":72},"Platform",{"dataNavLevelOne":71},"platform",[73,79,87],{"title":69,"description":74,"link":75},"The intelligent orchestration platform for DevSecOps",{"text":76,"config":77},"Explore our Platform",{"href":78,"dataGaName":71,"dataGaLocation":51},"/platform/",{"title":80,"description":81,"link":82},"GitLab Duo Agent Platform","Agentic AI for the entire software lifecycle",{"text":83,"config":84},"Meet GitLab Duo",{"href":85,"dataGaName":86,"dataGaLocation":51},"/gitlab-duo-agent-platform/","gitlab duo agent platform",{"title":88,"description":89,"link":90},"Why GitLab","See the top reasons enterprises choose GitLab",{"text":91,"config":92},"Learn more",{"href":93,"dataGaName":94,"dataGaLocation":51},"/why-gitlab/","why gitlab",{"text":96,"left":13,"config":97,"link":99,"lists":103,"footer":172},"Product",{"dataNavLevelOne":98},"solutions",{"text":100,"config":101},"View all Solutions",{"href":102,"dataGaName":98,"dataGaLocation":51},"/solutions/",[104,128,151],{"title":105,"description":106,"link":107,"items":112},"Automation","CI/CD and automation to accelerate deployment",{"config":108},{"icon":109,"href":110,"dataGaName":111,"dataGaLocation":51},"AutomatedCodeAlt","/solutions/delivery-automation/","automated software delivery",[113,117,120,124],{"text":114,"config":115},"CI/CD",{"href":116,"dataGaLocation":51,"dataGaName":114},"/solutions/continuous-integration/",{"text":80,"config":118},{"href":85,"dataGaLocation":51,"dataGaName":119},"gitlab duo agent platform - product menu",{"text":121,"config":122},"Source Code Management",{"href":123,"dataGaLocation":51,"dataGaName":121},"/solutions/source-code-management/",{"text":125,"config":126},"Automated Software Delivery",{"href":110,"dataGaLocation":51,"dataGaName":127},"Automated software delivery",{"title":129,"description":130,"link":131,"items":136},"Security","Deliver code faster without compromising security",{"config":132},{"href":133,"dataGaName":134,"dataGaLocation":51,"icon":135},"/solutions/application-security-testing/","security and compliance","ShieldCheckLight",[137,141,146],{"text":138,"config":139},"Application Security Testing",{"href":133,"dataGaName":140,"dataGaLocation":51},"Application security testing",{"text":142,"config":143},"Software Supply Chain Security",{"href":144,"dataGaLocation":51,"dataGaName":145},"/solutions/supply-chain/","Software supply chain security",{"text":147,"config":148},"Software Compliance",{"href":149,"dataGaName":150,"dataGaLocation":51},"/solutions/software-compliance/","software compliance",{"title":152,"link":153,"items":158},"Measurement",{"config":154},{"icon":155,"href":156,"dataGaName":157,"dataGaLocation":51},"DigitalTransformation","/solutions/visibility-measurement/","visibility and measurement",[159,163,167],{"text":160,"config":161},"Visibility & Measurement",{"href":156,"dataGaLocation":51,"dataGaName":162},"Visibility and Measurement",{"text":164,"config":165},"Value Stream Management",{"href":166,"dataGaLocation":51,"dataGaName":164},"/solutions/value-stream-management/",{"text":168,"config":169},"Analytics & Insights",{"href":170,"dataGaLocation":51,"dataGaName":171},"/solutions/analytics-and-insights/","Analytics and insights",{"title":173,"items":174},"GitLab for",[175,180,185],{"text":176,"config":177},"Enterprise",{"href":178,"dataGaLocation":51,"dataGaName":179},"/enterprise/","enterprise",{"text":181,"config":182},"Small Business",{"href":183,"dataGaLocation":51,"dataGaName":184},"/small-business/","small business",{"text":186,"config":187},"Public Sector",{"href":188,"dataGaLocation":51,"dataGaName":189},"/solutions/public-sector/","public sector",{"text":191,"config":192},"Pricing",{"href":193,"dataGaName":194,"dataGaLocation":51,"dataNavLevelOne":194},"/pricing/","pricing",{"text":196,"config":197,"link":199,"lists":203,"feature":283},"Resources",{"dataNavLevelOne":198},"resources",{"text":200,"config":201},"View all resources",{"href":202,"dataGaName":198,"dataGaLocation":51},"/resources/",[204,237,255],{"title":205,"items":206},"Getting started",[207,212,217,222,227,232],{"text":208,"config":209},"Install",{"href":210,"dataGaName":211,"dataGaLocation":51},"/install/","install",{"text":213,"config":214},"Quick start guides",{"href":215,"dataGaName":216,"dataGaLocation":51},"/get-started/","quick setup checklists",{"text":218,"config":219},"Learn",{"href":220,"dataGaLocation":51,"dataGaName":221},"https://university.gitlab.com/","learn",{"text":223,"config":224},"Product documentation",{"href":225,"dataGaName":226,"dataGaLocation":51},"https://docs.gitlab.com/","product documentation",{"text":228,"config":229},"Best practice videos",{"href":230,"dataGaName":231,"dataGaLocation":51},"/getting-started-videos/","best practice videos",{"text":233,"config":234},"Integrations",{"href":235,"dataGaName":236,"dataGaLocation":51},"/integrations/","integrations",{"title":238,"items":239},"Discover",[240,245,250],{"text":241,"config":242},"Customer success stories",{"href":243,"dataGaName":244,"dataGaLocation":51},"/customers/","customer success stories",{"text":246,"config":247},"Blog",{"href":248,"dataGaName":249,"dataGaLocation":51},"/blog/","blog",{"text":251,"config":252},"Remote",{"href":253,"dataGaName":254,"dataGaLocation":51},"https://handbook.gitlab.com/handbook/company/culture/all-remote/","remote",{"title":256,"items":257},"Connect",[258,263,268,273,278],{"text":259,"config":260},"GitLab Services",{"href":261,"dataGaName":262,"dataGaLocation":51},"/services/","services",{"text":264,"config":265},"Community",{"href":266,"dataGaName":267,"dataGaLocation":51},"/community/","community",{"text":269,"config":270},"Forum",{"href":271,"dataGaName":272,"dataGaLocation":51},"https://forum.gitlab.com/","forum",{"text":274,"config":275},"Events",{"href":276,"dataGaName":277,"dataGaLocation":51},"/events/","events",{"text":279,"config":280},"Partners",{"href":281,"dataGaName":282,"dataGaLocation":51},"/partners/","partners",{"backgroundColor":284,"textColor":285,"text":286,"image":287,"link":291},"#2f2a6b","#fff","Insights for the future of software development",{"altText":288,"config":289},"the source promo card",{"src":290},"https://res.cloudinary.com/about-gitlab-com/image/upload/v1758208064/dzl0dbift9xdizyelkk4.svg",{"text":292,"config":293},"Read the latest",{"href":294,"dataGaName":295,"dataGaLocation":51},"/the-source/","the source",{"text":297,"config":298,"lists":300},"Company",{"dataNavLevelOne":299},"company",[301],{"items":302},[303,308,314,316,321,326,331,336,341,346,351],{"text":304,"config":305},"About",{"href":306,"dataGaName":307,"dataGaLocation":51},"/company/","about",{"text":309,"config":310,"footerGa":313},"Jobs",{"href":311,"dataGaName":312,"dataGaLocation":51},"/jobs/","jobs",{"dataGaName":312},{"text":274,"config":315},{"href":276,"dataGaName":277,"dataGaLocation":51},{"text":317,"config":318},"Leadership",{"href":319,"dataGaName":320,"dataGaLocation":51},"/company/team/e-group/","leadership",{"text":322,"config":323},"Team",{"href":324,"dataGaName":325,"dataGaLocation":51},"/company/team/","team",{"text":327,"config":328},"Handbook",{"href":329,"dataGaName":330,"dataGaLocation":51},"https://handbook.gitlab.com/","handbook",{"text":332,"config":333},"Investor relations",{"href":334,"dataGaName":335,"dataGaLocation":51},"https://ir.gitlab.com/","investor relations",{"text":337,"config":338},"Trust Center",{"href":339,"dataGaName":340,"dataGaLocation":51},"/security/","trust center",{"text":342,"config":343},"AI Transparency Center",{"href":344,"dataGaName":345,"dataGaLocation":51},"/ai-transparency-center/","ai transparency center",{"text":347,"config":348},"Newsletter",{"href":349,"dataGaName":350,"dataGaLocation":51},"/company/contact/#contact-forms","newsletter",{"text":352,"config":353},"Press",{"href":354,"dataGaName":355,"dataGaLocation":51},"/press/","press",{"text":357,"config":358,"lists":359},"Contact us",{"dataNavLevelOne":299},[360],{"items":361},[362,365,370],{"text":58,"config":363},{"href":60,"dataGaName":364,"dataGaLocation":51},"talk to sales",{"text":366,"config":367},"Support portal",{"href":368,"dataGaName":369,"dataGaLocation":51},"https://support.gitlab.com","support portal",{"text":371,"config":372},"Customer portal",{"href":373,"dataGaName":374,"dataGaLocation":51},"https://customers.gitlab.com/customers/sign_in/","customer portal",{"close":376,"login":377,"suggestions":384},"Close",{"text":378,"link":379},"To search repositories and projects, login to",{"text":380,"config":381},"gitlab.com",{"href":65,"dataGaName":382,"dataGaLocation":383},"search login","search",{"text":385,"default":386},"Suggestions",[387,389,393,395,399,403],{"text":80,"config":388},{"href":85,"dataGaName":80,"dataGaLocation":383},{"text":390,"config":391},"Code Suggestions (AI)",{"href":392,"dataGaName":390,"dataGaLocation":383},"/solutions/code-suggestions/",{"text":114,"config":394},{"href":116,"dataGaName":114,"dataGaLocation":383},{"text":396,"config":397},"GitLab on AWS",{"href":398,"dataGaName":396,"dataGaLocation":383},"/partners/technology-partners/aws/",{"text":400,"config":401},"GitLab on Google Cloud",{"href":402,"dataGaName":400,"dataGaLocation":383},"/partners/technology-partners/google-cloud-platform/",{"text":404,"config":405},"Why GitLab?",{"href":93,"dataGaName":404,"dataGaLocation":383},{"freeTrial":407,"mobileIcon":412,"desktopIcon":417,"secondaryButton":420},{"text":408,"config":409},"Start free trial",{"href":410,"dataGaName":56,"dataGaLocation":411},"https://gitlab.com/-/trials/new/","nav",{"altText":413,"config":414},"Gitlab Icon",{"src":415,"dataGaName":416,"dataGaLocation":411},"https://res.cloudinary.com/about-gitlab-com/image/upload/v1758203874/jypbw1jx72aexsoohd7x.svg","gitlab icon",{"altText":413,"config":418},{"src":419,"dataGaName":416,"dataGaLocation":411},"https://res.cloudinary.com/about-gitlab-com/image/upload/v1758203875/gs4c8p8opsgvflgkswz9.svg",{"text":421,"config":422},"Get Started",{"href":423,"dataGaName":424,"dataGaLocation":411},"https://gitlab.com/-/trial_registrations/new?glm_source=about.gitlab.com/compare/gitlab-vs-github/","get started",{"freeTrial":426,"mobileIcon":431,"desktopIcon":433},{"text":427,"config":428},"Learn more about GitLab Duo",{"href":429,"dataGaName":430,"dataGaLocation":411},"/gitlab-duo/","gitlab duo",{"altText":413,"config":432},{"src":415,"dataGaName":416,"dataGaLocation":411},{"altText":413,"config":434},{"src":419,"dataGaName":416,"dataGaLocation":411},{"freeTrial":436,"mobileIcon":441,"desktopIcon":443},{"text":437,"config":438},"Back to pricing",{"href":193,"dataGaName":439,"dataGaLocation":411,"icon":440},"back to pricing","GoBack",{"altText":413,"config":442},{"src":415,"dataGaName":416,"dataGaLocation":411},{"altText":413,"config":444},{"src":419,"dataGaName":416,"dataGaLocation":411},{"title":446,"button":447,"config":452},"See how agentic AI transforms software delivery",{"text":448,"config":449},"Watch GitLab Transcend now",{"href":450,"dataGaName":451,"dataGaLocation":51},"/events/transcend/virtual/","transcend event",{"layout":453,"icon":454},"release","AiStar",{"data":456},{"text":457,"source":458,"edit":464,"contribute":469,"config":474,"items":479,"minimal":683},"Git is a trademark of Software Freedom Conservancy and our use of 'GitLab' is under license",{"text":459,"config":460},"View page source",{"href":461,"dataGaName":462,"dataGaLocation":463},"https://gitlab.com/gitlab-com/marketing/digital-experience/about-gitlab-com/","page source","footer",{"text":465,"config":466},"Edit this page",{"href":467,"dataGaName":468,"dataGaLocation":463},"https://gitlab.com/gitlab-com/marketing/digital-experience/about-gitlab-com/-/blob/main/content/","web ide",{"text":470,"config":471},"Please contribute",{"href":472,"dataGaName":473,"dataGaLocation":463},"https://gitlab.com/gitlab-com/marketing/digital-experience/about-gitlab-com/-/blob/main/CONTRIBUTING.md/","please contribute",{"twitter":475,"facebook":476,"youtube":477,"linkedin":478},"https://twitter.com/gitlab","https://www.facebook.com/gitlab","https://www.youtube.com/channel/UCnMGQ8QHMAnVIsI3xJrihhg","https://www.linkedin.com/company/gitlab-com",[480,527,578,622,649],{"title":191,"links":481,"subMenu":496},[482,486,491],{"text":483,"config":484},"View plans",{"href":193,"dataGaName":485,"dataGaLocation":463},"view plans",{"text":487,"config":488},"Why Premium?",{"href":489,"dataGaName":490,"dataGaLocation":463},"/pricing/premium/","why premium",{"text":492,"config":493},"Why Ultimate?",{"href":494,"dataGaName":495,"dataGaLocation":463},"/pricing/ultimate/","why ultimate",[497],{"title":498,"links":499},"Contact Us",[500,503,505,507,512,517,522],{"text":501,"config":502},"Contact sales",{"href":60,"dataGaName":61,"dataGaLocation":463},{"text":366,"config":504},{"href":368,"dataGaName":369,"dataGaLocation":463},{"text":371,"config":506},{"href":373,"dataGaName":374,"dataGaLocation":463},{"text":508,"config":509},"Status",{"href":510,"dataGaName":511,"dataGaLocation":463},"https://status.gitlab.com/","status",{"text":513,"config":514},"Terms of use",{"href":515,"dataGaName":516,"dataGaLocation":463},"/terms/","terms of use",{"text":518,"config":519},"Privacy statement",{"href":520,"dataGaName":521,"dataGaLocation":463},"/privacy/","privacy statement",{"text":523,"config":524},"Cookie preferences",{"dataGaName":525,"dataGaLocation":463,"id":526,"isOneTrustButton":13},"cookie preferences","ot-sdk-btn",{"title":96,"links":528,"subMenu":536},[529,532],{"text":28,"config":530},{"href":78,"dataGaName":531,"dataGaLocation":463},"devsecops platform",{"text":533,"config":534},"AI-Assisted Development",{"href":429,"dataGaName":535,"dataGaLocation":463},"ai-assisted development",[537],{"title":538,"links":539},"Topics",[540,545,550,555,560,563,568,573],{"text":541,"config":542},"CICD",{"href":543,"dataGaName":544,"dataGaLocation":463},"/topics/ci-cd/","cicd",{"text":546,"config":547},"GitOps",{"href":548,"dataGaName":549,"dataGaLocation":463},"/topics/gitops/","gitops",{"text":551,"config":552},"DevOps",{"href":553,"dataGaName":554,"dataGaLocation":463},"/topics/devops/","devops",{"text":556,"config":557},"Version Control",{"href":558,"dataGaName":559,"dataGaLocation":463},"/topics/version-control/","version control",{"text":27,"config":561},{"href":562,"dataGaName":42,"dataGaLocation":463},"/topics/devsecops/",{"text":564,"config":565},"Cloud Native",{"href":566,"dataGaName":567,"dataGaLocation":463},"/topics/cloud-native/","cloud native",{"text":569,"config":570},"AI for Coding",{"href":571,"dataGaName":572,"dataGaLocation":463},"/topics/devops/ai-for-coding/","ai for coding",{"text":574,"config":575},"Agentic AI",{"href":576,"dataGaName":577,"dataGaLocation":463},"/topics/agentic-ai/","agentic ai",{"title":579,"links":580},"Solutions",[581,583,585,590,594,597,601,604,606,609,612,617],{"text":138,"config":582},{"href":133,"dataGaName":138,"dataGaLocation":463},{"text":127,"config":584},{"href":110,"dataGaName":111,"dataGaLocation":463},{"text":586,"config":587},"Agile development",{"href":588,"dataGaName":589,"dataGaLocation":463},"/solutions/agile-delivery/","agile delivery",{"text":591,"config":592},"SCM",{"href":123,"dataGaName":593,"dataGaLocation":463},"source code management",{"text":541,"config":595},{"href":116,"dataGaName":596,"dataGaLocation":463},"continuous integration & delivery",{"text":598,"config":599},"Value stream management",{"href":166,"dataGaName":600,"dataGaLocation":463},"value stream management",{"text":546,"config":602},{"href":603,"dataGaName":549,"dataGaLocation":463},"/solutions/gitops/",{"text":176,"config":605},{"href":178,"dataGaName":179,"dataGaLocation":463},{"text":607,"config":608},"Small business",{"href":183,"dataGaName":184,"dataGaLocation":463},{"text":610,"config":611},"Public sector",{"href":188,"dataGaName":189,"dataGaLocation":463},{"text":613,"config":614},"Education",{"href":615,"dataGaName":616,"dataGaLocation":463},"/solutions/education/","education",{"text":618,"config":619},"Financial services",{"href":620,"dataGaName":621,"dataGaLocation":463},"/solutions/finance/","financial services",{"title":196,"links":623},[624,626,628,630,633,635,637,639,641,643,645,647],{"text":208,"config":625},{"href":210,"dataGaName":211,"dataGaLocation":463},{"text":213,"config":627},{"href":215,"dataGaName":216,"dataGaLocation":463},{"text":218,"config":629},{"href":220,"dataGaName":221,"dataGaLocation":463},{"text":223,"config":631},{"href":225,"dataGaName":632,"dataGaLocation":463},"docs",{"text":246,"config":634},{"href":248,"dataGaName":249,"dataGaLocation":463},{"text":241,"config":636},{"href":243,"dataGaName":244,"dataGaLocation":463},{"text":251,"config":638},{"href":253,"dataGaName":254,"dataGaLocation":463},{"text":259,"config":640},{"href":261,"dataGaName":262,"dataGaLocation":463},{"text":264,"config":642},{"href":266,"dataGaName":267,"dataGaLocation":463},{"text":269,"config":644},{"href":271,"dataGaName":272,"dataGaLocation":463},{"text":274,"config":646},{"href":276,"dataGaName":277,"dataGaLocation":463},{"text":279,"config":648},{"href":281,"dataGaName":282,"dataGaLocation":463},{"title":297,"links":650},[651,653,655,657,659,661,663,667,672,674,676,678],{"text":304,"config":652},{"href":306,"dataGaName":299,"dataGaLocation":463},{"text":309,"config":654},{"href":311,"dataGaName":312,"dataGaLocation":463},{"text":317,"config":656},{"href":319,"dataGaName":320,"dataGaLocation":463},{"text":322,"config":658},{"href":324,"dataGaName":325,"dataGaLocation":463},{"text":327,"config":660},{"href":329,"dataGaName":330,"dataGaLocation":463},{"text":332,"config":662},{"href":334,"dataGaName":335,"dataGaLocation":463},{"text":664,"config":665},"Sustainability",{"href":666,"dataGaName":664,"dataGaLocation":463},"/sustainability/",{"text":668,"config":669},"Diversity, inclusion and belonging (DIB)",{"href":670,"dataGaName":671,"dataGaLocation":463},"/diversity-inclusion-belonging/","Diversity, inclusion and belonging",{"text":337,"config":673},{"href":339,"dataGaName":340,"dataGaLocation":463},{"text":347,"config":675},{"href":349,"dataGaName":350,"dataGaLocation":463},{"text":352,"config":677},{"href":354,"dataGaName":355,"dataGaLocation":463},{"text":679,"config":680},"Modern Slavery Transparency Statement",{"href":681,"dataGaName":682,"dataGaLocation":463},"https://handbook.gitlab.com/handbook/legal/modern-slavery-act-transparency-statement/","modern slavery transparency statement",{"items":684},[685,688,691],{"text":686,"config":687},"Terms",{"href":515,"dataGaName":516,"dataGaLocation":463},{"text":689,"config":690},"Cookies",{"dataGaName":525,"dataGaLocation":463,"id":526,"isOneTrustButton":13},{"text":692,"config":693},"Privacy",{"href":520,"dataGaName":521,"dataGaLocation":463},[695,708],{"id":696,"title":19,"body":9,"config":697,"content":699,"description":9,"extension":30,"meta":703,"navigation":13,"path":704,"seo":705,"stem":706,"__hash__":707},"blogAuthors/en-us/blog/authors/rutvik-shah.yml",{"template":698},"BlogAuthor",{"name":19,"config":700},{"headshot":701,"ctfId":702},"https://res.cloudinary.com/about-gitlab-com/image/upload/v1749661843/Blog/Author%20Headshots/rutvik_shah_headshot.png","6co92rUBTbWcyV3EW23iEx",{},"/en-us/blog/authors/rutvik-shah",{},"en-us/blog/authors/rutvik-shah","JRArwqK-9V0Orki_E-QqmcQG2AsaZP6XGqa-9ZB6GR8",{"id":709,"title":20,"body":9,"config":710,"content":711,"description":9,"extension":30,"meta":715,"navigation":13,"path":716,"seo":717,"stem":718,"__hash__":719},"blogAuthors/en-us/blog/authors/michael-friedrich.yml",{"template":698},{"name":20,"config":712},{"headshot":713,"ctfId":714},"https://res.cloudinary.com/about-gitlab-com/image/upload/v1749659879/Blog/Author%20Headshots/dnsmichi-headshot.jpg","dnsmichi",{},"/en-us/blog/authors/michael-friedrich",{},"en-us/blog/authors/michael-friedrich","lJ-nfRIhdG49Arfrxdn1Vv4UppwD51BB13S3HwIswt4",[721,734,747],{"content":722,"config":732},{"title":723,"description":724,"authors":725,"heroImage":727,"date":728,"body":729,"category":10,"tags":730},"10 AI prompts to speed your team’s software delivery","Eliminate review backlogs, security delays, and coordination overhead with ready-to-use AI prompts covering every stage of the software lifecycle.",[726],"Chandler Gibbons","https://res.cloudinary.com/about-gitlab-com/image/upload/v1772632341/duj8vaznbhtyxxhodb17.png","2026-03-04","AI-assisted coding tools are helping developers generate code faster than ever. So why aren’t teams _shipping_ faster?\n\nBecause coding is only 20% of the software delivery lifecycle, the remaining 80% becomes the bottleneck: code review backlogs grow, security scanning can’t keep pace, documentation falls behind, and manual coordination overhead increases.\n\nThe good news is that the same AI capabilities that accelerate individual coding can eliminate these team-level delays. You just need to apply AI across your entire software lifecycle, not only during the coding phase.\n\nBelow are 10 ready-to-use prompts from the [GitLab Duo Agent Platform Prompt Library](https://about.gitlab.com/gitlab-duo/prompt-library/) that help teams overcome common obstacles to faster software delivery. Each prompt addresses a specific slowdown that emerges when individual productivity increases without corresponding improvements in team processes.\n\n## How do you move code review from bottleneck to accelerator?\nDevelopers generate merge requests faster with AI assistance, but human reviewers can quickly become overwhelmed as code review cycles stretch from hours to days. AI can handle routine review tasks, freeing reviewers to focus on architecture and business logic instead of catching basic logical errors and API contract violations.\n\n### Review MR for logical errors\n**Complexity**: Beginner\n\n**Category**: Code Review\n\n**Prompt from library**:\n\n\n```text\nReview this MR for logical errors, edge cases, and potential bugs: [MR URL or paste code]\n```\n\n**Why it helps**: Automated linters catch syntax issues, but logical errors require understanding intent. This prompt catches bugs before human reviewers even look at the code, reducing review cycles from multiple rounds to often just one approval.\n\n### Identify breaking changes in MR\n**Complexity**: Beginner\n\n**Category**: Code Review\n\n**Prompt from library**:\n\n\n```text\nDoes this MR introduce any breaking changes?\n\nChanges:\n[PASTE CODE DIFF]\n\nCheck for:\n1. API signature changes\n2. Removed or renamed public methods\n3. Changed return types\n4. Modified database schemas\n5. Breaking configuration changes\n```\n\n**Why it helps**: Breaking changes discovered during deployment can cause rollbacks and incidents. This prompt shifts that discovery left to the MR stage, when fixes are faster and less expensive.\n\n## How can you shift security left without slowing down?\nSecurity scans generate hundreds of findings. Security teams manually triage each one while developers wait for approval to deploy. Most findings are false positives or low-risk issues, but identifying the real threats requires expertise and time. AI can prioritize findings by actual exploitability and auto-remediate common vulnerabilities, allowing security teams to focus on the threats that matter.\n\n### Analyze security scan results\n**Complexity**: Intermediate\n\n**Category**: Security\n\n**Agent**: Duo Security Analyst\n\n**Prompt from library**:\n\n\n```text\n@security_analyst Analyze these security scan results:\n\n[PASTE SCAN OUTPUT]\n\nFor each finding:\n1. Assess real risk vs false positive\n2. Explain the vulnerability\n3. Suggest remediation\n4. Prioritize by severity\n```\n\n**Why it helps**: Most security scan findings are false positives or low-risk issues. This prompt helps security teams focus on the findings that actually matter, reducing remediation time from weeks to days.\n\n### Review code for security issues\n**Complexity**: Intermediate\n\n**Category**: Security\n\n**Agent**: Duo Security Analyst\n\n**Prompt from library**:\n\n```text\n@security_analyst Review this code for security issues:\n\n[PASTE CODE]\n\nCheck for:\n1. Injection vulnerabilities\n2. Authentication/authorization flaws\n3. Data exposure risks\n4. Insecure dependencies\n5. Cryptographic issues\n```\n\n**Why it helps**: Traditional security reviews happen after code is written. This prompt enables developers to find and fix security issues before creating an MR, eliminating the back and forth that delays deployments.\n\n## How do you keep documentation current as code changes?\nCode changes faster than documentation. Onboarding new developers takes weeks because docs are outdated or missing. Teams know documentation is important, but it always gets deferred when deadlines approach. Automating documentation generation and updates as part of your standard workflow ensures docs stay current without adding manual work.\n\n### Generate release notes from MRs\n**Complexity**: Beginner\n\n**Category**: Documentation\n\n**Prompt from library**:\n\n```text\nGenerate release notes for these merged MRs:\n[LIST MR URLs or paste titles]\n\nGroup by:\n1. New features\n2. Bug fixes\n3. Performance improvements\n4. Breaking changes\n5. Deprecations\n```\n\n**Why it helps**: Manual release note compilation takes hours and often includes errors or omissions. Automated generation ensures every release has comprehensive notes without adding work to your release process.\n\n### Update documentation after code changes\n**Complexity**: Beginner\n\n**Category**: Documentation\n\n**Prompt from library**:\n\n```text\nI changed this code:\n\n[PASTE CODE CHANGES]\n\nWhat documentation needs updating? Check:\n1. README files\n2. API documentation\n3. Architecture diagrams\n4. Onboarding guides\n```\n\n**Why it helps**: Documentation drift happens because teams forget which docs need updates after code changes. This prompt makes documentation maintenance part of your development workflow, not a separate task that gets deferred.\n\n## How do you break down planning complexity?\nLarge features get stuck in planning. Teams spend weeks in meetings trying to scope work and identify dependencies. The complexity feels overwhelming, and it's hard to know where to start. AI can systematically decompose complex work into concrete, implementable tasks with clear dependencies and acceptance criteria, transforming weeks of planning into focused implementation.\n\n### Break down epic into issues\n**Complexity**: Intermediate\n\n**Category**: Documentation\n\n**Agent**: Duo Planner\n\n**Prompt from library**:\n\n```text\nBreak down this epic into implementable issues:\n\n[EPIC DESCRIPTION]\n\nConsider:\n1. Technical dependencies\n2. Reasonable issue sizes\n3. Clear acceptance criteria\n4. Logical implementation order\n```\n\n**Why it helps**: This prompt transforms a week of planning meetings into 30 minutes of AI-assisted decomposition followed by team review. Teams start implementation sooner with clearer direction.\n\n## How can you expand test coverage without expanding effort?\nDevelopers are writing code faster, but if testing doesn't keep pace, test coverage decreases and bugs slip through. Writing comprehensive tests manually is time-consuming, and developers often miss edge cases under deadline pressure. Generating tests automatically means developers can review and refine rather than write from scratch, maintaining quality without sacrificing velocity.\n\n### Generate unit tests\n**Complexity**: Beginner\n\n**Category**: Testing\n\n**Prompt from library**:\n\n```text\nGenerate unit tests for this function:\n\n[PASTE FUNCTION]\n\nInclude tests for:\n1. Happy path\n2. Edge cases\n3. Error conditions\n4. Boundary values\n5. Invalid inputs\n```\n\n**Why it helps**: Writing tests manually is time consuming, and developers often miss edge cases. This prompt generates thorough test suites in seconds, which developers can review and adjust rather than write from scratch.\n\n### Review test coverage gaps\n**Complexity**: Beginner\n\n**Category**: Testing\n\n**Prompt from library**:\n\n```text\nAnalyze test coverage for [MODULE/COMPONENT]:\n\nCurrent coverage: [PERCENTAGE]\n\nIdentify:\n1. Untested functions/methods\n2. Uncovered edge cases\n3. Missing error scenario tests\n4. Integration points without tests\n5. Priority areas to test next\n```\n\n**Why it helps**: This prompt reveals blind spots in your test suite before they cause production incidents. Teams can systematically improve coverage where it matters most.\n\n## How do you reduce mean time to resolution when debugging?\nProduction incidents take hours to diagnose. Developers wade through logs and stack traces while customers experience downtime. Every minute of debugging is a minute of lost productivity and potential revenue. AI can accelerate root cause analysis by parsing complex error messages and suggesting specific fixes, cutting diagnostic time from hours to minutes.\n\n### Debug failing pipeline\n**Complexity**: Beginner\n\n**Category**: Debugging\n\n**Prompt from library**:\n\n```text\nThis pipeline is failing:\n\nJob: [JOB NAME]\nStage: [STAGE]\nError: [PASTE ERROR MESSAGE/LOG]\n\nHelp me:\n1. Identify the root cause\n2. Suggest a fix\n3. Explain why it started failing\n4. Prevent similar issues\n```\n\n**Why it helps**: CI/CD failures block entire teams. This prompt diagnoses failures in seconds instead of the 15-30 minutes developers typically spend investigating, keeping deployment velocity high.\n\n## Moving from individual gains to team acceleration\nThese prompts represent a shift in how teams apply AI to software delivery. Rather than focusing solely on individual developer productivity, they address the coordination, quality, and knowledge-sharing challenges that actually constrain team velocity.\n\nThe [complete prompt library](https://about.gitlab.com/gitlab-duo/prompt-library/) contains more than 100 prompts across all stages of the software lifecycle: planning, development, security, testing, deployment, and operations. Each prompt is tagged by complexity level (Beginner, Intermediate, Advanced) and categorized by use case, making it easy to find the right starting point for your team.\n\nStart with prompts tagged “Beginner” that address your team’s most pressing obstacles. As your team builds confidence, explore intermediate and advanced prompts that enable more sophisticated workflows. The goal is not just faster coding — it's faster, safer, higher-quality software delivery from planning through production.",[25,731],"DevOps platform",{"featured":35,"template":14,"slug":733},"10-ai-prompts-to-speed-your-teams-software-delivery",{"content":735,"config":745},{"title":736,"description":737,"heroImage":738,"authors":739,"date":741,"body":742,"category":10,"tags":743},"AI can detect vulnerabilities, but who governs risk?","AI-assisted vulnerability detection is developing fast, but the harder challenges of enforcement, governance, and supply chain security require a holistic platform.","https://res.cloudinary.com/about-gitlab-com/image/upload/v1772195014/ooezwusxjl1f7ijfmbvj.png",[740],"Omer Azaria","2026-02-27","Anthropic recently announced Claude Code Security, an AI system that detects vulnerabilities and proposes fixes. The market reacted immediately, with security stocks dipping as investors questioned whether AI might replace traditional AppSec tools. The question on everyone's mind: If AI can write code and secure it, is application security about to become obsolete?\n\nIf security only meant scanning code, the answer might be yes. But enterprise security has never been about detection alone.\n\nOrganizations are not asking whether AI can find vulnerabilities. They are asking three much harder questions: \n\n* Is what we are about to ship safe?  \n* Has our risk posture changed as environments evolve and dependencies, third-party services, tools, and infrastructure continuously shift?  \n* How do we govern a codebase that is increasingly assembled by AI and third-party sources, and that we are still accountable for? \n\nThose questions require a platform answer: Detection surfaces risk, but governance determines what happens next. \n\n[GitLab](https://about.gitlab.com/) is the orchestration layer built to govern the software lifecycle end-to-end. It gives teams the enforcement, visibility, and auditability they need to keep pace with the speed of AI-assisted development.\n\n## Trusting AI requires governing risk\n\nAI systems are rapidly getting better at identifying vulnerabilities and suggesting fixes. This is a meaningful and welcome advancement, but analysis is not accountability.\n\nAI cannot enforce company policy or define acceptable risk on its own. Humans must set the boundaries, policies, and guardrails that agents operate within, establishing separation of duties, ensuring audit trails, and maintaining consistent controls across thousands of repositories and teams. Trust in agents comes not from autonomy alone, but from clearly defined governance set by people. \n\nIn an [agentic world](https://about.gitlab.com/topics/agentic-ai/), where software is increasingly written and modified by autonomous systems, governance becomes more important, not less. The more autonomy organizations grant to AI, the stronger the governance must be.\n\nGovernance is not friction. It is the foundation that makes AI-assisted development trustworthy at scale.\n\n## LLMs see code, but platforms see context\n\nA large language model ([LLM](https://about.gitlab.com/blog/what-is-a-large-language-model-llm/)) evaluates code in isolation. An enterprise application security platform understands context. This difference matters because risk decisions are contextual:\n\n* Who authored the change?  \n* How critical is the application to the business?  \n* How does it interact with infrastructure and dependencies?  \n* Does the vulnerability exist in code that is actually reachable in production, or is it buried in a dependency that never executes?  \n* Is it actually exploitable in production, given how the application runs, its APIs, and the environment around it?\n\nSecurity decisions depend on this context. Without it, detection produces noisy alerts that slow down development rather than reducing risk. With it, organizations can triage quickly and manage risk effectively. Context evolves continuously as software changes, which means governance cannot be a one-time decision. \n\n## Static scans can’t keep up with dynamic risk\n\nSoftware risk is dynamic. Dependencies change, environments evolve, and systems interact in ways no single analysis can fully predict. A clean scan at one moment does not guarantee safety at release.\n\nEnterprise security depends on continuous assurance: controls embedded directly into development workflows that evaluate risk as software is built, tested, and deployed.\n\nDetection provides insight. Governance provides trust. Continuous governance is what allows organizations to ship safely at scale.\n\n## Governing the agentic future\n\nAI is reshaping how software is created. The question is no longer whether teams will use AI, but how safely they can scale it.\n\nSoftware today is assembled as much as it is written, from AI-generated code, open-source libraries, and third-party dependencies that span thousands of projects. Governing what ships across all of those sources is the hardest and most consequential part of application security, and it is the part that no developer-side tool is built to address. \n\nAs an intelligent orchestration platform, GitLab is built to address this problem. GitLab Ultimate embeds governance, policy enforcement, security scanning, and auditability directly into the workflows where software is planned, built, and shipped, so security teams can govern at the speed of AI. \n\nAI will accelerate development dramatically. The organizations that benefit most from AI will not be those with the smartest assistants alone, but those that build trust through strong governance.\n\n> To learn how GitLab helps organizations [govern and ship AI-generated code](https://about.gitlab.com/solutions/software-compliance/?utm_medium=blog&utm_campaign=eg_global_x_x_security_en_) safely, [talk to our team today](https://about.gitlab.com/sales/?utm_medium=blog&utm_campaign=eg_global_x_x_security_en_)\n\n\n ## Related reading\n\n - [Integrating AI with DevOps for enhanced security](https://about.gitlab.com/topics/devops/ai-enhanced-security/)\n - [The GitLab AI Security Framework for security leaders](https://about.gitlab.com/blog/the-gitlab-ai-security-framework-for-security-leaders/)\n - [Improve AI security in GitLab with composite identities](https://about.gitlab.com/blog/improve-ai-security-in-gitlab-with-composite-identities/)",[25,744],"security",{"featured":13,"template":14,"slug":746},"ai-can-detect-vulnerabilities-but-who-governs-risk",{"content":748,"config":758},{"title":749,"description":750,"authors":751,"category":10,"tags":753,"date":755,"heroImage":756,"body":757},"Secure and fast deployments to Google Agent Engine with GitLab","Follow this step-by-step guide to build an AI agent with Google's Agent Development Kit and deploy to Agent Engine using GitLab.",[752],"Regnard Raquedan",[25,754,114,27],"google","2026-02-26","https://res.cloudinary.com/about-gitlab-com/image/upload/v1772111172/mwhgbjawn62kymfwrhle.png","In this tutorial, you'll learn how to deploy an AI agent built with Google's Agent Development Kit ([ADK](https://google.github.io/adk-docs/)) to [Agent Engine](https://cloud.google.com/vertex-ai/generative-ai/docs/agent-engine/overview) using GitLab's native Google Cloud integration and CI/CD pipelines. We'll cover IAM configuration, pipeline setup, and testing your deployed agent.\n\n## What is Agent Engine and why does it matter?\n\nAgent Engine is Google Cloud's managed runtime specifically designed for AI agents. Think of it as the production home for your agents — where they live, run, and scale without you having to manage the underlying infrastructure. Agent Engine handles infrastructure, scaling, session management, and memory storage so you can focus on building your agent — not managing servers. It also integrates natively with Google Cloud's logging, monitoring, and IAM.\n\n## Why use GitLab to deploy to Agent Engine?\n\nAI agent deployment is typically difficult to configure correctly. Security considerations, CI/CD orchestration, and cloud permissions create friction that slows down development cycles.\n\nGitLab streamlines this entire process while enhancing security:\n\n- **Built-in security scanning** — Every deployment is automatically scanned for vulnerabilities without additional configuration.\n- **Native Google Cloud integration** — Workload Identity Federation eliminates the need for service account keys.\n- **Simplified CI/CD** — GitLab's templates handle complex deployment logic.\n\n## Prerequisites\n\nBefore you begin, ensure you have:\n\n- A Google Cloud project with the following APIs enabled:\n  - Cloud Storage API\n  - Vertex AI API\n- A GitLab project for your source code and CI/CD pipeline\n- A Google Cloud Storage bucket for staging deployments\n- Google Cloud IAM integration configured in GitLab (see Step 1)\n\nHere are the steps to follow.\n\n## 1. Configure IAM integration\n\nThe foundation of secure deployment is proper IAM configuration between GitLab and Google Cloud using Workload Identity Federation.\n\nIn your GitLab project:\n\n1. Navigate to **Settings > Integrations**.\n2. Locate the **Google Cloud IAM** integration.\n3. Provide the following information:\n   - **Project ID**: Your Google Cloud project ID\n   - **Project Number**: Found in your Google Cloud console\n   - **Workload Identity Pool ID**: A unique identifier for your identity pool\n   - **Provider ID**: A unique identifier for your identity provider\n\nGitLab generates a script for you. Copy and run this script in Google Cloud Shell to establish the Workload Identity Federation between platforms.\n\n**Important:** Add these additional roles to your service principal for Agent Engine deployment:\n\n- `roles/aiplatform.user`\n- `roles/storage.objectAdmin`\n\nYou can add these roles using gcloud commands:\n\n```bash\nGCP_PROJECT_ID=\"\u003Cyour-project-id>\"\nGCP_PROJECT_NUMBER=\"\u003Cyour-project-number>\"\nGCP_WORKLOAD_IDENTITY_POOL=\"\u003Cyour-pool-id>\"\n\ngcloud projects add-iam-policy-binding ${GCP_PROJECT_ID} \\\n  --member=\"principalSet://iam.googleapis.com/projects/${GCP_PROJECT_NUMBER}/locations/global/workloadIdentityPools/${GCP_WORKLOAD_IDENTITY_POOL}/attribute.developer_access/true\" \\\n  --role='roles/aiplatform.user'\n\ngcloud projects add-iam-policy-binding ${GCP_PROJECT_ID} \\\n  --member=\"principalSet://iam.googleapis.com/projects/${GCP_PROJECT_NUMBER}/locations/global/workloadIdentityPools/${GCP_WORKLOAD_IDENTITY_POOL}/attribute.developer_access/true\" \\\n  --role='roles/storage.objectAdmin'\n```\n\n## 2. Create the CI/CD pipeline\n\nNow for the core of the deployment — the CI/CD pipeline. Create a `.gitlab-ci.yml` file in your project root:\n\n```yaml\nstages:\n  - test\n  - deploy\n\ncache:\n  paths:\n    - .cache/pip\n  key: ${CI_COMMIT_REF_SLUG}\n\nvariables:\n  GCP_PROJECT_ID: \"\u003Cyour-project-id>\"\n  GCP_REGION: \"us-central1\"\n  STORAGE_BUCKET: \"\u003Cyour-staging-bucket>\"\n  AGENT_NAME: \"Canada City Advisor\"\n  AGENT_ENTRY: \"canada_city_advisor\"\n\nimage: google/cloud-sdk:slim\n\n# Security scanning templates\ninclude:\n  - template: Jobs/Dependency-Scanning.gitlab-ci.yml\n  - template: Jobs/SAST.gitlab-ci.yml\n  - template: Jobs/Secret-Detection.gitlab-ci.yml\n\ndeploy-agent:\n  stage: deploy\n  identity: google_cloud\n  rules:\n    - if: $CI_COMMIT_BRANCH == \"main\"\n  before_script:\n    - gcloud config set core/disable_usage_reporting true\n    - gcloud config set component_manager/disable_update_check true\n    - pip install -q --no-cache-dir --upgrade pip google-genai google-cloud-aiplatform -r requirements.txt --break-system-packages\n  script:\n    - gcloud config set project $GCP_PROJECT_ID\n    - adk deploy agent_engine \n        --project=$GCP_PROJECT_ID \n        --region=$GCP_REGION \n        --staging_bucket=gs://$STORAGE_BUCKET \n        --display_name=\"$AGENT_NAME\" \n        $AGENT_ENTRY\n```\n\nThe pipeline consists of two stages:\n\n**Test stage** — GitLab's security scanners run automatically. The included templates provide dependency scanning, static application security testing (SAST), and secret detection without additional configuration.\n\n**Deploy stage** — Uses the ADK CLI to deploy your agent directly to Agent Engine. The staging bucket temporarily holds your application workload before Agent Engine picks it up for deployment.\n\n### Key configuration notes\n\n- The `identity: google_cloud` directive enables keyless authentication via Workload Identity Federation.\n- Security scanners are included as templates, meaning they run by default with no setup required.\n- The `adk deploy agent_engine` command handles all the complexity of packaging and deploying your agent.\n- Pipeline caching speeds up subsequent deployments by preserving pip dependencies.\n\n## 3. Deploy and verify\n\nWith your pipeline configured:\n\n1. Commit your agent code and `.gitlab-ci.yml` to GitLab.\n2. Navigate to **Build > Pipelines** to monitor execution.\n3. Watch the test stage complete security scans.\n4. Observe the deploy stage push your agent to Agent Engine.\n\nOnce the pipeline succeeds, verify your deployment in the Google Cloud Console:\n\n1. Navigate to **Vertex AI > Agent Engine**.\n2. Locate your deployed agent.\n3. Note the **resource name** — you'll need this for testing.\n\n## 4. Test your deployed agent\n\nTest your agent using a curl command. You'll need three pieces of information:\n\n- **Agent ID**: From the Agent Engine console (the resource name's numeric identifier)\n- **Project ID**: Your Google Cloud project\n- **Location**: The region where you deployed (e.g., `us-central1`)\n\n```bash\nPROJECT_ID=\"\u003Cyour-project-id>\"\nLOCATION=\"us-central1\"\nAGENT_ID=\"\u003Cyour-agent-id>\"\nTOKEN=$(gcloud auth print-access-token)\n\ncurl -X POST \\\n  -H \"Authorization: Bearer $TOKEN\" \\\n  -H \"Content-Type: application/json\" \\\n  \"https://${LOCATION}-aiplatform.googleapis.com/v1/projects/${PROJECT_ID}/locations/${LOCATION}/reasoningEngines/${AGENT_ID}:streamQuery\" \\\n  -d '{\n    \"input\": {\n      \"message\": \"I make $85,000 per year and I prefer cities with mild winters and a vibrant cultural scene. I also want to be near the coast if possible. What Canadian cities would you recommend?\",\n      \"user_id\": \"demo-user\"\n    }\n  }' | jq -r '.content.parts[0].text'\n```\n\nIf everything is configured correctly, your agent will respond with personalized city recommendations based on the budget and lifestyle preferences provided.\n\n## Security benefits of this approach\n\nThis deployment pattern provides several security advantages:\n\n- **No long-lived credentials**: Workload Identity Federation eliminates service account keys entirely.\n- **Automated vulnerability scanning**: Every deployment is scanned before reaching production.\n- **Complete audit trail**: GitLab maintains full visibility of who deployed what and when.\n- **Principle of least privilege**: Fine-grained IAM roles limit access to only what's needed.\n\n## Summary\n\nDeploying AI agents to production doesn't have to be complex. By combining GitLab's DevSecOps platform with Google Cloud's Agent Engine, you get:\n\n- A managed runtime that handles scaling and infrastructure\n- Built-in security scanning without additional tooling\n- Keyless authentication via native cloud integration\n- A streamlined deployment process that fits modern AI development workflows\n\nWatch the full demo:\n\n\n\u003Cfigure class=\"video_container\"> \u003Ciframe src=\"https://www.youtube.com/embed/sxVFa2Mk-x4?si=Oi3cUjhgd7FT2yEd\" frameborder=\"0\" allowfullscreen=\"true\" title=\"Deploy AI Agents to Agent Engine with GitLab\"> \u003C/iframe> \u003C/figure>\n\n> Ready to try it yourself? Use this tutorial's [complete code example](https://gitlab.com/gitlab-partners-public/google-cloud/demos/agent-engine-demo) to get started now. Not a GitLab customer yet? Explore the DevSecOps platform with [a free trial](https://about.gitlab.com/free-trial/).\n",{"featured":35,"template":14,"slug":759},"secure-and-fast-deployments-to-google-agent-engine-with-gitlab",{"promotions":761},[762,775,787],{"id":763,"categories":764,"header":765,"text":766,"button":767,"image":772},"ai-modernization",[10],"Is AI achieving its promise at scale?","Quiz will take 5 minutes or less",{"text":768,"config":769},"Get your AI maturity score",{"href":770,"dataGaName":771,"dataGaLocation":249},"/assessments/ai-modernization-assessment/","modernization assessment",{"config":773},{"src":774},"https://res.cloudinary.com/about-gitlab-com/image/upload/v1772138786/qix0m7kwnd8x2fh1zq49.png",{"id":776,"categories":777,"header":779,"text":766,"button":780,"image":784},"devops-modernization",[778,42],"product","Are you just managing tools or shipping innovation?",{"text":781,"config":782},"Get your DevOps maturity score",{"href":783,"dataGaName":771,"dataGaLocation":249},"/assessments/devops-modernization-assessment/",{"config":785},{"src":786},"https://res.cloudinary.com/about-gitlab-com/image/upload/v1772138785/eg818fmakweyuznttgid.png",{"id":788,"categories":789,"header":790,"text":766,"button":791,"image":795},"security-modernization",[744],"Are you trading speed for security?",{"text":792,"config":793},"Get your security maturity score",{"href":794,"dataGaName":771,"dataGaLocation":249},"/assessments/security-modernization-assessment/",{"config":796},{"src":797},"https://res.cloudinary.com/about-gitlab-com/image/upload/v1772138786/p4pbqd9nnjejg5ds6mdk.png",{"header":799,"blurb":800,"button":801,"secondaryButton":806},"Start building faster today","See what your team can do with the intelligent orchestration platform for DevSecOps.\n",{"text":802,"config":803},"Get your free trial",{"href":804,"dataGaName":56,"dataGaLocation":805},"https://gitlab.com/-/trial_registrations/new?glm_content=default-saas-trial&glm_source=about.gitlab.com/","feature",{"text":501,"config":807},{"href":60,"dataGaName":61,"dataGaLocation":805},1772652059889]