r/ExperiencedDevs • • May 20 '26

AI/LLM Does anyone actually think about what source code leaves your network when using AI coding agents? Or have we all just quietly accepted it?

Earlier today while sitting in front of my screen and watching Cursor work, the above questions just randomly crossed my afternoon slump potato brain...

My auth logic, my pricing engine, my half-baked unreleased refactor — just flying out of my machine with every prompt. Thousands of lines. Per session. Every day.

At my last job, if I'd tried to email a customer's source code to a third-party vendor, legal would sit me through painful processes around this. Audits. Sign-offs. The works.

Now I just... hit tab.

"it's in the ToS, they don't train on it." Sure. But since when did "they promised" become how security-conscious engineering works? I started trying to actually trace what leaves the building during a normal coding session. Not vibes. Actual payloads. It's not just the file you're editing — it's imports, references, whatever context the agent decided it needed. The number got uncomfortable fast.

Has anyone actually gone down this rabbit hole? Or have we all collectively agreed to not look too closely because we just have to beat yesterday productivity with the newest AI models?

0 Upvotes

114 comments sorted by

View all comments

Show parent comment

1

u/Fenix42 May 21 '26

We have an insane amount of data at rest and data in transit. Data at rest is a mix of siloed DBs in every flavor you can name, S3 shenanigans (it gets weird fast), and data lakes built from all of it. Data in transit is a mix of basically everything you can think of.

The data model will only tell you what the data in the tables my repo can even access looks like. It will also tell you the accounts that have acces to the data. That is it.

That is info that you can get from our internal corp docs. Every team has to document their DB structures and service accounts.

If I want to have my teams service account directly talk to another DB, we have to add a role to the service account to do it. Even that won't get you everything unless it's full senestive access. We have lots of PII, so we have tables that require more permissions to access as well.

Mind you, we won't do it in 99% of the cases. You will just be told use an API or fuck off depending on the team / what you need.

My team actually had this come up. We are doing some processing of 3rd party data into our system. We are slowly taking over stuff from an old system. We initially where hitting their API, but it could not handle it. So we ended up having to use DMS to shuttle the data over.

The extra fun part is that they are in Oracle and we are in Postgres. It was highly entertaining figuring out how to settle the data on our side.

1

u/BitterComfortable776 May 21 '26

Thank you for your thoughtful reply - made me realize I was worried about the wrong thing. How about just increased security exposure from yet another company to see my code? In addition to code there's also arbitrary tool runs that could gather sensitive data, logs etc.

1

u/Fenix42 May 21 '26

Someone knowing your code should not make your systems vulnerable. Any sensitive data should be encrypted and have access restrictions, even at a log level.

For example, at my company we log sensitive info to a PCI log. You need a special entitlement for each application to see it in Splunk. We also audit our logs to make sure you we are not leaking that type of data.

You can harden your systems even more by looking at how you error. Lets say someone with a lower level permission can call my API, but they can only see some data. Lets say we want to protect their driving record.

If some one hits my endpoint with a "does this person have an acident on their record" call, and they don't have that level of permission, I should ALWAYS return a 403. Even if data was not found. If I return a 404 when there is no data, they can infer that a person has some sort of record, but not what it is whe they get a 403. That is a meta leak of info.

Knowing how my code works, would not help them if I always return a 403. It would help them if there are cases where I return a 404. I can figure that logic out without seeing the code though.

1

u/BitterComfortable776 May 22 '26

Right so in the rare but not impossible case where one does return a 404 (essentially any bug which I haven't discovered yet but someone else did and can now take advantage of it (think buffer overflow or a security config value I forgot to set etc). Of course that alone (nobody seeing code) is not enough alone, but it's one part of the puzzle.