-
-
Amanah Board: a customer's name, mobile and Iqama number flowing from Dammam to an AI endpoint in Iowa, flagged red.
-
The Review flow on a merge request: which privacy laws apply and why, with the cross-border transfer status.
-
Same code, deployment target moved to Frankfurt: Amanah now applies EU GDPR and Saudi PDPL, and the gate fails.
-
Every step leaves a GitLab record across all nine DevSecOps stages, from plan to govern.
Inspiration
Every team is adding AI features. A support chatbot that sends transcripts to a hosted language model, an OpenTelemetry exporter, or a simple analytics event can quietly transfer personal data across national borders.
Traditional code reviews rarely catch these transfers. Generic SAST tools do not recognize country-specific identifiers such as Saudi Iqama numbers or Emirates IDs, and the applicable privacy laws depend on where an application is set to deploy, where its users are located, and where their data is transferred.
Saudi Arabia's PDPL, the EU and UK GDPR, the UAE PDPL, India's DPDP Act, and California's CCPA impose different obligations concerning personal data, international transfers, and breach notifications.
Yet most startups shipping new features every week do not have a full-time Data Protection Officer (DPO).
That's why we built Amānah.
Amānah brings privacy-aware review directly into GitLab's development lifecycle. It helps small product teams serving Saudi, Gulf, European, British, Indian, and Californian markets identify potentially noncompliant cross-border data transfers before deployment.
Instead of discovering privacy risks after personal data has already left an approved region, Amānah identifies those risks when code changes are introduced.
Amānah (أمانة) is Arabic for trust and safekeeping. The name reflects a simple principle: personal data is entrusted to us, and we are responsible for protecting it.
What It Does
Amānah is a team of four GitLab Duo Agent Platform flows, supported by a deterministic privacy gate and a jurisdiction-aware policy engine.
Together, they examine merge requests, intended deployment regions, outbound data destinations, and application logs to identify potential privacy violations.
The core principle is straightforward:
Deterministic tools establish the facts. AI agents explain and act on those facts. Humans retain final authority.
1. Deterministic Privacy Gate (amanah-scan)
Amānah runs a privacy scanner within GitLab CI/CD and fails the pipeline when it detects potentially noncompliant cross-border personal data transfers or raw personal identifiers hard-coded in source code.
The scanner identifies:
- National identifiers: Saudi National IDs and Iqama numbers, Emirates IDs, and Aadhaar numbers, using check-digit validation.
- Financial identifiers: IBANs for the 89 countries supported by its IBAN registry.
- Structured identifiers: Indian PAN, UK National Insurance numbers, and US Social Security numbers.
- Sensitive data: Fields and patterns that may contain personal or sensitive information.
- Outbound destinations: LLM APIs, telemetry exporters, analytics services, and OpenTofu infrastructure resources.
- Deployment regions: Cloud regions configured through CI variables, OpenTofu files, and infrastructure plans.
The gate produces structured findings that GitLab Duo agents use for analysis, explanation, and remediation.
2. Jurisdiction Engine
Privacy regulations depend on context. Amānah evaluates three critical facts:
- Where the application is set to deploy: Cloud regions discovered from CI configuration and OpenTofu.
- Which markets the application serves: Declared in
amanah.yml. - Where personal data is transferred: Identified outbound destinations and their regions.
The engine maps approximately 150 Google Cloud, AWS, and Azure regions to countries.
It evaluates six regulation packs covering Saudi Arabia, the EU, the UK, the UAE, India, and California.
Every jurisdictional conclusion includes an explanation of why a regulation may apply.
For example:
Deployed in
europe-west3(Frankfurt) -> processing in the EU -> GDPR Article 3(1).
Each regulation pack references official legal sources. Legal assertions that cannot be confirmed from primary sources are explicitly marked as unverified.
3. Four GitLab Duo Agent Platform Flows
Amānah uses four custom flows published in GitLab's AI Catalog, each with a dedicated responsibility and trigger.
Review Flow: Privacy Review at Merge Request Time
Triggered when a merge request is created or marked ready, or when a reviewer is assigned.
The flow:
- Reads deterministic privacy gate findings.
- Posts inline comments on the affected code lines.
- Explains which privacy laws may apply and why.
- Recommends the least disruptive remediation.
- Requests review from the privacy officer.
- Updates the Data Map work item.
- Produces bilingual English and Arabic findings when Saudi or UAE regulations apply.
Fix Flow: Test-First Remediation
Triggered when the privacy officer mentions the agent and requests a fix.
The flow:
- Creates a regression test demonstrating the privacy issue.
- Commits the failing test.
- Implements a targeted correction.
- Commits the fix.
- Responds in the merge request discussion.
Potential remediations include pseudonymizing data before export, restricting processing to an approved region, or removing sensitive fields from outbound payloads.
Pipeline Flow: Compliance Evidence
Triggered by pipeline success or failure.
On failure, it explains the privacy gate's findings in plain language.
On a successful default-branch pipeline, it compiles a compliance evidence note documenting the relevant checks and results.
Breach Flow: Incident Response Assistance
Triggered when the privacy officer assigns a confidential incident.
Amānah's log sampler queries application logs stored in Grafana Loki using LogQL.
When personal data is detected in logs, the system creates a confidential incident. The Breach flow then:
- Reads the incident the log sampler created, including the notification deadlines it computed in UTC and Riyadh time, with the Umm al-Qura Hijri date for Saudi PDPL.
- Determines which breach-notification obligations apply.
- Drafts regulator and data-subject notifications as internal DRAFT notes.
- Opens a merge request to redact the exposed information.
The agents do not send notifications to regulators or affected individuals automatically.
4. Supervised Autonomy: Humans Remain in Control
Amānah follows a supervised-agent model.
Agents can independently:
- Analyze gate findings.
- Identify potentially applicable regulations.
- Explain issues in merge requests.
- Recommend corrections.
- Create regression tests and code fixes.
- Compile compliance evidence.
- Draft breach notifications.
However, three important decisions remain with the privacy officer:
- Requesting an automated fix.
- Assigning an incident for investigation.
- Approving and merging the final changes.
The privacy officer is identified through CODEOWNERS as the owner of privacy-relevant paths.
The flows have no tool to merge code or send notifications, and they are instructed never to approve changes.
Humans approve outcomes, not every intermediate step.
5. Amānah Board: Privacy Visibility
The Amānah Board, published through GitLab Pages, provides a visual overview of the project's privacy posture.
It includes:
- A world map showing cross-border personal data destinations.
- Privacy findings changing from red to green as issues are resolved.
- Applicable regulations and their jurisdictional explanations.
- Live breach countdowns while incidents remain open.
- A nine-stage development lifecycle, with each stage linked to supporting evidence.
- English and Arabic interfaces, including right-to-left layout.
Live Board: https://showcase-c7825c.gitlab.io/
See It Running
All demonstrations use synthetic data. The following evidence links are publicly accessible without signing in.
Merge Request !3: Detect, Explain, Fix
The privacy gate detects a cross-border data transfer issue and fails the pipeline.
GitLab Duo agents post inline findings in English and Arabic. The privacy officer requests a fix, and the Fix flow commits a failing regression test followed by the remediation.
The pipeline then passes.
https://gitlab.com/gitlab-ai-hackathon/transcend-october-2026/43332977/showcase/-/merge_requests/3
Merge Request !4: Deployment Location Changes the Legal Assessment
The application code remains the same, but its intended deployment region changes to Frankfurt.
Amānah evaluates the new jurisdictional context and identifies both EU GDPR and Saudi PDPL as applicable, with explanations.
https://gitlab.com/gitlab-ai-hackathon/transcend-october-2026/43332977/showcase/-/merge_requests/4
Merge Request !5: Breach Response
The log sampler found a synthetic Iqama number in the application logs and opened a confidential incident. Assigned to the Breach flow, it drafted the notices and opened this log redaction merge request. The privacy officer reviewed and merged it.
https://gitlab.com/gitlab-ai-hackathon/transcend-october-2026/43332977/showcase/-/merge_requests/5
Additional Evidence
- Data Map work item: https://gitlab.com/gitlab-ai-hackathon/transcend-october-2026/43332977/showcase/-/work_items/3
- Release v1.0.0: https://gitlab.com/gitlab-ai-hackathon/transcend-october-2026/43332977/showcase/-/releases/v1.0.0
- Pipeline history: https://gitlab.com/gitlab-ai-hackathon/transcend-october-2026/43332977/showcase/-/pipelines
- Review Flow: https://gitlab.com/explore/ai-catalog/flows/1018917
- Fix Flow: https://gitlab.com/explore/ai-catalog/flows/1018918
- Pipeline Flow: https://gitlab.com/explore/ai-catalog/flows/1018919
- Breach Flow: https://gitlab.com/explore/ai-catalog/flows/1018920
How We Built It
GitLab Duo Agent Platform
We developed four custom flows using the flow registry v1 architecture, AgentComponent, and, in the Pipeline flow, a conditional router.
The flows are published to GitLab's AI Catalog and connected to five trigger categories:
- Merge request events.
- Reviewer assignment.
- Agent mentions.
- Pipeline events.
- Issue or incident assignment.
Agents consume structured results from deterministic CI job-log markers:
AMANAH-JURISDICTIONAMANAH-FINDINGAMANAH-SUMMARY
This design constrains agents to scanner-produced findings rather than allowing them to invent scanner results.
Regulation packs are also distributed as Agent Skills, generated from the same data used by the scanner.
The scripts/duo_publish.py script creates or updates flows, consumers, and triggers through GitLab GraphQL, making the setup reproducible.
GitLab CI/CD: Nine Integrated Stages
Amānah integrates with all nine stages of the development lifecycle.
- Plan: Data Map work item documenting personal data flows.
- Create: Test-first remediation commits generated by the Fix flow.
- Verify: pytest, flake8, privacy scanning, and jurisdiction analysis.
- Package: Docker image and CycloneDX Software Bill of Materials.
- Secure: SAST, Secret Detection, dependency scanning, container scanning, and Amānah's own SAST report.
- Release: Release evidence, Data Map references, CI markers, SBOM, and compliance evidence notes.
- Configure: OpenTofu infrastructure validation and deployment-region detection.
- Monitor: Grafana Loki log scanning, confidential incidents, and breach-response assistance.
- Govern: CODEOWNERS, AGENTS.md, privacy ownership, and the published Amānah Board.
Cloud Infrastructure
The project includes OpenTofu infrastructure designed for Google Cloud deployment in Dammam, Saudi Arabia (me-central2).
The infrastructure provisions:
- Google Cloud Run.
- Artifact Registry.
- An in-region logging bucket.
- Keyless deployment using GitLab CI and Workload Identity Federation.
A residency-verify CI job is ready to confirm that a deployed service runs in the assessed region.
OpenTofu validation runs in branch and tag pipelines.
Deployment limitation: The cloud deployment was not activated during the hackathon. Google Cloud sign-up from Saudi Arabia redirected us to a local reseller, and onboarding could not be completed before the deadline.
The deployment jobs remain disabled until a Google Cloud project is configured.
The infrastructure is implemented and validated, but a live Google Cloud deployment is not claimed.
Technology Stack
- Python 3.12: Privacy scanner, log sampler, and backend.
- FastAPI: Nakhla, a fictional bilingual grocery application used for demonstrations.
- Grafana Loki: Application log collection and analysis.
- LogQL: Querying application logs from Loki; identifiers are detected by the scanner's validators.
- OpenTofu: Infrastructure as Code and deployment-region analysis.
- GitLab Duo Agent Platform: AI agent orchestration.
- GitLab CI/CD: Automated testing, security, and compliance enforcement.
- Vanilla JavaScript and D3: Interactive Amānah Board.
The project includes 580+ automated tests and is released under the MIT license.
All demonstration data is synthetic.
Challenges We Ran Into
1. Agent Context and Trust Boundaries
Custom GitLab Duo flows do not automatically receive the repository's AGENTS.md instructions or Agent Skills.
We addressed this by having every flow load its instructions and regulation skills from the default branch.
This also creates an important security boundary: a merge request cannot modify the rules against which it is being reviewed.
2. Designing Around Supervised Execution
Flows initiated by agents do not trigger additional flows automatically.
Rather than treating this solely as a limitation, we designed the workflow around explicit human initiation and approval.
Each remediation or incident-response loop begins with a human decision, reinforcing supervised autonomy and accountability.
3. Legal Accuracy Across Jurisdictions
Data privacy requirements differ significantly between countries, and legislative implementation timelines can be difficult to interpret.
We structured each regulation pack around official sources, including:
- Saudi Data & Artificial Intelligence Authority (SDAIA).
- EUR-Lex.
- UK legislation.gov.uk.
- UAE legislation portal.
- India's Official Gazette.
- California Legislature.
Where a legal requirement or effective date could not be confirmed from a primary source, Amānah marks it as unverified.
This was particularly important for the UAE PDPL's Executive Regulations and the phased commencement of India's DPDP Act.
4. Scanning Our Own Repository
Amānah's repository contains synthetic identifiers, test fixtures, and intentionally vulnerable examples.
The challenge was ensuring the privacy gate could successfully scan its own repository without introducing broad exclusions that might conceal genuine leaks.
We addressed this through test-aware scanning and targeted validation.
Accomplishments That We're Proud Of
1. A Working End-to-End Privacy Workflow
The complete detection-to-remediation workflow runs within GitLab.
A merge request introduces a privacy risk. The deterministic gate fails the pipeline. Agents explain the issue on the relevant code lines in English and Arabic.
The privacy officer requests a fix, a regression test demonstrates the issue, the correction is committed, and the pipeline passes.
The result is an actionable privacy control integrated into the development workflow, not merely a compliance report.
2. Jurisdiction-Aware Assessment
The same application code can receive a different privacy assessment when its intended deployment region changes.
Amānah makes this reasoning visible, helping developers understand not only what is risky but why a particular regulation may apply.
3. Bilingual Privacy Assistance
Amānah supports English and Arabic across:
- Merge request findings.
- Review summaries.
- Compliance evidence notes.
- Draft breach notifications.
- The interactive Amānah Board.
The Board also supports Arabic right-to-left layouts.
4. Measurable Results From Live Runs
Our GitLab demonstrations produced the following timings:
Merge Request !3
- Review completed approximately 3 minutes after the merge request opened.
- A failing regression test and code correction were committed approximately 2 minutes after the privacy officer requested a fix.
Breach Demonstration
- The log sampler detected a synthetic Saudi Iqama number in Grafana Loki.
- Approximately 4 minutes later, the Breach flow had drafted bilingual regulator and data-subject notices and opened a log-redaction merge request.
- The workflow illustrated response preparation against a potentially applicable 72-hour notification deadline, subject to the relevant legal requirements and incident circumstances.
These results demonstrate how AI-assisted workflows can reduce the time between detecting a potential privacy incident and preparing a response.
What We Learned
The most important lesson was that deterministic systems and AI agents are stronger together than either is alone.
The scanner establishes the facts.
The jurisdiction engine determines which legal rules may apply.
AI agents explain the findings, suggest fixes, generate tests, and prepare evidence.
A human reviews the outcome and makes the final decision.
This separation provides the speed and flexibility of AI assistance while preserving predictable enforcement, auditability, and human accountability.
AI should accelerate privacy engineering, not replace responsible human judgment.
What's Next
We plan to extend Amānah in several directions:
- More jurisdictions: Add regulation packs for Qatar, Bahrain, Singapore, and Japan.
- Deeper data-flow analysis: Trace personal data across files, services, APIs, and infrastructure boundaries.
- Additional observability integrations: Support GitLab Observability and Google Cloud Logging alongside Grafana Loki.
- Live Saudi cloud deployment: Activate the prepared Google Cloud infrastructure in Dammam once a cloud project becomes available.
- Broader GitLab adoption: Make the published AI Catalog flows easier for other teams to enable and configure.
Our long-term goal is to make privacy-aware deployment checks a natural part of the software delivery lifecycle, especially for smaller teams building AI-enabled products across multiple jurisdictions.
Amānah: Protecting personal data before deployment, not after the damage is done.
Disclaimer: All data used in the demonstration is synthetic. Amānah is an engineering aid intended to support privacy and compliance workflows. It does not provide legal advice, guarantee regulatory compliance, or replace review by qualified privacy and legal professionals.
Log in or sign up for Devpost to join the conversation.