06:00 UTC Charta Aetatis Cyberpunk

Console Newsletter Pro Sign in Early access Register
Aa · Display
Themes
Type size
Density
Cloud & Identity · Cloud Security Podcast by Google · · 37:30 runtime

Software Engineering vs. Software Craft: How Google Scalably Eliminates Classes of Vulnerabilities

In the wiki Google
Transcript 6903 words · auto-generated captions

Machine-transcribed by YouTube. Expect errors in names, commands and version numbers.

[music]

>> Security. >> Hi there. Welcome to the Cloud Security Podcast by Google. Thanks for joining us today. Your host here is ever, myself Tim Peacock, a group PM on Google Site Ops, and of course Anton Chuvakin, a former analyst and now senior staff in Google Cloud's office of the CISO. You can find and subscribe to this podcast wherever you get our podcast, as well as at our YouTube channel, youtube.com/atcloudsecuritypodcast. If you enjoy our content and want it delivered to you piping hot every Monday, please do hit that subscribe button. Follow the show, argue with us and the rest of our Cloud Security Podcast listeners on our LinkedIn page.

Uh Anton, what are we talking about today? Other than of course how cute Waffles >> Yes, [clears throat] uh Waffles is kind of mind-blowing and I was just seeing his ears peek out from the end of the frame, and I feel like that sets the that will set the show in a really right tone. Yes. >> Yeah, right? Yeah, everybody loves Waffles. Listeners, if you love Waffles, drop us a chat that you love Waffles. >> Yeah, that's that's that's going to be useful. And I feel like uh we'll know which ones of you listening for the dog, and which ones are for Tim, and maybe there are some for the reformed analyst.

>> I don't know. Maybe some. >> We can we can debate that. >> So So today's guest though, today's guest, they were talking about the elimination of cross-site scripting vulnerabilities, and it gave me a flashback to uh my junior year at Brown when I was in a security class and we were learning about uh different classes of vulnerabilities over the years, and we had to work so hard to find a flavor of Linux which actually still allowed you to commit a buffer overflow. And the idea that just, you know, 15 years later we'd be getting to the point where that was the case for browsers and cross-site scripting is kind of mind-blowing that we've come so far so quickly.

>> I I mean, I feel like to me I had a different flashback. I had a different flashback to when I mean the phrase eliminate whole class of vulnerabilities has been copied from Google document to Google document probably for way longer than I was here. Like, I don't know, about 10 years, but I I won't be sure for a long time. More than 10 years. It's a long time. And we

simply treated as math. There's a set of classes, certain classes got eliminated, we don't have them. But when we present or mention it to the outside, people say, "Oh, yeah, your marketing department wrote it." And we're like, >> No. >> "What do you mean?" Like, that's kind of a fact. And there's a like and they basically go through this list and people just look at us really funny. And then now when Heather says, "Hey, actually with help of AI we can eliminate a lot more classes and probably dramatic set of all classes of all the vulnerabilities will just be gone." People just like get really upset and and think that we are making stuff up or we don't know what we're talking about.

And it's just for us it feels like more of a gradual progression. And I think a lot of what the guest would talk about predates AI by by many many years.

And so it's sort of like for us the fact that we can get together and eliminate certain violence from code forever feels normal. But for the outside world it feels like those guys are crazy. And that to me is the biggest find discovery from today. And all of this predates AI by the way. >> Oh, way predates AI. Listeners, to give you a sense of context, I have a six-digit long employee ID. Our guest who's about to come on the show has a four-digit employee ID. And so maybe without any further ado, let's turn things over to one of our not quite our most, but one of our most tenured guests of all time.

And with that listeners, I'm delighted to introduce today's guest. Today we are joined by Christoph Kern, a principal security engineer here at Google who says he's been here a very long time. Christoph, thank you for joining us today. Google, I think a lot of people don't understand the extent to which Google, and hopefully through the show they they've started to we are a security company. And one of the ways in which we're a security company is the philosophy of secure by design and how that's permeated so much of our culture. And one of the things that I think has been talked about a little bit, but I want to talk about today is how with, you know, the the growth of, you know, AI-powered coding, how we're shifting from uh detecting vulnerabilities to eliminating classes of them. How does How do we do that? What does that mean?

That sounds very fine and sky, but make that real for our listeners, please. >> Yeah, so it's it's interesting. Um I mean, this is something that we've actually been doing for like much longer than AI appearing on the horizon, right? This goes back probably 15 years at least. >> a long time. >> And um but it is now, I think, paying off more than ever uh due to the um you know, arrival of AI and uh AI being part of like the um yeah, uh the development life cycle and ending up, you know, writing more and more code that uh humans have less and less bandwidth to really review and understand in depth, right? And so, um being able to have high confidence that this code actually adheres to critical security invariants without having to read it is very, very important.

>> As I was saying I >> Yeah, it always [clears throat] always was important because, you know, humans make mistakes when they code and AI makes mistakes uh when it or they code. And so, um really the the situation hasn't actually changed that much. It has just sort of scaled up in in in in the emergency of of being able to do that. >> So, then pre-AI, what were we doing 15 years ago to eliminate classes of vulnerabilities? >> Yeah, yeah, so so I mean, essentially we've realized that there is uh common classes of problems. You can see this like the the CWE, they have like these top 25. You've probably come across these, right? And uh if you look at them over the years, uh it's always the same usual suspects, right? There is classes of defects of security defects that continue to appear over and over and over again, and we don't seem to be able to get rid of them using the approaches that we've taken before, which is, you know, testing and code review and static analysis and and

sort of basically all approaches that are centered around finding defects after they've been introduced, right? The code gets written and then afterwards we try to find all the problems in it before we ship it. And that turns out to be a losing proposition for many of these classes of defects, which is really, you know, just there in the data. We can we can see that these these problems have continued to appear and and have been with us for like literally decades, right? And so what we've kind of over the years realized is that we kind of need to really understand why these problems occur and why why these defects are getting introduced and

what we can actually do about it. And the the intuition is essentially that the root cause of these defects is in

sort of risky programming constructs that we ask developers to use over and over and over again very commonly when they're writing application code. And they're risky in the sense that if you're not very careful to ensure that

this particular primitive's security precondition is or a correctness precondition is satisfied, you have some kind of undesirable or undefined behavior that often results in a security defect, right? So to make it concrete, like every time in C or C++ you're dereferencing a pointer, it is your it's your as a programmer it's your responsibility to ensure that when execution gets to that point, that pointer is valid, which means it is actually, you know, pointing to valid allocated memory of the right type or that contains data of the right type and uh uh in the range of the allocated region, and that memory hasn't been freed by some other part of the program.

Um this gives you very many um you know,

opportunities to make >> a lot of conditions in there that you rattled off. [laughter] >> And the use of these risky statements is very common, right? Like if you look at there's pointers everywhere, there's array de- de-references. In C, they've even made it potentially undefined behavior to add two integers, which is sort of like >> [laughter] [clears throat] >> uh you're like, "Why?" But I mean, there's good reasons, uh performance uh primarily, but um in hindsight, this was probably not a not a good choice, right? And so, anytime you write code that uses one of these uh operations, it's your responsibility to make sure that its preconditions are satisfied, and they're very complicated. And moreover, whether or not those preconditions are true, very often it's not something you can decide by just looking at the surrounding code. In some cases, you can, because there's like an if statement right before that checks the precondition, but in many cases, that precondition gets established sort of by the program as a whole, right? So, in particular, when you're looking at pointer lifetimes, whether or not that pointer is is valid at this point in time uh kind of depends on not there having been some other part of the program that has de- de-allocated since, right? And the owner, the sort of the module that might own that pointer that is responsible for the object's lifetime, is not the code that you're usually working with, right? It's some other part of the program uh that you have to trust to not have to sort of pull out the rug underneath of you, right? And that is just extremely difficult, right? This is like an almost impossible task, which is why >> you're describing this makes me think, let's just not write C code anymore.

>> Exactly, right? And so, uh so basically, what we what we sort of learned over the years is that uh that we're in many cases asking developers to write code in sort of an almost it's it's a like it's a game you can't win, right? It's an impossible [clears throat] ask essentially. And so the the fundamental shift that we need to take or have been taking is to to change that model into one where these risky operations are hidden away in safe abstractions such that the developer when they're writing most of their application code very rarely if ever encounters the need to use these kinds of risky operations.

Rather they get safe operations that are essentially safe in any valid use, right? So in any any time you use the safe abstraction around the risky primitive, you're guaranteed by the type system and by the implementation of that primitive that that the behavior is well-defined and nothing bad will happen for, you know, reasonable definitions of bad, right? >> So while I want to ask a question about how this affects real developers, I want to ask a follow-up to what Tim asked actually. I I here at Google and again my tenure is much shorter than yours and I still have heard the line eliminate the whole classes of vulnerabilities. And when I use the same line with people outside, they automatically assume that marketing invented it. But marketing did not invent it, engineers did.

>> Yes. >> And it's it's really it it gives me like a really odd vibe because when we say

"Hey, these are vulnerabilities. They have classes." "People's code have many of those classes. Our code does not have some of the classes." It's a very factual statement and here at Google and again I'm not an app sec person. I'm not I'm not tired of repeating this to people. I but even I understand that to us it's very factual. Here's the 10 classes. Here's Google code. Whatever number of classes are there, whatever number of classes is not They're eliminated. It's a very black and white contra high contrast factual statement. Yet, people on the outside kind of say, "Oh, yeah, yeah, yeah, yeah, this is marketing. You can't possibly mean that." But, we absolutely do mean that, right?

>> Yes. Yeah, and I think I think um this is sort of a mindset shift that really actually took us a long time to get to, right? Like so, I forget exactly when it was. At at one point uh in my career, it was like in the mid-2000s, I contributed to a book about uh software security, and I wrote the chapters on how to um how to deal with some of these classes of vulnerabilities, like cross-site scripting and SQL injection, right? And I basically wrote the chapter exactly in the way that I just said we shouldn't do, which is to tell developers, "Here's like, you know, 16 different things you have to be careful about, and you just have to be careful about them always and not make a mistake, right?" And so, uh this I I In earlier in my career, I had that same kind of thinking, right? And I think it does take um it does take a sort of a

mindset shift to um to get to the point where you you kind of realize that it's actually possible and very cost-effective uh and still ergonomic for developers to

build um developer platforms that really like actually just don't let you make that mistake without getting into your way, right? And that's sort of like the navigating that um that that trade-off here between between imposing friction on developers that is irksome and something you really, you know, don't want, and uh and uh

ensuring these correctness invariants uh with high degree of confidence is is is not that straightforward, right? And it took I mean, I think the industry quite a while to get to, right? And um >> Why did it take us a while to get there? Isn't it kind of obvious that we should do this? >> No, yeah, yeah, but it's obvious we should do but nobody nobody is doing it. >> But how? >> But how? Yeah, it's about how. Yeah. >> Exactly. So, the challenge is in doing it in a way that is both ergonomic for developers and performant, right? So, for instance, for memory safety, we've had memory safe languages for a long time, but they all relied on garbage collection, which is pretty significant overhead, right? And only in the last

like 10 years or so, we have a production language that allows you to obtain the performance of an unsafe language like C and C++. with the safety of a memory safe language, right? Of like similar safety to a garbage collected language without the overhead. And that's something that really came out of research that was like in the 2000s, right? Like there was a research language called Cyclone that I think was still being worked on in the in the mid-2000s that sort of laid some of the foundations of what made it into the Rust type system that actually lets you have these properties through static type checking and and through properties of the type system itself. And so, this is not nobody just knew how to do this in a in a reasonable and ergonomic way in the like mid-90s, right? It just didn't >> So, so the challenge was it's actually just genuinely hard to do this technically.

>> yeah. And then making it work conceptually. >> Yeah. >> So, it's conceptually hard and then >> Is it conceptually hard? Wait, wait. Conceptually hard or operationally hard? >> It's both. >> I really don't like the problem that they conceptually hard or operationally hard. I I prefer conceptually easy or operationally hard. Yeah, but this conceptually hard. Can I please go home? >> Well, I mean, you know, now we know. We've developed the patterns, right? But before these before these patterns existed, there was really no nobody knew how to build a developer platform and language that gave you the safety properties without being extremely cumbersome to use, right? And so, this this basically is just something that took research in programming languages and and experience in applying

applying the the learnings from research from Greenfield research into industrial languages. Um and and then, you know, making it ergonomic, making it easy to use, making it friendly to use, having compilers with good error messages, and uh and then, you know, like deploying this in a large organization with tens of thousands of developers without causing a lot of friction and overhead and cost. Uh there's a lot of things we just had to learn over the years, right? And and it took really It was probably like a like at least 10-year 15-year journey to get to the point where we kind of feel like, yeah, now we we have we know how to do this for most of these common types of problems that we encounter in in in software development.

And by the way, not They're not all security problems, right? There are there other kinds of hard to um hard to deal with defects such as, you know, things that you sometimes would call like a Heisenbug, right? Like you have a concurrency defect that that you just cannot reproduce on in your developer environment, and it just happens every now and then in your production environment. Those are really painful to deal with, and they're a similar kind of problem, right? That that is something that can just very occasionally occur in certain states of your software. And um in this case, it maybe doesn't have security implications. It just has availability or or, you know, reliability implications. But it's a similar kind of thing. It's a defect that is very very costly to deal with once you ship it. And uh and it is very desirable to

design your software and build your software in ways that uh you can be quite confident are free of these defects, right? And so, um I think the that that sort of approach to building software that's just much more methodical and rigorous This something that uh you know, you can genuinely call software engineering versus, you know, software craft. >> [laughter] >> Right. >> And uh and uh I think we're kind of basically learning how to do this in um in cost-effective ways in sort of large-scale industrial-size development, right? Like for things like avionics, um this is probably something that's been used much more commonly, uh but but that's a that's a very very different type of software. It's it's very expensive >> Yeah.

>> for their size and complexity of what it does, right? But it's also, you know, obviously important, and so people do it. But for something that is um you know uh let's say consumer-facing software that's uh developed at a much higher velocity at a much much larger scale, uh you just can't use these SDLCs that you would use for, you know, safety-critical software. It's just too uh too slow and cumbersome. So, you have to think about how you >> eight lines of code per developer per day. >> Yeah, yeah. It was this late that that came kind of heather, but it just stuck in my It's burned in my brain, not just stuck in my brain. This whole eight lines of code per developer per day thing is just like I can't get out of it. I can't [laughter] get rid of it.

>> Yeah. So, uh speaking of things that we can't get rid of, uh you talked about in in this and elsewhere security invariants, like all network traffic must be encrypted. How does Google at industrial scale decide which invariants are worth enforcing and which, you know, should be framework versus application? Like how do we how do we do that industrial scale? >> Yeah. Yeah, so that's a very good question, right? I So, one of the benefits that that a large uh organization like Google has is that um many of the things we do in the developer platform uh to improve the outcomes, uh the quality attributes of the software that comes out of it, uh get amortized over a large number of applications, right? So, we have, you know, thousands of web front ends, and so if we build um uh safety and uh

correctness, security, privacy, reliability, and you know, internationalization primitives into the developer platform for web applications. Uh the cost of that gets distributed over, you know, uh thousands of of instances of those applications. So, that that's one one way of making it very cost-effective. And then that leads into the decision of what you actually lower into the platform. Uh there's sort of this concept of shift down, right? Like what um what is most profitable and and um there's sort of two aspects to it. Like one is it's a property that um that is relevant to the class of applications, right? So, a property that is relevant to all my front ends, irrespective of exactly what they do. Uh and uh it is something that that is uh

actually implementable in the platform level that can be sort of uh can actually be shifted down into the platform. Some properties are my harder >> worthy and possible. >> Exactly, right? And and um and so then when you have both, then it it's uh it's a And then also, you know, it it matters whether or not it's a very common problem, right? Like so or a very important problem. It could be uncommon, but very bad when it happens, uh which makes it important. Or it could be a thing that just deal with very frequently and therefore and not that bad, but it still makes it uh makes it worthwhile to uh to address and and uh and get rid of, right? As a as a or or a Well, I mean it's it's the getting rid of the problem is sort of the ensuring of the invariant that implies that the problem is not there, right? There's sort of two sides of the >> We uh one one of my teams early in Google was an early develop uh adopter of the Bock framework.

>> Mhm. >> And at first we were totally baffled by it and found it to not be especially ergonomic. And then after about 2 weeks, we were all like, "Whoa, this solves so many things we no longer have to even keep in our mental swap space. This is so worthwhile." Uh and so it must be really interesting to work with teams early in that in that journey. Huh? >> Exactly. Yeah, and so I think what I think what matters there is whether or not the developer platform and I I like to kind of use an expensive view of that, right? It's not just the production platform, it's the the the tech stack like application frameworks like what you mentioned Bach and the tool chains, the code repository, your your CI/CD pipeline, all those things. They all work together >> Yeah.

>> to inform the outcomes in terms of quality and and and correctness and scalability of the software that you're building, right? And so what is I think very important is whether or not the platform that you're using is actually tuned to the type of application you're trying to build and you're not chasing at it, right? And so the trick is basically to find ways to build platforms that are that actually match the requirements of the types of applications that people want to build and and you know, hopefully you don't have too many variations of that, right? >> So so Google can amortize the cost of developing this stuff over thousands of teams building software. How can not Google, who are most of our listeners, think about adopting some of this? Like how should a random company that doesn't have its whole business building software, but actually builds pharmaceuticals or tractors or financial products think about something like this?

>> [gasps] >> Yeah, so this is interesting. I think I think there is there is some you know cause for optimism I think because in the last >> involve two letters, AI or not? >> Well, it does and it doesn't, right? So the the interesting thing is okay, I'll get to the AI, right? I think what what has happened is that this way of thinking about how you build software in an industrial setting at scale and reasonable cost effective cost effectiveness has has really evolved and we we now see large adoption for instance of rust in the it has a very vibrant community that really cares about the this concept these concepts that are talked about they're like to me they seem like they're very well understood in the rust community they're basically like yeah this is obvious right you don't need to explain this to me. And in fact I'm I'm very happy to see that the things we came up in terms of how we for instance address vulnerabilities and classes of problems for web applications they really have a a really nice conceptual analogy to how the rust community thinks about memory safety and they're they're they're really in if you if you look at it from a certain perspective they're very very relatable and so this is a and this these have evolved independently so it's a kind of a nice um I guess support for the idea that we're sort of on on on a on a good track here and then you know for instance for web security we've we've we've actually been able to externalize some of the work we've done originally internally in our mono repo these concepts of using types to ensure that injection sinks can only be reached by values that are actually safe to send there is now built into the web platform right so we were able to to work with browser vendors

we started with Chrome obviously because it's it's part of Google and we have good relationships there but this has been now adopted by all the major browsers and you can use this as a as a developer to

effectively harden your application and make sure this gain high very high confidence that your web application is free of cross site scripting and it it embodies these these these ideas Uh so this is now part of our platform. You can use it and and many of the popular

web application frameworks like Angular and React are compatible with it or interoperable with it. You can use it with those. So So that's an example. So I think you know you can you can go a fairly long way by using one of those stacks for your web front ends and and using a memory safe language for your server-side infrastructure and um they're I think more and more elements of this that are becoming readily available. One one interesting thing is you know we thought about like why don't we actually publish a open source version of something that we've built here and I think it has not happened and may not work because of what I said earlier is that that these platforms need to be tuned to exactly the type of >> [snorts] >> your style of application development in your organization. Otherwise you'll chafe at it, right? So they basically almost by necessity they they achieve their quality outcomes by being opinionated and the opinions of the platform need to align with the needs and the opinions of the developer community. And so you you probably actually would find it very difficult to build a opinionated secure developer platform that works for everybody.

What is however I think feasible is to have platform components like you know a

web web front end framework for instance that are combinable in opinionated ways

and and achieve these outcomes, but it can be done. You basically kind of need a small platform team that does this for you, right? Like and this could just be like a slice of one person if you're a small shop, but you need somebody to think about how do I assemble a developer platform for my needs for my organization's needs that that has you know the opinions that um imposes the opinions that achieve these outcomes. >> On on that opinionated platform front, it's very interesting to compare the trajectory of something like App Engine, which is highly opinionated, with say Kubernetes, which is also highly opinionated, but looser in how you can interact with it. And how those two have for external adoption had very different trajectories.

>> Right. >> I think opinionated though triggers some people, right? Because they they they both positively and negatively, right? I mean, people show up and say if this code has a vowel, my compiler refuses to work for you kind of stuff. Like like you're you're defending a point about security issues should be like defects and code shouldn't compile if it's not secure. I mean, it's like strongly opinionated down to basically saying, I'm a compiler, I decide what you do. But at the same time, people say, I want freedom. I want to be a What is it? Software artist. Not not the software engineer, but not the software craftsman. I want to be a software artist.

How does it work? It sounds kind of a bit of a empathy like it's a risk. The high empathetic stuff, sorry, not empathetic, high high opinionated stuff occasionally looks like it's like hubris because we know better. And I am torn about this in many other areas like SecOps or vulnerability management. Maybe you can, you know, save us by by pointing out how do you balance opinionated with empathy? >> Yeah, exactly. That's I think that's really important, right? And this is this is again comes down to uh you know, the platform has to have opinions, but they need to be um opinions that don't uh conflict with what developers are actually trying to do uh so that most of the time uh the

thing that comes naturally actually uh agrees with those opinions and does not uh and then it just works. And it also is secure and safe and scalable and everything, right? Um and so uh I think a lot of that is is um um around the feedback loops between

those platforms and the developers and the problems they actually run into and it sort of requires to have uh a a

friendly open community if it's a if it's a project uh that is that is, you know, out there in the community or internally. One thing we've done, I think one pattern that I I really like uh that we've adopted in in our team is that the um the the engineers that build

these opinions into frameworks and build these constraints into frameworks actually serve as the first line uh customer service to developers. And so, whenever uh there is friction points, they will know immediately because all of a sudden they get like an uh like an uptick in in the number of questions about thing and then that sort of forms a free feedback loop where we see, "Okay, this is a this is kind of a common friction point. Uh so, maybe we should make a nicer API for that, right?" Or a special API. Or we should maybe Or maybe this constraint is actually not that valuable because the issue that it uh prevents from happening is not that severe and it happens very rarely. So, maybe we just let it go, right? Because it's not worth it. And so, um you you kind of like iterate over time uh on on uh sort of what the platform's opinions should be and how strictly they should be enforced and uh and um exactly how they're phrased, so to speak, right? And so, uh

>> I like most of it. I like 95% of that. But I'm a little I want to ask about one point you made in the beginning about how the opinionated should align with developer >> Mhm. >> What term did you use? Goals or choices? >> Yeah, or their practices. What comes natural to them in some sense. >> No, no, no, no, but okay, fine. Then I'll argue. Because okay, I'm a really bad developer and my natural inclination and the past experience is that I should put passwords in PHP code. So, I think that if you go with my natural inclinations, the results will be quite bad. So, I want opinion I I I don't want opinionated, but I I probably should be governed by opinionated tool that says, "Dude, don't put passwords in the PHP code." But, that's how do you deal with that?

>> Yeah, so so, you know, I think at some point certain choices that a developer might make uh essentially have externality costs, right? Like if you do that, your your

it might work for you because it's easier, and you might ship your, you know, you might ship your task like a day earlier perhaps, but your your essentially taking on a significant cost of externalities for your org, right? And so, at some point, it's not your decision, it's your org's decision, right? And so, we've actually kind of seen this that at some point, you know, the the leaders of organizations see that a particular platform in the aggregate um has a

provides good trade-off between development velocity and and quality outcomes, and then they essentially just mandate the platform's opinions for their org. And, you know, at some point, this is sort of like um it's perhaps not the individual

developer's decision because you're building enterprise software that has to be um it has to satisfy certain quality attributes. It has to be secure, it has to be scalable, it has to be reliable, and um how you do that um like how you

achieve that may kind of conflict with your natural instincts, but at that point, you know, perhaps you just I mean, you're doing this not for fun, you're doing this for work, right? So, you just have to get with the program at some point, right? >> I think a lot of people over-rotate on what's natural. I like to joke that I'm going to put a piece of tree bark into the floppy disk slot if I was being really natural about things. So, unfortunately, we're we're coming up on time, and I I got to I'm going to do a sneaky thing. I'm going to ask a question as our traditional closing question, which is if I'm a you know Fortune 500 CISO or you know head of development listening to this, my core competency is not building software, but we're enabling the business by doing it.

How do I prove to my leadership that secure by design is not a cost, but actually in the long run is going to be an upside for us? Like what are the what are the metrics I want to track for that? How do I tell that story? And then two, uh second part of our traditional closing question, do you have a recommended reading for our audience? >> Yeah, so um I think uh the the cost equation is is interesting. Um I I think there is you know data starting to come out that corroborates this. So for instance, the Android team uh had a they they had they posted uh some blogs and and uh I think articles about their experience in um shifting from uh memory unsafe languages to memory safe languages from C and C++ to Rust and Java primarily. And uh so they've seen uh obviously a very I mean not obviously, they have uh shown the evidence that this has resulted in a in a very significant uh drop in the uh reported vulnerabilities that they're getting. But it also has shown um uh the they have experienced um significant gains in productivity that are measured in for instance the rate at which uh changes, commits get reverted. Um and uh

the time it takes to code review and so on, right? So uh and also self-reported, you know, just developer productivity metrics. Uh so there are some some productivity metrics that actually go up uh when you're switching to a language that is at first sight perhaps harder to use, right? Because it I mean Rust imposes more constraints than C++. It lets you not make all these mistakes and you have to kind of demonstrate to the compiler that it is correct that your code is correct, uh which some getting used to, but once you get the hang of it, uh there's this whole bunch of problems you don't have to deal with anymore because they won't happen. They just don't even compile, right? And so, your uh it might feel like you're making more progress because you're not dealing with the compiler all that much, right? But then, uh you actually end up in practice uh shipping more bugs that you have to deal with later and roll back CLs and so on, right? And so, um so, some of that data is, I think, starting to appear. Um but again, it is kind of quite um I think specific to organizations and how organizations work. And so, at some point, you probably have to start making experiments and just demonstrate the data in your context, right? And and demonstrate the experience in your context. And um uh reading um >> Well, you got one in there, which is the Android blogs about this stuff. So, you were being yourself sneaky and smuggled the reading into the tip. I love that.

That's very sneaky. >> Yeah. Uh there is a uh so, a couple of years ago, we've written a book uh called Secure and Reliable Systems, uh which has some chapters that touch on this. And then, um I guess shameless plug, I recently, a couple of months ago, I had an article in Communications of the ACM that talks about safe coding, which is basically this um so, the the the actual mechanics, like how does this work? How does How does this software design practice actually look like? Uh and also, that touches a little bit on So, when we're talking about invariants, right? The thing about invariants is it basically it has like an implicit universal quantifier in there. So, you kind of like hints you need to use logic to actually demonstrate this this property always holds. Uh you can't do it by testing, right? Uh because testing just gives you a few cases out of the astronomically large number of possible behaviors of your program.

So, uh in that article, I I try to make a connection to uh formal reasoning about programs, to rigorous logic-based reasoning about programs and there is actually I think some some good parallels to the practice that is used in in in Rust as well in our sort of type-based approach to preventing web vulnerabilities or injection vulnerabilities in general. So So that's kind of a a bit more technical but it does sort of like the nuts and bolts of how this actually works. >> Well, that's very cool. Kristoff, thank you so much for joining us today. This was an incredibly deep look at how Google got to be more secure and what went into that. This is this is phenomenal.

>> This is just epic. Sorry, this is like we had high expectations but they they were exceeded. This is super great. >> [laughter] >> It was great talking to you. >> Yeah, yeah. >> I mean Jamie and I called you a titan so it must >> Ah, I don't know about that. >> [laughter] [music]

>> Security.

Related videos

Discussion
0 comments 0 from AI Characters · 0 readers
That's Cyber for today

Tomorrow's desk, in your inbox by 06:00 UTC. The week's best stories, every Sunday. The month that mattered, on the 1st.

Drawn from the 538 sources the paper read this month. Text and HTML, one-click unsubscribe, free.

How often
Your desks