Latest / Agentic Conversations (formally mlops.community) / MLSecOps is Fundamental to Robust AISPM // Sean Morgan // #257
Transcript
- 0:00I'm Sean Morgan, chief architect at Protect AII.
- 0:03Take my coffee black, sometimes Americano, but black coffee
- 0:07works just as well. What is going on ML OPS
- 0:11community? We are back for another edition
- 0:14of the ML OPS Podcast. As usual, I am your host
- 0:19Demetrios and talking with Sean today.
- 0:22We're talking all things security, not just that boring
- 0:25type of security, not that DevOps type of security.
- 0:28We're talking ML OPS type of security.
- 0:31And Sean's coming at us. There's a whole other community
- 0:35out there. It's like our sister community,
- 0:36the ML SEC OPS community. So if you vibe with anything
- 0:40that's going on here or you want to know how you can be more well
- 0:44versed in your security when dealing with machine learning
- 0:48and AI, I highly recommend you go and check out the ML SEC OPS
- 0:54community. Feels like they may have gotten
- 0:56a little inspiration from somewhere familiar on the name,
- 0:59but I love it. I appreciate it.
- 1:02We tend to talk about security and security vulnerabilities in
- 1:07the ML OPS community. These folks talk about it all
- 1:10day and all night. And he brought up one security
- 1:14vulnerability around Ray that I'm not going to spoil anything
- 1:18right now. I'll let him talk about it.
- 1:21But if you're using Ray, just make sure you ain't got that
- 1:24shadow Ray going on. Let's get into this
- 1:26conversation. And as usual, if you enjoy this
- 1:34episode, it would mean the world to me if you can share it with
- 1:37just one friend. All right, real quick, I want to
- 1:39tell you about our virtual conference that's coming up on
- 1:41September 12th. This time we are going against
- 1:44the grain and we are doing it all about data engineering for
- 1:49ML and AI. You're not going to hear rag
- 1:52talks, but you are going to hear very valuable talks.
- 1:56We've got some incredible guests and speakers lined up.
- 2:01You know how we do it for these virtual conferences.
- 2:04It's going to be a blast. Check it out right now.
- 2:06You can go to home dot ML, OPS dot community and register.
- 2:13Let's get back into the show. So basically what I was just
- 2:23saying is I was at Cubecon in Paris a few months ago and it
- 2:28felt like every other booth or every 3rd booth was security
- 2:32related. And for some reason when we get
- 2:36into ML OPS as opposed to DevOps which is very cube carn focused.
- 2:41But this year as a little aside, if it was everything AI because
- 2:47it's the hottest thing out there right now, right?
- 2:49But for some reason, when we get into ML OPS, it is a little bit
- 2:56thrown on the wayside, I would say, And I don't know why that
- 3:01is. You've been talking to a tonne
- 3:02of people and you are spreading the good word about ML security
- 3:08or there's the dev SEC OPS and then there's the ML SEC OPS.
- 3:11I would say yeah, Why do you think that is?
- 3:15Why do you think people forget about security for the MLOP side
- 3:18of things? Yeah, I mean, there's, there's
- 3:20probably multiple factors there. I think, you know, the pace of
- 3:22innovation and AI machine learning kind of dictates that
- 3:26you build towards, you know, accomplishing things quickly.
- 3:30And you know, security is, is often one of the first
- 3:32casualties when, when that is a requirement of the organisation.
- 3:35Unfortunately you end up paying the, you know, the price later
- 3:37down the line. But I, I certainly agree with
- 3:40the sentiment that, you know, in MLOP's security is not ingrained
- 3:45in the same way that it is in dev OPS.
- 3:47And that's part of the message that we're trying to share with
- 3:49the ML SEC OPS community is about how you can integrate
- 3:52security into every phase of the model development so that, you
- 3:56know, at the end of the process, you're not simply trying to, you
- 3:59know, slap some security on a model that's about to get
- 4:01shipped into production. Yeah, that's so good.
- 4:04And what are some ways that you've seen things go haywire?
- 4:09Yeah, I mean, there's all different ways.
- 4:11So there are the kind of traditional threats that exist
- 4:14in DevOps, but also exist in ML SEC OPS.
- 4:17So specifically I'm, I'm thinking about like the supply
- 4:19chain here. There are all of the library
- 4:22dependencies that you're pulling in.
- 4:23You know, machine learning and AI is, is foundationally built
- 4:27on the open source libraries that we all use.
- 4:29But there's more with machine learning, there is the data sets
- 4:32that you're pulling in and the foundational models that you're
- 4:34pulling in. And you've gather these all from
- 4:37repositories that that make it very challenging for the end
- 4:41user to really, you know, attest to who made them or how they
- 4:45were made or, or scans for vulnerabilities.
- 4:48And it just increases the the attacks surface.
- 4:50So it it actually in in practise is is more difficult to secure
- 4:54the machine learning a life cycle, but but can be critically
- 4:58just as important if not more important.
- 5:00Yeah, It feels like going back to your first point, it slows
- 5:08things down considerably. If all of a sudden now you're
- 5:11thinking about, cool, I have X number of data sets and how can
- 5:17I ensure that all of these data sets are not going to make me
- 5:24regret using them, right. And nine times out of 10 or like
- 5:289.5 times out of 10, it's really not malicious at all.
- 5:33And, and you may not even know. This is another thing that I
- 5:36would love for you to speak to because I know that there are
- 5:39people doing this right now in the LLM training world where
- 5:45they're buying Common Crawl domains and then they are
- 5:50putting malicious stuff on there because they know that the LLMS
- 5:53are going to be trained with those Common Crawl websites.
- 5:58And so you've got to think about how do I even combat this and
- 6:06how do I, like you said, produce business value, but at the same
- 6:12time, don't commit a huge faux pas and do something that could
- 6:17really screw stuff up. Yeah, for sure.
- 6:20And I would say data sets, you know, kind of as you're calling
- 6:22out here are some of the most challenging ones to confidently
- 6:25say that this data set is secure because as you mentioned, you
- 6:28know, these are terabytes in size, often more.
- 6:31And, and to say that there is no poison data or no one that you
- 6:35know, snuck something in the common crawl, it is quite
- 6:37difficult to do. But at the minimum, what you
- 6:40should do is you should attest to how you're creating your
- 6:42models and what data sets are going into them in a way that
- 6:45allows you to remediate the problem if it become, you know,
- 6:49it surfaces in in literature that, hey, this data set
- 6:52actually had a problem. Are you able to go find which
- 6:55models, you know, you created with that and and and take
- 6:57appropriate actions? Is is just kind of the first
- 6:59step of a lung, you know, number of layers of the fence that you
- 7:02should likely do within ML SEC OPS?
- 7:05Yeah, that lineage it and it's so funny because it's not, it's
- 7:11not top of mind until something goes wrong and it's the same
- 7:15thing. I remember my first job in tech
- 7:17was AI was working for a password management company and
- 7:21the only people that wanted to buy password management tools
- 7:23really were folks who had problems with password sharing
- 7:29that went wrong. It's not like it's not, you
- 7:32know, the normal people were like, yeah, share my passwords
- 7:35or I just use 123456 and it's all good.
- 7:39I've never been hacked. It's the ones who have been
- 7:42hacked or who have had things leak that have problems and then
- 7:46they recognise the value of security.
- 7:49And the SEC OPS and the other piece on the data, which I find
- 7:55fascinating is that it could be totally malignant for so long
- 8:01and then out of nowhere it can come up if there's something
- 8:05hidden in that poisonous data or that toxic data, whatever you
- 8:09want to call it. I don't know what the technical
- 8:10term is for like tainted data that you've trained your ML
- 8:15models or AI models on it. It might come up later and you
- 8:20don't recognise it and then you have to go sifting through that.
- 8:24I just feels like a nightmare. Yeah, it, it, it's certainly a a
- 8:28risk, you know, for enterprises, but as as well as hobbyists, you
- 8:31know, that are doing machine learning.
- 8:32So with respect to, you know, what you can really do about it
- 8:36there, there there's different avenues of defence that you can
- 8:39put in. You know, I, I know there was a
- 8:41talk with ads Dawson from Co here.
- 8:43There are runtime protections that you can put, you know, at
- 8:45the inference endpoints and things along those lines.
- 8:48But the the kind of core principle behind ML SEC OPS is
- 8:52that there's no one fix to this problem there.
- 8:54There there's a life cycle that that happens as machine learning
- 8:57developing is done. And at every step within that
- 9:00process, security needs to be, you know, front and centre or at
- 9:04least a consideration and, and how you're going about obtaining
- 9:07data sets or or moving models productions or red teaming them
- 9:11are, you know, various different steps throughout that.
- 9:15Yeah. And you did mention there's this
- 9:18whole life cycle. How do you see it and what are
- 9:23the different security measures you could take for each step
- 9:27along the way? Yeah.
- 9:31So I, I think that there is the the model builders which often
- 9:37you know, can come compose of a different team than the ones
- 9:41that actually bring it to production.
- 9:43But within that area there there's all types of security
- 9:48considerations that you should should make.
- 9:49There is the, you know, scanning of static code the same way you
- 9:53would do in dev OPS, but also, you know, taking that a step
- 9:56farther and scanning your notebooks for for for API keys
- 9:59or anything else that may have that type of ability to leak
- 10:02this type of sensitive information when you commit it
- 10:04to a repository. You know, from there, there is
- 10:07the pulling in a foundational models, which is, you know,
- 10:10critical with an LLM OPS today. And there's a lot of different
- 10:15nuance involved in that. So their first step would be,
- 10:19you know, pulling from a organisation or, or, or a person
- 10:24that you could attest to actually built it.
- 10:27And that's something I'd like to talk about a little bit later is
- 10:30around, you know, open source tooling in order to sign your
- 10:33model to say that, you know, Meta created this model or, or
- 10:36some other organisation. And then the second aspect of
- 10:39that is, you know, how are you pulling in the model itself?
- 10:42When we look at, you know, models that are up on Hugging
- 10:44Face, it takes some time for the actual models architecture to be
- 10:49added to say like the Transformers library.
- 10:52And so when the state-of-the-art models come out, you know,
- 10:54often, you know, if you're using the Transformers library, you'll
- 10:57see kind of the use remote code equals true functioning
- 11:01parameter. When you pull a new model and
- 11:05and you need to understand, you know, what exactly are you doing
- 11:07there? You're basically saying there is
- 11:09a repository that exists out there.
- 11:11I am going to load that, you know, Python module, whatever it
- 11:14is, because I trust this source and you know, that's acceptable
- 11:19if you know, the source is actually the one that put it out
- 11:21and it's not some type of, you know, attack where they're
- 11:24pretending to be someone else or or or something along those
- 11:26lines. So we've seen this in the wild
- 11:29that there's good examples we can talk about, you know, people
- 11:31pretending to be different organisations on ugly face.
- 11:34And I think that the call out here is that the same types of
- 11:37attacks that exist on NPM or Pi, Pi, they, they exist on model
- 11:42repositories too. And so you need to be cognizant
- 11:45of that and aware throughout the process.
- 11:48OK, so that's the new AI world. You've piqued my interest.
- 11:57I want to go down this tangent of people impersonating
- 12:01companies or different organisations.
- 12:05And then I also want to go down the road of what do people need
- 12:08to think about with the traditional ML route.
- 12:10First, let's get into the juicy stuff.
- 12:12What happened? Yeah.
- 12:13So I mean you'll see this actively on Hugging Face there.
- 12:17There's published research with a number of sources here and
- 12:19majority of them are our security researchers kind of
- 12:22poking holes into the the model that people are using.
- 12:25And so if you go on Hugging Face right now, you know, as of the,
- 12:28the recording today and, and you look up Meta Llama, you know,
- 12:33Llama 3.1, you'll, you'll see the official model that comes
- 12:37from meta. But if you go and you look up
- 12:39Facebook Llama, the organisation instead of Meta Llama, that's
- 12:42actually a, a security researcher that's put up a, a
- 12:45separate model that's been patched for a security issue to
- 12:48prove this type of attack. And so often, you know, we hear
- 12:51from users that just say, you know, well, if you're pulling
- 12:54established models, like what are you really concerned about
- 12:57from an attack vector here? It's not that simple.
- 13:00There's very, you know, sophisticated and and clever
- 13:04ideas you can do in order to get people to, you know, copy code
- 13:07on the Stack overflow, pull the wrong model, and execute some
- 13:10bit of arbitrary code on your system.
- 13:14Dude, we're lucky that it's the nice folks that are trying to
- 13:20poke holes in this. I imagine if you get the black
- 13:22hats, there's probably, they're probably out there and you can
- 13:25probably know stories more than I do.
- 13:28But it's funny that it's like we're all so nice to each other.
- 13:32We're just poking holes in it just to show that there are
- 13:35holes. And when you get the black hats
- 13:38coming in, that's what we know. Yeah, we really.
- 13:41And again, like that's the hard part about security is that it
- 13:46feels like people don't take it seriously until they've got
- 13:50their company data held at ransom or until things are
- 13:55leaked. And then you have to go back and
- 13:57say, OK, we should probably invest in this.
- 13:59And even if they do invest in it, they probably aren't
- 14:02investing enough. Look like snowflake just got all
- 14:05their data leaked, right? That was fairly recently.
- 14:08And that caused whole world to hurt for a lot of companies.
- 14:11And so hi, it's, it's one of those ones where whatever you're
- 14:16investing in security, it's not enough.
- 14:19And I. Strongly agree.
- 14:22You know, it's one of those things where it's easy to kick
- 14:24the can down the road, but but it's really about investing in
- 14:27the, you know, products and, and services that are utilising for
- 14:30security, but also within your team and upskilling them and
- 14:34educating them about the risks and how to manage that and how
- 14:37to mitigate that and, and to implement these processes
- 14:39throughout the process. And and so earlier to your
- 14:41question about where do you implement these, these set these
- 14:45steps, you know, we talked about model development, but you know,
- 14:48the next part of that is you know, you're moving these in the
- 14:50model registries and then you're packaging them up into inference
- 14:53containers or are using inference servers and like the
- 14:55threats continue to persist throughout the process.
- 14:58And and what kind of threats are there?
- 15:00Yeah. So for inference servers in
- 15:02particular, what you are exposing is, is API endpoints
- 15:07for you know users that you think should be using it as well
- 15:09as users that that shouldn't be. And so if you look at some of
- 15:12the the recent CV ES around, like Pytorch inference server
- 15:16or, you know, MLOP, slightly different, but also has API
- 15:19endpoints, there is this ability to, you know, compromise the
- 15:24server itself. You can do things such as, you
- 15:27know, running payloads within the server, but also like
- 15:30network traversal. So like, you know, I'm able to
- 15:31compromise the server that's, you know, feeding the model to
- 15:36the user. And then I can move across and I
- 15:39can move across to say, the user profile that's able to make the
- 15:42models, which you know, by definition has access to a, a
- 15:45treasure trove of data in order to do that.
- 15:48So these personas that that do get targeted by machine
- 15:52learning, you know, attack vectors have very elevated
- 15:56privileges generally and and it makes them a very juicy target
- 15:58for the black hats that you that you're talking about.
- 16:02So you got any good stories? So there's been several models
- 16:06within Huggy Face that that, that we've been reported and,
- 16:09and taken down. You can kind of look at some of
- 16:11the threat research. There was a pretty widespread
- 16:16number of, of organisations that were being name squatted on,
- 16:19which I talked about before, everything from SpaceX 23andMe
- 16:23where they were uploading these type of models.
- 16:25And, and specifically, I believe the 23andMe one had the ability
- 16:29to basically scoop your environment credentials and push
- 16:32them to a server. So I mean, what payload these
- 16:35models can run is pretty much off to the the creator of them.
- 16:40At the end of the day, these are binary artefacts that are meant
- 16:42to execute something. There's nuance to the file
- 16:45formats that that enable different things.
- 16:47But yeah, it's it's an active threat in the wild for sure.
- 16:52Well, it also what you're talking about feels a lot like
- 16:58the end of the supply chain that you had mentioned.
- 17:05And so it's all right, cool, we've got the model.
- 17:08Now we're going to go and do stuff with that model and put it
- 17:10out there. And, and there's the other side,
- 17:13which if you're looking at the data side of things as you were
- 17:18talking about, all right, where am I getting this data?
- 17:20How do I know that it's good? What are some other pieces
- 17:24around that? Because maybe you're importing
- 17:27frameworks. I think I heard about something
- 17:29where they were saying the one of the frameworks that you could
- 17:33import was tainted or people were downloading something off
- 17:36of Pie Pie and it was turned out to be totally malicious.
- 17:39Yeah. So there was one might have been
- 17:42a year ago or so for PIE Torch actually, where there was a
- 17:46commit branch where you could see that they were going to be,
- 17:49you know, using another import as as a dependency of Pie Torch,
- 17:53but they had to get claimed the name for it.
- 17:55So somebody actually saw that ahead of time, they saw that
- 17:58they were going to be adding a new dependency.
- 18:00And then they actually went up onto π Pi and they and they
- 18:05claimed the name and they put up a malicious package there.
- 18:08Luckily, I think it only affected the nightly builds of
- 18:11of π Torch. But I mean, nonetheless, plenty
- 18:14of people install the nightly's and it was caught before, you
- 18:16know, a full release of π torch had had happened.
- 18:20But yeah, I mean, the, the, there's really a lot of ways to
- 18:24make this this happen. And, and in a space when open
- 18:26source is so critical for AI machine learning development,
- 18:30you know, that's a great thing that really enables this pace of
- 18:33progress. But we have to make sure that we
- 18:35secure it. And, and it's a, it's not just
- 18:38the security team's job to do that.
- 18:40It's it's throughout the life cycle of being cognizant of
- 18:43that. Yeah.
- 18:44And how do you generally go about it?
- 18:46Because I can imagine you, you and all the other security folks
- 18:51are seen as the party poopers and you want to like just rain
- 18:56on our parade all the time. Especially, as you so aptly
- 18:59mentioned, you kind of got to move fast.
- 19:03You want to be able to prove business value with your ML or
- 19:09AI projects. And a lot of times your ML
- 19:12projects are in exploration mode.
- 19:15It's not super clear if you've got that ROI there.
- 19:18You got to put it out and you got to test like you want to get
- 19:21something out as quick as possible to know if it actually
- 19:24moves the needle on metrics. But then you have to juxtapose
- 19:29it or you have to fight against the security team who's saying
- 19:34you can't just put that out there.
- 19:35What are you doing? So how do you navigate those
- 19:39waters of like pulling people back or letting them run freely?
- 19:45Yeah, I, I, it's a great question.
- 19:47I think it's funny that, you know, the, the assumption is
- 19:49that I'm from the security world.
- 19:51So, so generally I, I was a data scientist, I used to work in
- 19:53semiconductors. I used to do research on, on an
- 19:55algorithm. So I know the pain.
- 19:58I, I know the pain of, you know, what you're doing.
- 20:01Is it experimental work or perhaps you know, you finally
- 20:04really land that model that that is driving the business value?
- 20:08And then, you know, for someone to come in and be like, well,
- 20:10what was your security process? You know, like, can you, you
- 20:12know, give me a, a rundown of everything that went into this
- 20:15model is definitely cumbersome. And So what I think we need to
- 20:19do is, is, is meet in the middle on these type of tools that, for
- 20:23example, don't require, you know, much action or change from
- 20:28the end users. So there are, you know,
- 20:30different capabilities where you can have basically, you know,
- 20:35artefacts stores that have been kind of vetted or a walled
- 20:39garden of models that have already been approved by the
- 20:41security team perhaps. Or you can put, you know,
- 20:44proxies between the end users and hugging face so that the end
- 20:49user, the machine learning developers process doesn't need
- 20:51to change. And instead, you know, you can
- 20:54still give those kind of guarantees with, you know, zero
- 20:56code changes to the to the general process.
- 20:58So that's one example, but I think meeting in the middle is
- 21:02really a key part on on how to get these teams to collaborate
- 21:04well. And are you seeing folks like
- 21:10yourself understand or be better suited for positions like this
- 21:16because you have the knowledge of what the life cycle looks
- 21:21like from a data scientist perspective, From a, maybe it's
- 21:25AML platform engineer or someone who understands what it takes to
- 21:29productionize it, but they also understand the creation of the
- 21:34models aspect. Or is there a different persona
- 21:39like APM that can step into this role and, and constantly be
- 21:45recognising where there's threats, where there's
- 21:47vulnerabilities or if more questions need to be asked?
- 21:50Because it's, it's less about like, or from what I understand,
- 21:53right, is it's less about we can't do that.
- 21:58It's more about hey, let's make sure that we daughter eyes and
- 22:02cross our T's before we do that. Yeah, 100%.
- 22:06And so to the point of the question there, you know, what
- 22:09persona do I think is is best to run this?
- 22:12I think it varies. I think you kind of aptly call
- 22:14out that someone with a, you know, data science or machine
- 22:17learning engineering background certainly has the context into,
- 22:21you know, how iterative this process can be.
- 22:24You know, where the data sources are coming from, the models are
- 22:26coming from. And that enables them to really
- 22:29understand, you know, what points in the ML OPS life cycle,
- 22:32you know, should the security be implemented in?
- 22:36The flip side of that is, you know, something that we called
- 22:38out is it's not just unique attack vectors, you know,
- 22:40adversarial inputs, prompt injections.
- 22:42There's also the traditional supply chain and the libraries
- 22:46and, and other, you know, containers and things that
- 22:48you're pulling in, in which case, you know, a traditional
- 22:51Absec persona may have a really good grasp there.
- 22:54So we've seen everything. There's a kind of a growing, you
- 22:58know, push to these kind of AI security directors or, you know,
- 23:02team leads that that own this. Ultimately, I think it's about
- 23:06assigning ownership to someone and that's someone kind of owing
- 23:10how they're going to go about, you know, facilitating their
- 23:12team to do this. Do you have an area or a piece
- 23:18of that supply chain that tends to give the most headache.
- 23:23Yeah. So I think that today the
- 23:26easiest issue to call out is those model artefacts that, you
- 23:30know, when you typically work in an enterprise and you want to
- 23:32pull down like a binary artefact, there's, there's
- 23:34generally a process for it. It usually gets scanned, it gets
- 23:37approved by IT. But because of the pace of, of
- 23:40machine learning, like you generally just go to on your
- 23:43face or in your site, who, who is, you know, performing a very
- 23:46valuable service here. But at the end of the day, you
- 23:48need to understand what you're doing.
- 23:50You're, you're grabbing a binary artefact and you're pulling it
- 23:52into your enterprise and running it.
- 23:55So that's, that's one that I would say causes the most issues
- 23:59and most apparent issues for sure.
- 24:01But when it comes to processes like, you know, verifying that
- 24:05models are being signed and things like that, I, I think
- 24:09that that's coming on the horizon.
- 24:10We're starting to see this growth within like open source
- 24:15tooling and then OSSF and Linux Foundation where people are
- 24:18really pushing towards making this an easier process for you
- 24:21to sign your models to verify that they're coming from the
- 24:23source that you think it is. And that's where I see, you
- 24:27know, a current problem that may be alleviated soon.
- 24:30So very much looking forward to. That and are there other open
- 24:35source tooling out there that can help scan for
- 24:39vulnerabilities or help you like we were talking about with the
- 24:43data if you recognise or helping that whole data process to rip
- 24:48out different data sources if need be and clean the data
- 24:53sources or or any other mix of making sure that you have all
- 25:00those i's dotted and T's crossed like we were talking about
- 25:04before? Yeah.
- 25:06So, so I'll specifically call out kind of the model artefacts
- 25:08and then the the trained models and and what you can kind of
- 25:10scan there. There are tooling, some really
- 25:12nice tooling within Pickle Scan, which is designed to scan the
- 25:16default Pi Torch serialisation format.
- 25:19There is model scan that also supports Tensorflow formats,
- 25:22Caras formats that have these other known model abilities.
- 25:26And then as you go about creating the models there,
- 25:28there's open source tools like Garack and LLM Guard where you
- 25:31can actually, you know, scan these models for
- 25:33vulnerabilities. Look for things like
- 25:35hallucinations or, or other impacts that perhaps poison data
- 25:39training had on your models when it comes to scanning data sets
- 25:43itself. It, it is very much an academic
- 25:46problem. I used to work on a, on a
- 25:48research programme for DARPA around this type of aspect.
- 25:52It, it is very difficult. It is very difficult to say that
- 25:54that one sample within a, you know, TB file is going to coerce
- 25:59a, you know, false information or fake news or something along
- 26:02those lines. So I think to your point, like
- 26:05is that, you know, where the headache is within the data set.
- 26:08It could be, it could be down the line.
- 26:10And so we need to make sure that we're, you know, keeping that
- 26:13data lineage and pulling from trusted sources and, and making
- 26:16sure that, you know, copyrights are in compliance and all these
- 26:19other issues that that happened not just from poison data, but
- 26:22just from the sources that you're pulling from in order to
- 26:25get a model with efficient accuracy.
- 26:28OK, so I know you guys are doing a bunch of stuff at ML SEC OPS
- 26:33and you've created a whole community around it.
- 26:35I think in fact, that's how we met.
- 26:39I met somebody from the community in the Databricks
- 26:44conference last year and also our good friend of the pod in
- 26:48the ML OPS community, Diego Oppenheimer.
- 26:50He's very vocal about security vulnerabilities and when it
- 26:54comes to ML, and he had mentioned you all to me, and so
- 26:59it's cool that you're on here. What are you doing exactly
- 27:03though in the community? What are some things that if I
- 27:07went there and I wanted to poke around, what would I find?
- 27:11Yeah, I mean, you would find training material.
- 27:14So we have certificates that you can take and actually, you know,
- 27:16validate that your team is is aware of these types of issues
- 27:20and they understand kind of exactly how these can be
- 27:22addressed. We also have blogs, publications
- 27:26and community resources such as Slack channels where you can
- 27:29actually connect with other members of the community that
- 27:33that are taking this kind of security first mindset and and
- 27:36there's a lot to be learned there.
- 27:37So happy to hear you know the words getting around.
- 27:41That's super cool. Have you?
- 27:44What are some stories like? I know that with the MO OPS
- 27:47community, I get lots of stories of people asking questions or
- 27:51learning stuff or getting jobs, whatever it may be.
- 27:54What are some stories that you've got from the community
- 27:56and maybe that's them sharing that they were able to stop a
- 28:00security vulnerability or learn about something.
- 28:05What does that look like? Yes, some of some of my
- 28:07favourite shareings within the community are when people
- 28:09actually creating new libraries for these type of defences.
- 28:13So you mentioned, you know earlier what kind of open source
- 28:16tooling is in there. One of the kind of defences for
- 28:19LLMS is known as Visual LLM. And I saw a post first for that
- 28:24maybe six months ago in the MLOP Slack, Slack channel.
- 28:28And since then I've been, you know, following it actively and
- 28:30it's a really great programme. So amongst the, you know, shared
- 28:33research and, and, you know, ideas that people are, are
- 28:36sharing within those channels. I I'm a huge fan of people
- 28:39sharing their open source work and, and socialising that.
- 28:43Yeah, that's. Super cool to see that,
- 28:45especially if folks are sharing the open source work and then
- 28:49they get others from the community who jump on board and
- 28:53then you can all go and create something really cool together.
- 28:58Exactly, Yeah. And that that's kind of the
- 28:59goal. So yeah, sure.
- 29:01Nice. And have you seen where someone
- 29:08completely drops the ball? Like, what are some potential
- 29:11consequences if you just throw all inhibition to the wind?
- 29:16And you say, yeah, like this security stuff is cool and all,
- 29:20but we don't need it. And then it comes back to bite
- 29:23him in the ass. Yeah.
- 29:24So I think probably the best example of that I have is within
- 29:27Ray. So Ray distributed processing,
- 29:30you know, machine learning framework, great framework has a
- 29:33user interface and that user interface itself has no
- 29:36authentication. It is very easy to kind of spin
- 29:39up within your local environment and easy to think that it is
- 29:42simply, you know, a tool for you and nobody else.
- 29:46What we've seen is there was some, several reported
- 29:48vulnerabilities with Ray and then since then there's now
- 29:52active reports of Ray vulnerabilities where people are
- 29:55scanning the Internet to find these user interfaces which
- 29:59they're able to attack and, and do privilege escalation and
- 30:02everything along those lines. So I'd say, you know, issues
- 30:05like that where you, you think that the framework itself, you
- 30:08know, as hundreds of maintainers, everybody's paying
- 30:10attention to the security and you can trust it.
- 30:13They always have, you know, some other aspect of them that that
- 30:16likely is getting looked at less, such as a user interface
- 30:19or a web interface. So it it's very important that
- 30:22we look holistically up at what these kind of libraries are that
- 30:25you're pulling in and how you're using them.
- 30:27Tude and Ray's got like $100 million company behind it for
- 30:32sure. And remember the last round that
- 30:34any scale did was really big and that is wild.
- 30:40I had no idea. So anybody out there that's
- 30:41using Ray, look at your user interface and what can they do?
- 30:46What is the patch or? Yeah.
- 30:48So if if you read the documentation thoroughly, you
- 30:50know they will specifically call out how you can set up the user
- 30:53interface so that it can only be contacted by your local host.
- 30:57The problem is, you know, not everybody reads the
- 30:59documentation thoroughly and and so many people use Ray that this
- 31:02actually manifests as as an open problem.
- 31:05And it actually was known as kind of the 1st attack on AAI
- 31:10workloads that is being actively explored in the wild.
- 31:12It's not a shadow ray. You can, you know, do a bit of
- 31:15research on your own, but there's been several
- 31:17publications about it. So yeah, it's not just, you
- 31:21know, small libraries that that don't have the funding behind
- 31:24it. It can be the large critical
- 31:26infrastructure pieces as well. And again, you know, it's
- 31:30important that every team member, everyone who may want to
- 31:33spin up a user interface, is aware of what type of security
- 31:37risks can exist. I will give it to him.
- 31:40Shadow Ray is a great. It is.
- 31:43I really like that. That might, that might have
- 31:46something to it. We might need to make a shirt or
- 31:48something for that shadow ray. So what are some other ones?
- 31:52What are some like? Are there common vulnerabilities
- 31:55or flaws in other projects or open source tools that I may be
- 32:00using besides the ones that we're talking about with, like
- 32:03the models being impersonated or the model organisations?
- 32:07For sure. So ML flow is is probably one of
- 32:09the most actively. Heavily used.
- 32:13Yeah, heavily used and also one of the most actively, you know,
- 32:17calling out systems, especially the open source version for
- 32:20vulnerabilities. Now the data Bricks team is
- 32:22fantastic about patching those vulnerabilities and get them
- 32:24updated. But if you just search for CV ES
- 32:26for ML flow, you'll see a number of different ways in which you
- 32:29can, you know, say log a model to the registry and instead
- 32:35actually write a file to their disc.
- 32:37And then once the files written to the disc, when they get a
- 32:40load up a bash shell, you can actually make a remote code
- 32:43shell for the attacker. And and at that point you're
- 32:45completely compromised. So there's numerous MO flow,
- 32:51other abilities, specifically on the server itself.
- 32:54That's where we see a lot of these coming from.
- 32:56When you have these exposed endpoints, that is where you
- 32:59know, hackers really, you know, make their money is when there's
- 33:03an easy means to access something.
- 33:06You know it helps the machine learning developer, but it also
- 33:08helps the malicious actors. It's that low hanging fruit we
- 33:12always love to talk about. Yep, for sure.
- 33:16The attackers are no different than us.
- 33:18It's like how much can I or how little can I work and how much
- 33:22can I get from that little amount of work, right?
- 33:25So absolutely, I mean, they're they're, they're not in the
- 33:27business of doing more work for the same result.
- 33:29So yeah, that they're looking for the ways to attack in.
- 33:33So explain that a little more because it feels like it could
- 33:36be generalised where it's on the server, it's the endpoints on
- 33:40the server, So what else? Or how can we generalise that
- 33:44just to make it so that in case maybe there's some, we're not
- 33:48using ML flow, but we're using another tool and we want to make
- 33:51sure to cover for those vulnerabilities also?
- 33:54Yeah. So I would say one of the
- 33:56primary things you need to do is, is, is you know, continuous
- 33:59or frequent patching like these vulnerabilities do get found.
- 34:03The company that I work for actually runs above bounty
- 34:05programme where we pay researchers to find these type
- 34:08of vulnerabilities, but as well as the maintainers to fix them.
- 34:11And So what you'll see is that these often are identified and
- 34:15they do get fixed. But updating your ML flow server
- 34:17is not something that you know, is a a common practise, you
- 34:21know, throughout the week. And so once these
- 34:24vulnerabilities are known was the CVS are published, everybody
- 34:27in the world knows about it or can know about it.
- 34:29So at that point you have a vulnerable server that the
- 34:33entire in a Black Hat community knows is vulnerable.
- 34:37Getting those servers patch is critical.
- 34:40So you want to make sure that you're you're doing that
- 34:41appropriately. Yeah.
- 34:44I guess the key is that if you find the vulnerabilities, if the
- 34:49payout for that is nice, then you're not going to be thinking,
- 34:54all right, well, let me just do something illegal and try and
- 34:59get more money than I would get from exposing this
- 35:02vulnerability. Yeah, for sure.
- 35:04I mean, I think bug bounty programmes have had a measurable
- 35:07impact on, you know, a number of people that may have went down
- 35:09the wrong pathway in life and found a way to make a a very
- 35:14sizeable living, you know, reporting uses as white hat
- 35:16hackers. So I think for sure that's been
- 35:19a big impact. Yeah, I'm glad.
- 35:21I have no idea how to even start with this because then it's just
- 35:26like one less thing that I have to worry about.
- 35:29I would get, I would go down rabbit holes and it would not be
- 35:32good. So.
- 35:34At least get a temptation for sure.
- 35:36Yeah, it is. It is definitely a temptation.
- 35:39We've been talking a lot about model vulnerabilities and what
- 35:42happens when the models out there.
- 35:43And that is very machine learning.
- 35:47But then there's just like the data stuff that's happening
- 35:52before this. And I can imagine there's a
- 35:55tonne of vulnerabilities there which may or may not play into
- 35:59the ML part part of things, but they're also just as important,
- 36:03right? Yes, for sure.
- 36:05I mean, you know, the, the models are a function of the
- 36:07data that that trains them. And so when you look at, you
- 36:10know, the, the data op space and you look for, you know,
- 36:12distributed scanning of, of personally identifiable
- 36:15information or, you know, bits of samples of information that
- 36:19may be incorrect. It it absolutely leads into, you
- 36:22know, the, the rest of the process.
- 36:24So I, I would say data OPS is, is, you know, within the ML SEC
- 36:28OPS domain, it does go end to end.
- 36:30It does have specific challenges with respect to scale and and
- 36:36how you are going about protecting that.
- 36:37But that's something that, you know, I'm really excited to see
- 36:40where that goes in the next, you know, five years or so.
- 36:43Because simply, you know, legal entities that are now, you know,
- 36:48coming after model foundational model training and, and, and
- 36:52fine tune models for copyright infringement and stuff are
- 36:55starting to put this emphasis that, hey, you know, the data
- 36:58lineage that you put into it, as well as the process that you go
- 37:01through and vetting it is coming into the spotlight.
- 37:03And, and nothing makes people you know pay attention more than
- 37:06either illegal challenges or security breaches.
- 37:09So, so good. That is so true.
- 37:13Oh man. So any before we go like any of
- 37:20your own stories on how you potentially learn the hard way
- 37:26and what what you learn from that first of all and then what
- 37:31happened. Yeah.
- 37:33So, so one thing that I would say, you know, back when I used
- 37:36to kind of consider, you know, security aspect with respect to
- 37:40the data that I was pulling in or the models that I was using
- 37:42was when it came to inference time, I would typically, you
- 37:46know, be looking for infant servers or even, you know,
- 37:49package containers that were ready for this process.
- 37:53I, you know, I at the time, I wasn't very much interested in,
- 37:56you know, the distributed inference that that that goes on
- 37:59with an enterprises. And So what I found is that, you
- 38:02know, those containers that you pull, you know, from cloud
- 38:05vendors or or other may not be as secure as you think.
- 38:09And So what I would recommend is, is you know, at any time
- 38:12that you can to scan those containers for vulnerabilities
- 38:16within the libraries contained in them.
- 38:18You often don't need a novel system for this.
- 38:20There's a lot of open source tooling like trivia and others
- 38:22that can scan containers. And you need to understand that
- 38:25that aspect of the integration as well.
- 38:28And and so in my past I I had worked as someone who assisted
- 38:33with enterprises deployments. So then to recap, I think one of
- 38:39the biggest things and the easiest things that we can start
- 38:42doing right now if we are not is scan everything.
- 38:47Yeah, take 0 standpoint. Yeah, that feels like if you're
- 38:51not doing that and maybe you think you are, I feel like
- 38:54there's probably a lot of times where, because, as you're
- 38:58saying, there's not really clear ownership on this.
- 39:03Sometimes you think it's been scanned potentially, or you
- 39:08think that, yeah, after I hand this off, it will get scanned,
- 39:12That's what the security team is for or whatever.
- 39:14And so a lot of times I can imagine, again, this is my
- 39:18little fairy tale fantasyland, which we learned earlier isn't
- 39:23the most accurate because I thought that the data was a base
- 39:25headache. But in my little fairy tale
- 39:27fantasyland, it feels like it can be organisational issues
- 39:34just as much as the technical issues.
- 39:36And if you're not communicating, and if you don't have that odour
- 39:38saying this is what we need to do every time, or here's the
- 39:44process we need to go through, then you can let things slip
- 39:49through the cracks. Certainly.
- 39:51Yeah, you know, it's, it's very easy to to assume that this it's
- 39:54somebody else's job. And so when you have that clear
- 39:57owner, they can not only take, you know, responsibility for
- 40:01making sure that that the process is vetted and running
- 40:03smoothly, but also to make sure that it's not, you know, too
- 40:07much of A burden that the pipelines that are being
- 40:10utilised for deployment or, or registry models into your model
- 40:14registry include these scans without the need for every
- 40:17single user to have to go through the process of scanning
- 40:20it themselves, just simply when they do the.
- 40:22Find process, it happens behind the scenes and I think that's
- 40:25ultimately where you wanna move your organisation to.
- 40:28So #1 rule scan everything number two rule.
- 40:32Well number one rule have somebody that owns this number
- 40:35two rule scan everything. Create the processes to scan
- 40:38everything. Number three rule.
- 40:40If you're going to use hugging face, maybe think about what
- 40:44were you saying use proxies for it.
- 40:46That could be a better. Word that can that can do the
- 40:48scanning for you at intercept the traffic and and hugging face
- 40:50does a great job of scanning models.
- 40:53They they're continuously improving that they they have
- 40:56antivirus scan they have the pickle scan that I mentioned
- 40:59earlier. So you know, beyond just go
- 41:04looking for solutions to solve this for you, go to the hugging
- 41:07page, fade hugging face page itself, look at the banners,
- 41:10check for how the scans were performed and what the results
- 41:13were, which is often a step that that most people kind of forget.
- 41:17Yeah, I can't tell you how many times I've just downloaded
- 41:19something. Didn't look at anything.
- 41:21Just in like, Oh yeah, this is it.
- 41:22That's what I want. All right, cool.
- 41:24Yep. Happy and paste yes.
- 41:28In hindsight, it is incredible that nothing has happened to me.
- 41:34Let's knock on wood. And that's what I imagine a lot
- 41:37of people that are listening are thinking that same thing too.
- 41:41Yeah, for sure. And you know, security is one of
- 41:43those things that you you have to get out of.
- 41:45You don't want to wait until something bad happens and, and
- 41:48you want to, you know, find a way that it is it overly
- 41:51burdensome. So there's processes that we
- 41:53talk about on MLSAC OPS about how you can integrate this
- 41:56security without it being overly burdensome.
- 41:59Yeah, yeah. So last key takeaway, if you're
- 42:02using Ray, make sure that you are not doing what was it
- 42:06called. I can't.
- 42:07Remember the name Shadow Ray? Yeah, having you.
- 42:09Yeah, what a good name. How did I forget that?
- 42:11That is so true. Do not do Shadow Ray.
- 42:13If you are using Ray, just look up Shadow Ray and make sure that
- 42:16you're protecting against that. Dude, this has been great.
- 42:18Sean, I appreciate you coming on here.
- 42:20Yeah, of course. Thank you very much for having
- 42:22me, Demetrios.