Loading…

How to build a secure-by-default AI coding agent

From the floor of the Ai4 conference, Ryan chats with Greg Jennings, VP of Engineering for AI Products at Anaconda, about what it takes to build a secure-by-default AI coding agent, why prompts shouldn't be treated as strict security guardrails, and how Anaconda is using strategic acquisitions to secure the AI software supply chain.

The Stack Overflow Podcast cover art

Anaconda is a foundational platform for Python data science and machine learning, providing secure software supply chain governance and enterprise AI infrastructure.

Connect with Greg on LinkedIn and X.

TRANSCRIPT

[intro music]

Ryan Donovan: Hello, everyone, and welcome to the Stack Overflow podcast, a place to talk all things software and technology. I'm your host, Ryan Donovan, and I'm recording live today from AI4. Today, we're talking about how to build a secure by default coding agent. And my guest for that is Greg Jennings, VP of Engineering for AI Products at Anaconda. So welcome to the show, Greg.

GJ: Great to meet you, Ryan. Love to be here.

RD: Yeah. So we're talking, you know, a lot of people talk about the AI risks with agentic coding, right? It produces code that's not necessarily secure. They themselves are not necessarily secure in how they operate. What does it mean to build a secure by default coding system?

GJ: First of all, like to reinforce your point, you are correct that, you know, the agents that we have today were by and large trained to produce code that works. Not necessarily code that is secure. And I don't have the exact statistics in front of me, but I believe that there've been some analysis around coding agents that produce both working and secure code, and the numbers are a lot lower than you might expect. They're reinforced around creating working code, not code that is absent of vulnerabilities. What does it mean? I think that it means that organizations have to understand that the coding agents themselves are extremely valuable tools that produce a lot of code, but they have to treat that code maybe with a level of trust that is perhaps a little bit less than they would have treated their own code that was written internally. That means that probably there are a lot of things that they need to think about around test coverage, but also as the agents are operating in general, these agents are not just producing code. The agentic coding era itself is… is actually like not that long in the tooth, you know? It really was sort of–

RD: A fresh little baby right?

GJ: Yeah, it's, it's something that sort of became a really powerful adopted thing, really only I'd say strongly within the last year or so.

RD: Yeah yeah.

GJ: And prior to that, it's not that people weren't using coding agents, certainly they were using Cursor and Claude Code, you know, is, was around, but a lot of the cases were people using AI to basically write code and then they themselves will be the ones to kind of validate each line. Now increasingly we're letting agents write the code themselves, and a lot of times that code isn't being looked at. It means that now the agents are both writing the code, but they're also making choices around the dependencies that are being pulled in. They are introducing new things to your software supply chain.

RD: Inventing whole new bugs.

GJ: They are creating bugs. In many cases, they are generating bugs. We've actually had a situation familiar with someone that works with us who... created a bug, I believe, with the new Anthropic Fable model. And then the Anthropic Fable model realized that it had created a bug and he tried to use the model to remediate the bug. And it realized that he was asking it to remediate a cybersecurity issue and it guardrailed him. And so I think it's sort of humorous in a way, but it's indicative of sort of where we are and how fast things are moving at the same time. There's just a lot to just kind of work out with regards to this. And the other thing is that while they are also writing code, they're, they're actually actively making changes to things like infrastructure. Like, they're creating code. In many cases they may be pulling, approving pull requests, or at least they're opining on pull requests, but then actually doing the deployments themselves, making API calls in the process. And all those things sort of open up a different kind of, you know, a different kind of attack vectors that companies aren't necessarily used to dealing with at the scale that they have to deal with it now.

RD: Yeah, like you mentioned, AI is now being asked to be responsible for, you know, kind of the whole SDLC in some cases, right? The, the code gen, code review deployment security testing , and monitoring production where do you see the, the best place to place the sort of security guardrail security barriers to produce a secure by default agentic coding system?

GJ: Talking about guardrails, I think there's really like two places. So one is in an agent that's actually being used within an organization. I think the most logical place is in the environment itself and basically making sure that that agent is operating in a sandbox fashion. And there's some things that we've been looking at and looking at internally and iterating on where there's sort of the ability to inject credentials and make sure the, the agent that's actually making the request to an outside provider doesn't necessarily have direct access to those credentials. So that's one thing, and sort of keeping that perimeter tight. The other areas in an actual agent that gets deployed into your infrastructure, making sure that there's clear identity associated with that agent, that it's not the same as the agent's creator or the person who actually wrote the agent.

RD: So you can sort of audit whether it's an authentic bug.

GJ: You can track it, you can govern it. Because increasingly, since we're not necessarily paying as much attention to all of the code that the agent writes, we need to audit the actual agent's intent, not just let the… and the process that it took basically to get there. We need to understand every API call. We need to understand every MCP server that it looked at. We need to understand all the different API endpoints that it attempted to hit. If it intended to or tried to pull in a vulnerable package, that is a place where it makes sense as well. And then understanding that agents will both write to your supply chain as well and produce artifacts within it as well as consume it. So you need to kind of control both sides of that. You need to make sure that they're like humans, we're operating in an environment where the packages that they're getting and the artifacts that they have access to are restricted according to your organizational policies, but also that the artifacts that they're producing are things that aren't going to come back and bite you.

RD: Right. Those sort of two-sided dependencies there, like it seems that IT orgs are going to have to be very prescriptive on what dependencies are allowed in the future. And on the other side, you know, with the coding agents, you're basically creating new dependencies, new artifacts that you pushed out.

GJ: There was a recent incident, I think just even a few days ago, where I think Anthropic was testing one of their internal models. And it actually, as part of its test process, they realized, created a malicious, created basically a package that didn't exist and published it to PyPI. And it was actually downloaded, I think, by 15 different organizations before they took it out. So this is... you know, it's yet another indication that this will increasingly be an issue where AI agents are kind of autonomously changing what we think about as kind of the software supply chain.

RD: Yeah. On the question of the sort of traditional guardrail stuff, where it is often like an agents.md file, you know, a little Python script, I know a lot of folks have found that when you tell the agent something, they're not necessarily going to do it when you're saying here's the security protocols. Maybe they don't follow that. Are there non-agentic ways to put in sort of deterministic barrier between the agent– but you mentioned the injecting authorization credentials?

GJ: Yeah, absolutely yes. And in fact I would say like, that's a really important thing that organizations have to understand is that prompts, prompts that you give agents are not guardrails. Agents treat prompts like a rush hour driver treats a stoplight. Like, most of the time it'll adhere to it, but some of the time it might not. And like, the more these things get used at scale, the more you're going to be exposed to the long tails of the distribution, the more likely it is that you're going to hit the situation where they're not. Even a few months ago, there was an organization, a small startup, PocketOS, makes rental car software, had deployed, I think, Opus 4.6 working on a problem. It was supposed to have production, not have production access. It was given an instruction not to delete anything, but ended up discovering a credential that was stale and ended up discovering an old API legacy endpoint that had access to production and it deleted the production database volumes against its own instructions. And that can happen for many reasons, mainly because you know, these agents are trained to be extraordinarily goal-seeking and aggressive in their goal-seeking. We want them to be that way, that's what part of what makes them useful, but then when you have something that's both goal-seeking and also a little bit unpredictable and then sometimes the instructions that you gave it that told it not to do a thing get compacted then or change slightly, like yeah, it's inevitable basically that in probabilistic systems eventually the agents will do things that you explicitly told them not to do and then they won't do things that you explicitly told them to do. And so we have to control for both of those. And I think, as you said, the only way to really do that is by having deterministic gates around specific access to different systems. So we kind of think about it in like three stages almost. Sort of like before the agent has access to anything, like let's make sure that it has a restriction around the credentials that it has access to. That it only has a minimum set of assets and a minimum set of authorizations to do what it needs to do. And while it's actually working, like before access, then those different systems should have strong guardrails. They should be segmented off from the agent to whatever degree possible, right? And that's not always going to be the case where it's possible because then sometimes it can still potentially like find a stale credential or something like that. There's some hygiene aspects to this too, from the software engineering practice that we may not have otherwise had to consider, but we have to consider them now because agents don't have the same type of judgment at their core that a human senior engineer might have. And then finally at the end we need to sort of design the systems around resilience. You know we shouldn't, shouldn't necessarily think about what, what is the worst case situation that can happen and how do I set up the system so that I both maximize the odds of a successful agentic run but also I structurally deterministically try to put processes and pieces in place that can prevent bad outcomes.

RD: Yeah the hygiene issue is interesting. Like you mentioned finding a sale credential. I've heard of agents pulling credentials from the browser session and it seems like if it's possible, it'll do it. So it seems one of the things that people need to do is you're really restrictive about what is possible on their security systems.

GJ: Yes.

RD: Are we getting to a place where it's it's going to be just like a pain in the ass for engineers to do anything like for these security systems that are designed to guard rail against agents?

GJ: That is a very good question. There will be an adaptation process.

RD: Sure.

GJ: We'll always, as engineers, figure out ways to use the tools effectively. And these are like more than just tools. They're tools that can kind of go in off the rails in unpredictable ways, but they're also wildly beneficial and capable and valuable. So we want to figure out how to use them the right way. But there will be a process where we have to kind of understand that the way we've kind of treated things before probably can't happen again. I have a keychain on my device, for instance, and it has a bunch of SSH keys, and I give the agent the ability to self-approve access to new directories, I'm asking for it. And we're asking for it, again, because we've trained a system that has a poor judgment, that is very alien to the way human beings learn, to be extraordinarily goal-seeking. And it will do whatever it needs to do often to get what it thinks you have prescribed as the goal accomplished.

RD: There may be a positive side to this where everybody sort of learns some real security best practices. I remember when the initial Mythos news came out that it found bugs in everything that ever existed. I talked to somebody who was working at OWASP and she said, yeah, people are bad at security, right? People are lazy. They don't put in good security protocols. Not surprising that those bugs were found. Do you feel hopeful that people will start repairing all these secret holes?

GJ: I do. I do feel hopeful that people will start having said, you know, repairing the holes, having better hygiene, caring about it a little bit more. I almost have to treat it as though almost like a wild actor that's sort of semi-trustworthy that I'm turning my computer over to every time I ask it to do things and I really like the way that Jeremy Howard, you know, has compared these systems to like the AI slot machine. And most of the time, this is a case where the house wants you to win. The house wants you to win, so you keep pulling the lever. And they've gotten better and better and better at making these produce really good outcomes. But eventually, the long tail will bite you.

RD: You're going to get a whammy, right?

GJ: And eventually, you get the whammy. And it's sort of just inevitable that it happens. And so then the question is like, well, yes, I want to maximize the odds that I do that. And this is prompt optimization, making sure the instruction is front and center. The labs do a phenomenal job at trying to make sure that the agents are safe and do a good job at instruction following. But I think that because of the way that the agents were trained in the first place and the language models being the core of them, it's just unlikely that we're ever going to have that situation where we really fully can trust them. So we have to kind of rethink the system in a way where I'm going to offer the ability to have a wildly productive but somewhat untrustworthy actor operate on my infrastructure and have access to my equipment.

RD: Right. I mean, you know, as we're talking at AI4, Black Hat is going on nearby. You were talking about, you know, semi-trustworthy actors working for good. Right. There's your goldmine.

GJ: I'm sure from a Black Hat perspective, you know, interestingly like coming back to the guard railing issue that that my colleague hit where you know, wrote some insecure code, tried to get Fable to fix the insecure code, Fable guardrailed him. Like that's that's a real issue that happened recently with the hugging face breach too. You know, they tried to have the proprietary model from the company that was actually the one that was hacking them inadvertently. You know, interestingly very goal seeking, trying to basically do a better job on exploit bench figuring out like I can, I can hack it by finding the answers. That's what it was actually trying to do, goal-seeking, but the process created this sort of vulnerability and then they tried to use that model to try to figure out, what can I do? How can I figure out what happened? They had like 17,000 different independent events. That happened in a very, very brief amount of time and launched tons of sub agents from this whole thing. And they got guardrailed themselves. They ended up having to use an open weight model. They had to use GLM 5.2 to do that analysis because, you know, the proprietary model is extremely safe. You know, to your point about the Black Hat conference down the road, they don't want these models to be used for that purpose. But the reality is like, you know, in case we haven't been following the news, open weight models are catching up and they're catching up extremely, extremely fast, way faster than I think a lot of people anticipated with the most recent batch releases of Kimmy and Glenn. And those capabilities will be in the hands of malicious actors. They 100%, you know, will be fine tunes that are used in this way. And it's a little bit unnerving and should be unnerving, I think, to a lot of... large enterprises and legitimate organizations that they may not have access to the very capabilities they need at the time they need them the most.

RD: Yeah. It's that trade-off, right? Like, do you let them do all the things they want to do or do you protect the security versus freedom? That's sort of intrinsic in society.

GJ: Yeah. It's a great point. There's one point that I saw someone else raise and I don't know if we can take... extrapolate that one anecdote to the larger sort of trend from this, but I think it's very promising that they were able to use GLM 5.2 to basically, you know, analyze the traces and determine how they could guard and prevent malicious actions from a model that was actually quite a bit more advanced than GLM 5.2 open AI's on, I think, I believe it's on their unreleased, you know, model that did this. So perhaps there's like a defender's advantage and it's at AI at the scale of these things and I'm sure that the industry will come up with a lot of thoughts on how we better defend systems, but like, there's no question we're gonna have to put a lot more thought into this. And we really haven't had to previously because most people that had that kind of like, top-tier skill set found that there was, there was more money in basically being a cybersecurity defensive expert than trying to break the law and be an offensive actor. But I think that now we're distributing these capabilities into the hands of virtually everyone, we'll have to really think a lot more carefully about how to position our infrastructure.

RD: Right. Like some teenager just joking around, being like, oh, hack the Pentagon.

GJ: Yeah. And there again, structurally. You have to keep structural barriers between these things.

RD: Right. So we'll talk about how you're sort of building the secure by default coding agent system. And it's interesting because you're building it sort of through acquisitions, right?

GJ: Yeah.

RD: You know, in order to, it seems like in order to keep up with the sort of big players in the system, you're bringing together this like, you know, league of extraordinary startups. What led to that sort of thought process and how is that going?

GJ: One of the advantages we've had at Anaconda is you know we have an incredible breadth and like, a really deep reach into the broader, you know, technology ecosystem. So we have a lot of great contacts, a lot of people that have been around a while, and we have maintained this position sort of upstream as kind of the root of at least Python data science ecosystem software supply chain and by extension into the machine learning and AI supply chain. So we've kind of seen like firsthand what some of the big challenges are that organizations are facing and some of the ways that organizations are adopting new tools. I think they've also had a recognition that the pace of adoption and the pace of change sometimes is just beyond what a company that's focused on one particular avenue of enterprise sales can actually do itself in many cases. And a lot of the companies that we've acquired, not all of them, but a lot of the companies that we have pulled together are very complementary capabilities to things that we want to do. In fact, in most cases, I think they're things that are basically directly on our roadmap, but they somehow got the right magic formula of a great user experience, the right blend of capabilities, and the right compatible set of go-to-market approaches and internal compatibility, I would say, with our folks after meeting them that we felt like it was a very good match. And so I think growing like that, probably in the era when things are changing this rapidly, we may see more companies try this approach. I certainly wouldn't presume to speak of any companies outside of us in this regard, but I think we're pretty happy about where we've landed.

RD: Yeah. I mean, it is a really fast way to leapfrog the roadmap, right? If somebody already has that feature or that product. You know, I noticed we're putting out our... the time this comes out, our dev survey results will probably be right around the corner. I noticed that Kilo, one of the acquisitions, was on our dev survey list.

GJ: Yeah.

RD: You want to talk about what the companies were that you've acquired and where they fit into your roadmap?

GJ: Yeah. The primary ones that we can talk about now. Well, first of all, Outer Bounds, you know. That was kind of one of the first ones we announced. Outer Bounds is a platform that does machine learning orchestration, but it's also an extraordinarily flexible platform. And the way that it's set up is very compatible with a lot of the things that we wanted to do on our roadmap. We're very very big on helping organizations to be enabled themselves, especially with like open weight models, and so looking at what Outer Bounds is able to do. And this, by the way, is the Metaflow team that came out of Netflix that built that platform. And the way how solidly that platform is architected gave us a lot of hope that this was a great foundation for us to build on. And so that was kind of the first piece. And then Kilo was kind of the next piece. So then now we think about... have a great foundation. I have sort of machine learning and orchestration to enable the folks that are doing that kind of work. Now I want to think about how are like modern AI engineers actually operating? What is the AI native approach to development? We've had a great ability to get traction with folks who are getting started with Python, but also recognize that the way that people are getting started in software development now actually looks quite a bit different than it did 14 years ago when we were kind of unblocking the open source data science ecosystem for the world. And Kilo has had a tremendous run at getting a lot of traction very quickly. I think they were number two maybe on like all of the open router token usage last month. So they've got a huge amount of natural adoption and usage. And when you use their tools, their platform, you can understand why. It's a really great user experience. And we felt like that really great user experience was very compatible with the way that we want to try to enable our user base and also make sure that we enable our user base in the enterprise as well, because Hilo actually has some enterprise gating and governance features. They have the ability to kind of identify how I want to select different models. Only certain models are able to be used within a particular organization. It gives you a lot more than some more platforms do around the types of usage that people are having. And an AI adoption score that organizations can look at their teams and start to understand how well their teams are adopting it and using it. So we felt like philosophically there was a match there. And we felt like when we met the team that there was a great match as well. And it also helps that our CEO personally knew a lot of those folks, having worked with some of them at GitLab in the past. And the last one, which we can just announce this morning is Encrypt AI. And we're extremely excited about this one because a lot of the things that we're talking about with respect to agentic guardrails and how you actually structure things internally so that you can put these agents into situations where they just have the right permissions and not anything beyond that. And you can also have tracking and observability, understand the types of behaviors that they're exhibiting. That is what Encrypt is really, really good at. They've written papers on this topic. They have a lot of research done on this topic and they have researchers in their organization. And then additionally to that, we care deeply about the software supply chain. And I think there's no question that AI assets, AI models are the new type of asset that everyone has to pay attention to in their software supply chain now. And Crypt has also done a great job at building out an AI red teaming capability. So what does that mean? It means they have like kind of like MITRE attack framework, which sort of gives you a sense of how capable models are in responding to certain cybersecurity threats. They have the OWASP analysis setup, which sort of gives you another type of cyber defensive capability and like all these things give you a better sense of what the model's behavioral characteristics are. Is it likely to exfiltrate the prompt in certain situations? What's a propensity that it could get jailbroken? And as I start to think about, especially deploying agents, we've mostly talked about coding agents, but if I think about deploying agents, sometimes I want to deploy agents, for instance, that are going to be customer facing. Then I have to be careful in a whole different way about how those models permission structures work. So as I describe all these pieces, you know, we think they all actually fit together into a really nice package and give us a kind of an end-to-end user experience that can allow organizations to adopt AI coding practices, AI native coding practices in a safe and trusted way knowing that they have good provenance over their assets, knowing that they have a good AI bill of materials around understanding all the different AI systems that are in their organization, knowing that they have the right levels of guardrails around the capabilities of those models, and knowing that they have good observability tools to track all that, and knowing that all that is built on a platform that they can actually run and host in their own data plane and have that work be done in their own data plane so that they maintain a level of data sovereignty. These are the things that you know over and over and over our customers have told us they care about, and those facts I think were part of what really drove us to kind of pursue the strategy of getting a lot of these companies together in that position.

RD: Yeah, so you talk about the, the sort of features and the, the how they work really works together as a team, but actually merging companies products all these things is big engineering after and it's, you know, I've been through a couple companies and it's more than just like making the features all together, right? You're merging user tables, you're converting database schemas, you're–

GJ: Payment systems.

RD: Yeah, you're cutting tech stacks, making the tech stacks work together. What is the hardest challenge you found in merging, you know, three separate companies in this?

GJ: Well, I'll tell you when we've actually finally completed it. But we've done a lot of work so far, you know, toward how we can actually like shape this. And I think that, you know, the biggest thing is that when you first bring companies on, you know, by just by nature, as you just identified, there's going to be a lot of duplicative systems. But the duplicative systems are usually not always perfectly duplicative. You know, people don't design these things in like cookie cutter, you know, ways that kind of like take shape in response to what the market demands are and like the demands on the engineering team at the time.

RD: You don't want to be supporting like three different observability vendors.

GJ: Right. Yeah. Right. But, but each one of those observability vendors, they might've been chosen by each of those teams for slightly different reasons. And they might have a Venn overlap of like 90%, but that 10% may matter. And so. Now, how do you make the decisions around which thing wants? Because on the one hand, there's a desire to sort of reduce your engineering surface area, right? I can't support all these different tools of telemetry. I want to have, ideally, a system that does a thing. But those companies may have selected those tools for a specific reason. And that extends to every single type of technology decision that they made. It extends to the way that they want to deploy their applications, it extends to even kind of in many cases, how they do like token, token authorization, RBAC controls, how they think about organizational group management, all that has to be merged together. And I think that sort of, almost deep boring stuff and and really doing like a deep dive and kind of like a gap and overlap analysis across all of the different internal systems that you know actually are needed to be in place to make up any any real engineering system any real significant product, that's the difficult stuff.

RD: I think a lot of that kind of deep boring work is kind of a sweet spot for engineering, right? It's super effective, gets a lot of change. But there's also the culture aspect, which I think you alluded to in how people work. And that one's kind of harder because you can't have people, you know, different ways of working together.

GJ: Yeah.

RD: Are you trying to do anything with the sort of culture merging?

GJ: We are. For one, you know, we're acquiring these companies because they were successful, because we like them, you know, because we like what they did. We like what they build. We like who they are. So I think there's an aspect of, you know, we don't want to fix what's not broken. And in many cases like, we really love a lot of the, you know, cultural ways

that they have approached certain types of, you know, discovering problems, the way they go to market. I think most startups in general tend to be really really good about being very close to their customers, understanding their customers needs, building things that are, you know, in a tight iteration loop that they understand what the customer's pain points are and they try to design things minimally for that. You know, the ones that are successful tend to have that as a core competency within their core founding group. And so, you know, we don't want to change that. They have built up an understanding of who those, who the customers are, where they deliver value to them. But at the same time, there's a lot of things in a big company that change, right? We have 10 times, you know, more people than any of the company by far than any of the companies individually that we have acquired. And that means we have a lot more things that also have to be considered, you know? So like we have a finance department, the finance department cares about SKU numbers, you know, we don't want to have like, a very similar product or a very similar thing sold under a different SKU. We're trying to blend those things together as well, and that's a coordination across to a different type of department that possibly in their organization may have had one or two people we have a, you know, group that does that right. We have a group that really does an excellent job at all of our product marketing and like our media. You know this, here, the interview we're having today, you know those often are not functions in small startups as well you know.

RD: Sure.

GJ: So I think what what they start to discover is that, you know, some of those things that there's a there's a level of like cross-team coordination that, yes, exists within engineering

organizations and product organizations, but also exists just even within the company. That

introduces some level of friction that is just inevitable, but, but culturally I think by and large I

should say, we're, that's part of our due diligence process, right? We're really happy with where we are, where we've landed, and we try to make sure that the companies that we acquire have a cultural approach and a mentality that we think is going to be really compatible and fit well within what we're trying to build.

RD: Yeah. Thank you for listening, everyone. I've been Ryan Donovan. I host the podcast, edit the blog here at Stack Overflow. If you have questions, concerns, comments, topics to cover, please email me at podcast@stackoverflow.com. And if you want to reach out to me directly, you can find me on LinkedIn.

GJ: Yeah. Greg Jennings, again, VP of Engineering for AI at Anaconda. Ryan's been wonderful to speak with you today. If anyone would like to reach out and have a deeper conversation, I'm more than happy to do so. They can find me on LinkedIn or sometimes posting about AI things on X as well.

RD: Well thank you for listening everyone, and we'll talk to you next time.

[outro music]

Add to the discussion

Login with your stackoverflow.com account to take part in the discussion.