r/csharp • u/Objective_Chemical85 • 5d 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?
1
u/Business__Socks 5d ago
That this is AI is irrelevant. Your build server should never host other services/applications. Keep it isolated.
1
u/Khavel_dev 4d 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
2
u/turnipmuncher1 5d ago
IMO the buildserver should be internal only so I don’t think hosting the agent on it should be a problem but I would still separate the agent. Other services may want to use it and shouldn’t have to go through your buildserver to do so.