# Confidential AI Solution for GitLab Self-Hosted

Enable AI-assisted development while keeping your source code secure.

- **Source:** [GitLab](https://brifing.si/source/76101668-80db-4240-8676-e968d2b72546)
- **Published:** 2026-08-06
- **Topic:** [Data & AI](https://brifing.si/c/data-ai)
- **Original article:** <https://about.gitlab.com/blog/confidential-ai-for-gitlab-self-hosted/>
- **On Brifing:** https://brifing.si/s/cf78af6d-ec31-4225-87ee-1a249e4e9f02

## The AI Dilemma for Regulated Organizations

Developers want AI coding assistants, but regulated organizations can't send source code to third-party AI services. Traditional solutions either compromise data security or require expensive infrastructure. GitLab Duo Self-Hosted with Privatemode AI solves this dilemma. Code never leaves your boundaries in unencrypted form, maintaining strict compliance with regulatory requirements.

## Capabilities of GitLab Duo

GitLab Duo Agent Platform offers a wide range of AI-powered features from merge request reviews to multi-file refactoring, test generation and execution, and managing CI workflows. These features enable teams to review faster and spend less time on routine tasks. However, all these features require sending your code to the model provider, creating security concerns.

## Regulatory Pressures

Regulations like NIS2 and DORA set new standards for operational resilience and third-party risk in critical infrastructure and financial sectors. GDPR governs processing of personal data in code and logs. Additional constraints come from BaFin supervision, BSI C5 requirements, and healthcare data rules. Financial services, healthcare, defense, and public sector organizations face the strongest pressures.

## Limitations of Traditional Solutions

Public AI SaaS solutions take your code outside your boundaries. VPC/private cloud solutions give plaintext access to the operator and cloud provider. Running your own LLM stack comes with high GPU costs, model operations overhead, and update challenges. These solutions also typically lag behind the latest model technology, putting regulated organizations at a competitive disadvantage.

## Confidential Computing Technology

Confidential computing keeps data encrypted even during processing using hardware-based trusted execution environments (TEEs). Supported by technologies like AMD SEV, Intel TDX, and NVIDIA Confidential Computing, data remains encrypted in transit and at rest with AES-256, only being decrypted within the TEE. This means even the operating system or operator cannot read the data.

## Remote Attestation

Before sending any data, the client requests the TEE to prove what code is running inside it. The hardware produces cryptographic evidence of the exact code in the enclave. The client verifies this evidence against known-good values and only then establishes the encrypted channel. This 'verify first, send second' approach ensures only verified environments process sensitive data.

## How Privatemode AI Differs

Privatemode AI runs state-of-the-art models within confidential computing hardware. Prompts, source code, and completions remain end-to-end encrypted, even during inference. By pointing GitLab Duo's AI Gateway to the Privatemode proxy, developers get the same Duo features with one crucial difference: code never leaves your boundaries unencrypted, maintaining strict data sovereignty.

## Security Properties

With Privatemode AI, neither the AI service operator nor the underlying cloud provider can see your prompts, completions, or context. This security isn't based on contractual promises but is hardware-enforced. The data flow diagram shows prompts encrypted at the client and only decrypted within the TEE. The operator and cloud provider cannot access the data because the hardware prevents it.

## Target Audience

This solution is specifically designed for organizations in financial services, healthcare and pharma, defense, public sector, and critical infrastructure. In these sectors, source code represents core intellectual property, and where it gets processed becomes a contractual, sectoral, and regulatory issue. It's ideal for sensitive IP like banking algorithms, medical device firmware, or defense control software.

## Balancing Productivity and Security

The GitLab Duo Self-Hosted integration with Privatemode AI allows regulated organizations to benefit from AI productivity advantages while eliminating data security concerns. Developers gain access to modern AI coding assistants, while organizations maintain confidence in their IP protection. This solution offers a critical opportunity for teams that have lagged in AI adoption due to compliance requirements.

## Sources covering this story

- https://about.gitlab.com/blog/confidential-ai-for-gitlab-self-hosted/ — 

---

_Summary written by Brifing from the original reporting. Copyright in the original article belongs to its publisher; read the full piece at the link above._
