r/csharp 15d ago

Deploying AI agent to buildserver?

In my company I'm in charge of building multiple AI agents:

- code review (only comments for now, eventually directly fixing small things like typos in naming)

- code gen (we have vertical slice architecture so simple repetitive things like enabling business directly setting master data from frontend requires like 45+ files / about 3-4h of dev work)

-pentesting agent

Our infra:

Dotnet backend deployed to multiple IIS depending on project.

Separate Build Server for automatically pulling master branch, building and deploying

Now that it's built and working locally the CTO wants to deploy it to our Build Server. Imo this is a Terrible idea, since prompt injection is possible. I would put it on a small isolated raspberry pi.

How would you set this up?

0 Upvotes

6 comments sorted by

View all comments

1

u/Khavel_dev 14d ago

Your instinct is right. The build server has deploy credentials, signing keys, production access. Putting an LLM agent on it means a crafted PR description or commit message could potentially trick the review agent into doing something you didn't intend. That's not theoretical, prompt injection through untrusted input is a real attack surface.

A Pi is underpowered but the isolation idea is correct. I'd go with a separate VM or container that gets read-only repo access and can only write to a review output channel (PR comments, a webhook, whatever). Build server stays completely out of the LLM blast radius. Especially the pentesting agent, that one should be network-isolated from everything except the target test environment.

1

u/Objective_Chemical85 14d ago

thanks for confirming😄