# AI infrastructure built to withstand attacks

> Infrastructure for the AI era, designed on the assumption that you are under constant attack.

AI changes the attack surface: models read untrusted text, agents can take actions and automated attacks run day and night. We design and build infrastructure that assumes exactly that: no open ports, least privilege for people and agents, every action recorded, and rules that block when they cannot be guaranteed.

Number 1 Prompt injection tops the OWASP Top 10 for LLM applications (2025 edition, the current one), and 'Agent Goal Hijack' tops the OWASP Top 10 for Agentic Applications for 2026. OWASP calls it unclear whether fool-proof prevention exists, and recommends least privilege, human approval for high-risk actions and segregating external content, among other measures. (Source: [OWASP Gen AI Security Project, LLM01:2025](https://genai.owasp.org/llmrisk/llm01-prompt-injection/))

## When to call us

- You deploy AI agents that have access to systems, code or customer data.
- Your AI application processes outside input: emails, documents, web pages.
- You want to self-host, but without a server reachable from the internet.
- An auditor or customer asks how your AI environment is secured.

We do not sell standalone penetration tests or certification audits; we design and build the environment so that you are well prepared for them.

## What you get

- **Zero-trust access.** Services are reachable only through a tunnel with identity checks. No ports are open to the internet.
- **Least-privilege agents.** An agent gets exactly the permissions for its task. Destructive actions require a human and a separate key.
- **Prompt injection defence.** Web pages, documents and repository content count as untrusted input: data, not instructions.
- **Audit logging and secrets management.** Every mutating action is attributed and logged. Tokens and keys never appear in code, logs or chat messages.
- **Hardened containers.** Pinned images, no privilege escalation, internal networks and authenticated connections between services.
- **Application security.** Content Security Policy, rate limiting, secure session cookies and device attestation against abuse of public features.

## How we approach it

1. **Threat model.** We map what there is to gain, who can reach it and which input is untrusted, including what a model or agent reads.
2. **Closed by default.** We design from no access and open only what is needed. Rules that cannot be guaranteed block.
3. **Make it provable.** Security rules get tests, changes go through review and the log shows who did what.

## Technology

Cloudflare Zero Trust, Cloudflare Access, Docker, Coolify, Linux, Firebase App Check, Play Integrity, DeviceCheck, CSP, GitHub Actions

## Proof from our own work

- AI platform for a financial services firm: access through Zero Trust with single sign-on, pinned containers without extra privileges and our own security audit of the server. ([A private AI platform for a financial services firm](https://mg-devs.nl/en/cases/private-ai-platform-fintech/))
- Our own agent environment: agents cannot push, merge or change production data, and every action is in an audit log. ([Shipping software with AI agents, safely and verifiably](https://mg-devs.nl/en/cases/shipping-software-with-ai-agents/))
- Public voting in apps with 35,000 active users, protected against double voting with device attestation. ([One platform, seven apps: the carnival platform](https://mg-devs.nl/en/cases/carnival-app-platform/))
- This website itself: a strict Content-Security-Policy, no trackers, third-party scripts only once you use the contact form, and TLS 1.2 as a minimum.

## Frequently asked questions

### What is prompt injection?

In a prompt injection an attacker hides instructions in text an AI model reads, such as a web page, email or document. The model may follow those instructions as if they came from the user. The defence is architecture: treat untrusted input as data and limit what the model is allowed to do.

### What is Zero Trust, and what exactly does Cloudflare Zero Trust do?

Zero Trust means no request is trusted because of where it comes from: identity first, then access. With Cloudflare Zero Trust your server opens an outbound tunnel to Cloudflare, so no ports need to be open to the internet, and Cloudflare Access checks per application who signs in, with single sign-on and a second factor. Bots that scan the internet for vulnerable software therefore never reach your application. It does not replace patching, and it only protects what really sits behind the tunnel: an admin screen that is also reachable directly on the IP address stays open. That is why we always verify it from the outside.

### Why is security different for AI than for ordinary software?

Because a model makes no hard distinction between instructions and data, and because agents act on their own. A mistake in permissions or input handling therefore has consequences sooner than in classic software.

### Can AI agents safely access our code and systems?

Yes, if the environment is set up for it. In our own setup agents work in an isolated working copy, cannot publish anything without checks and human approval, and are not allowed to change production data.

---
Source: https://mg-devs.nl/en/services/ai-infrastructure-security/
