1 00:00:08,750 --> 00:00:16,170 Welcome to the talk and the title for our talk today is Threat Modeling Based Application Security Pipeline. 2 00:00:17,930 --> 00:00:20,730 A legal disclaimer before we get started. 3 00:00:20,730 --> 00:00:29,090 All opinions in this talk belong to the speakers and do not represent that of the organization or the community itself. 4 00:00:31,820 --> 00:00:33,940 So, let's get started. 5 00:00:33,940 --> 00:00:35,540 A little bit about us. 6 00:00:35,540 --> 00:00:37,200 I'm Nilad Demelo. 7 00:00:37,200 --> 00:00:39,760 I'm a security engineer at Datadog. 8 00:00:39,760 --> 00:00:47,040 I work on the security design and guidance team that works on engineering new products securely. 9 00:00:47,140 --> 00:00:52,920 Previously, I worked at Intel and McAfee and I'm very passionate about writing. 10 00:00:52,920 --> 00:00:56,860 And I mentor grad school students at San Jose State. 11 00:00:56,860 --> 00:00:58,380 Larkins, over to you. 12 00:00:58,380 --> 00:01:00,380 Hey folks, I'm Larkins. 13 00:01:00,380 --> 00:01:02,460 I'm product security engineer at Plaid. 14 00:01:02,460 --> 00:01:07,660 Previously, I was application security engineer at AWS and I worked at Intel as well. 15 00:01:07,660 --> 00:01:13,140 I worked on software engineer technologies at Intel and then transitioned to security researcher. 16 00:01:13,140 --> 00:01:14,760 I'm an outdoor enthusiast. 17 00:01:14,760 --> 00:01:20,400 I love camping, hiking, and I have a golden retriever who goes along with me wherever I go. 18 00:01:20,680 --> 00:01:22,220 Pretty, pretty cool. 19 00:01:22,220 --> 00:01:34,200 So, as two AppSec professionals who work in a fast-paced engineering-heavy organization where security needs to be comprehensive, it needs to be effective. 20 00:01:34,200 --> 00:01:35,740 We trade a lot of nodes. 21 00:01:35,740 --> 00:01:42,960 And we thought we should first lay the foundation for what a fast-paced engineering-heavy organization looks like. 22 00:01:42,960 --> 00:01:45,520 What are the traits of such organizations? 23 00:01:45,860 --> 00:01:53,200 So, first and foremost, these organizations ship very fast and they ship frequently. 24 00:01:53,420 --> 00:01:56,020 Just the volume is insane. 25 00:01:56,480 --> 00:02:00,540 And new services and prototypes are being spawned, like anything. 26 00:02:01,020 --> 00:02:04,740 Inherently cloud-native, that's the biggest trait there. 27 00:02:04,740 --> 00:02:10,320 And then the ratio of engineering to security engineering is disproportionate. 28 00:02:10,320 --> 00:02:18,220 When you look at security, when you look at InfoSec, privacy, risk, these are fairly lean teams as compared to the engineering teams. 29 00:02:18,620 --> 00:02:24,080 So, that brings us to the question, what does security do in such places? 30 00:02:24,180 --> 00:02:28,700 First and foremost, security places calculated bets. 31 00:02:28,700 --> 00:02:35,880 It places calculated bets where the impact, the return on investment, and the value is the highest. 32 00:02:35,960 --> 00:02:39,600 That being said, what are we going to cover in our talk today? 33 00:02:40,080 --> 00:02:50,160 Since the title of our talk is Threat Modeling-Based Application Security Pipeline, we are first going to get a background on application security reviews. 34 00:02:50,440 --> 00:02:57,360 Once we cover what these application security reviews are, we are going to get into secure SDLC. 35 00:02:57,360 --> 00:03:00,480 We all know what a software development lifecycle is. 36 00:03:00,480 --> 00:03:07,140 So, when we integrate security events or security activities in there, what does a secure SDLC look like? 37 00:03:07,540 --> 00:03:16,020 Next, the most favorite part here is in order to make this comprehensive and effective, the AppSec trio of success. 38 00:03:16,020 --> 00:03:18,100 That's what we'll focus on. 39 00:03:18,200 --> 00:03:27,380 Then, we'll go into the AppSec pipeline and we'll take an example after that for illustration purposes to see what that looks like. 40 00:03:27,480 --> 00:03:33,300 And finally, there is no good end to a talk without discussing how we measure progress. 41 00:03:33,300 --> 00:03:36,660 So, that's a bird's eye view of what we are going to cover today. 42 00:03:39,060 --> 00:03:43,320 So, at a high level, what are application security reviews or assessment? 43 00:03:43,740 --> 00:03:46,640 So, it all starts with secure design reviews. 44 00:03:46,860 --> 00:03:52,480 Not all organizations will be doing all of these activities or they will be doing a subset of these activities. 45 00:03:52,760 --> 00:03:54,320 So, what are secure design reviews? 46 00:03:54,320 --> 00:04:04,320 In secure design reviews, we look at a product requirement and then come up with security requirements based on the security controls we think will be most beneficial. 47 00:04:04,440 --> 00:04:08,260 Once we have that nailed down, we look at threat modeling. 48 00:04:08,260 --> 00:04:16,760 Threat modeling is a holistic exercise where we understand, we work and collaborate with the engineering teams to figure out what can go wrong with a system. 49 00:04:16,760 --> 00:04:22,540 How can attackers or bad users can abuse a system and then create havoc, right? 50 00:04:22,540 --> 00:04:27,700 So then, once we have that defined, we start looking into the implementation guidance. 51 00:04:27,700 --> 00:04:30,420 And this is where we collaborate closely with developers. 52 00:04:30,580 --> 00:04:35,320 Like, we have a bunch of requirements in place, but they don't know how to action on them. 53 00:04:35,400 --> 00:04:40,500 And then, for the implementation guidance, what we look at, like, what are some safe primitives? 54 00:04:40,500 --> 00:04:41,820 What are some frameworks? 55 00:04:42,000 --> 00:04:46,840 What are some crypto implementations which can go wrong and how we can do better? 56 00:04:47,200 --> 00:04:51,300 We also look at, like, what are some supply chain issues which can come along with those? 57 00:04:51,600 --> 00:05:02,640 And then we start looking at, once we have that implementation guidance in place, and then developers come to us, that, hey, this was the set of requirements which we agreed upon, and we have implemented them. 58 00:05:02,820 --> 00:05:04,680 Can we get a code review? 59 00:05:04,840 --> 00:05:20,440 So , here we utilize SAS tooling, a great way of us leveraging and exercising on, like, what we have, the implementation guidance that is supposed to be put in place, but not all can be caught as part of, like, a SAS tooling. 60 00:05:20,440 --> 00:05:24,080 And at that point, we need to do some form of manual code reviews. 61 00:05:24,420 --> 00:05:27,420 And at the end, we have some form of dynamic testing. 62 00:05:27,420 --> 00:05:33,940 There can be API security testing, there can be first testing, and then it can be IAST, the tooling we have. 63 00:05:34,140 --> 00:05:36,640 But there is also another aspect to it. 64 00:05:36,640 --> 00:05:40,580 Dynamic security testing can be achieved with penetration testings as well. 65 00:05:40,580 --> 00:05:49,520 Not all will be doing the penetration testing, but, like, we would like to emphasize our efforts where we think these will be critical aspects of our systems. 66 00:05:50,780 --> 00:05:54,840 So, why invest in building culture of application security reviews? 67 00:05:54,840 --> 00:06:03,240 So, as part of security design reviews, we closely work with our engineers to understand, like, what are some of the implications. 68 00:06:03,240 --> 00:06:14,540 So, like, proactively, we work to understand what are the requirements from the security point of view and how we can address these or fix these design issues right from the start. 69 00:06:14,540 --> 00:06:20,060 We know, like, fixing design issues can be a lot more complicated than fixing just code issues. 70 00:06:22,700 --> 00:06:24,500 So, tools are great. 71 00:06:24,500 --> 00:06:27,140 Like, they help us scale in so many different ways. 72 00:06:27,140 --> 00:06:32,600 But we also know sometimes tools create a lot of security problems for security teams. 73 00:06:32,700 --> 00:06:40,800 And, like, how can we leverage tools in this manner without having issues with our development teams? 74 00:06:40,800 --> 00:06:48,200 And then, we also need to think that design issues and the architecture issues cannot be found with tools we use. 75 00:06:50,520 --> 00:06:52,540 This is my personal favorite. 76 00:06:52,540 --> 00:06:53,520 Like, collaboration, right? 77 00:06:53,520 --> 00:07:00,200 Like, when we work with our developers and our engineers right from the get-go, they know that we are on their side. 78 00:07:00,200 --> 00:07:06,220 They know that we are working on a shared common goal to build a system securely. 79 00:07:07,080 --> 00:07:16,680 And now, as part of all this exercise which we are going and collaboration which we are doing with our developers, we now know what are some of the critical systems. 80 00:07:16,680 --> 00:07:20,880 And based on that, we can emphasize like, efforts on some... 81 00:07:20,880 --> 00:07:26,820 pinpointing some of the critical systems and then have close eyes on them. 82 00:07:27,240 --> 00:07:34,820 So, now Nilet will be talking about and walking us through, like, what is software development lifecycle and how secure development lifecycle fits in. 83 00:07:37,020 --> 00:07:49,180 So, regardless of the paradigm that you follow in your software development lifecycle, be it waterfall, agile, iterative, spiral, whatever, we can agree that they all come down to these blocks. 84 00:07:49,180 --> 00:07:50,360 There is requirement. 85 00:07:50,360 --> 00:07:51,240 There is design. 86 00:07:51,240 --> 00:07:52,580 There is code. 87 00:07:52,580 --> 00:07:53,400 There is test. 88 00:07:53,400 --> 00:07:54,820 And there is release. 89 00:07:55,120 --> 00:07:58,800 Now, how do we inject security in these phases? 90 00:07:59,000 --> 00:08:06,580 At the top, what you are saying is, again, when a new service or a new feature or a new product is getting started, right? 91 00:08:07,140 --> 00:08:13,900 When we talk about design or requirements phase, that's, no, I'm going to go back. 92 00:08:13,900 --> 00:08:23,700 When we talk about the requirements phase, there is a bunch of exploration and there's a bunch of folks involved in it, product management, engineering, security. 93 00:08:23,760 --> 00:08:27,780 That's the time when we should be talking about the security requirements. 94 00:08:28,000 --> 00:08:34,020 During planning, that's when we'll be talking about how do we want to allocate the security resources for this. 95 00:08:34,820 --> 00:08:43,020 When it's time to do an RFC or a design doc, that's when it's appropriate to have an architecture review. 96 00:08:43,020 --> 00:08:44,780 Also, threat modeling. 97 00:08:44,780 --> 00:08:45,880 What can go wrong? 98 00:08:45,880 --> 00:08:47,600 What can we do about it? 99 00:08:48,700 --> 00:08:54,060 Also, how are we going to test what we are saying can go wrong and what we are going to do about it? 100 00:08:54,060 --> 00:08:59,080 The security test plan is also going to be part of the design document itself. 101 00:08:59,620 --> 00:09:06,500 There is implementation, after which we can add secure code review and security testing as well. 102 00:09:07,080 --> 00:09:15,200 Optionally, wherever it's critical, you include your external pen test or even some form of internal pen tests as well. 103 00:09:15,600 --> 00:09:19,820 That's the flow for when a new service or a new product is being spawned. 104 00:09:19,820 --> 00:09:21,620 You keep adding on top of it. 105 00:09:21,620 --> 00:09:25,620 Towards the bottom, you start now doing feature-based assessments. 106 00:09:25,620 --> 00:09:30,020 Every time you add something new, there is a chance that you are adding more risks as well. 107 00:09:30,020 --> 00:09:40,580 So, you want to also add some detective controls in place to maybe identify what are some anomalies or behavioral anti-patterns that you are seeing with respect to your services. 108 00:09:40,580 --> 00:09:46,780 So, that's the time when you also inject some security monitoring and incident response-related activities as well. 109 00:09:46,780 --> 00:09:50,600 But as you can see, that's a lot. 110 00:09:50,700 --> 00:09:58,220 And the call-out here is, it is challenging to adopt and execute on it all. 111 00:09:58,420 --> 00:10:10,340 And really what happens when all of this secure SDLC activities, the threat modeling, or your dynamic testing, or your code reviews, all of that is happening in isolation. 112 00:10:10,400 --> 00:10:16,700 There is engineering is doing something, security teams that are focusing on different aspects are doing something. 113 00:10:17,040 --> 00:10:20,800 Security best practices don't get followed in the ideal way. 114 00:10:20,800 --> 00:10:24,520 That introduces security bugs and vulnerabilities. 115 00:10:24,640 --> 00:10:26,640 Dumpster fire keeps amplifying. 116 00:10:27,800 --> 00:10:29,260 Mounts tech debt. 117 00:10:29,260 --> 00:10:32,360 And there is inconsistent outcomes, really. 118 00:10:32,360 --> 00:10:38,200 And eventually leading into internal security events and breaches. 119 00:10:38,280 --> 00:10:42,160 And finally, the doom day scenario, which nobody really wants. 120 00:10:42,160 --> 00:10:45,760 Loss of reputation and precious customer trust. 121 00:10:45,760 --> 00:10:48,340 At the end, customer trust is everything. 122 00:10:49,040 --> 00:10:52,360 We can sit there and say, yeah, this is fine. 123 00:10:53,340 --> 00:10:56,100 Every security professional's mood. 124 00:10:56,100 --> 00:10:59,320 But no, we can do something about it, right? 125 00:10:59,320 --> 00:11:03,680 And that's where the AppSec trio of success really comes into play. 126 00:11:03,680 --> 00:11:12,180 You know, the secret formula there to make this scale well and in a successful manner is to have all three things that we're going to talk about. 127 00:11:12,240 --> 00:11:14,060 We start with tools. 128 00:11:14,340 --> 00:11:15,940 These are essential. 129 00:11:15,940 --> 00:11:24,520 We need them to automate our security activities, to do code analysis for us, to tell us what are the security vulnerabilities that are in place. 130 00:11:24,980 --> 00:11:26,140 Important. 131 00:11:26,380 --> 00:11:28,800 But then on top of that, there is processes. 132 00:11:28,800 --> 00:11:31,880 How do you keep your security best practices in place? 133 00:11:31,880 --> 00:11:33,220 When do you do them? 134 00:11:33,220 --> 00:11:34,740 Who do you involve? 135 00:11:35,000 --> 00:11:38,560 You take tools, you layer processes on top of it. 136 00:11:38,740 --> 00:11:45,720 But none of this is going to be successful if you don't have the most important aspect here, the people. 137 00:11:45,920 --> 00:11:57,060 Your different folks in security who have different skill sets and domain expertise and your development teams, you know, who have real good understanding of why this is important. 138 00:11:57,060 --> 00:12:00,200 Why do I need to do a certain thing from a security standpoint? 139 00:12:00,340 --> 00:12:01,740 Combine it all together. 140 00:12:01,740 --> 00:12:04,060 That's your AppSec trio of success. 141 00:12:04,060 --> 00:12:09,160 So Neelit, can you talk a little bit about who are people and who are involved in this? 142 00:12:09,520 --> 00:12:11,180 That's a good question. 143 00:12:11,760 --> 00:12:13,460 Let's start with the developers. 144 00:12:13,460 --> 00:12:15,160 What's in it for them? 145 00:12:15,500 --> 00:12:24,460 Well, they need clear information about what is it that I need to implement and how do I test the expected behaviors? 146 00:12:25,300 --> 00:12:29,660 The product owner or the business decision maker. 147 00:12:29,660 --> 00:12:33,140 They're going to be like, okay, you're telling me there is a risk. 148 00:12:33,140 --> 00:12:36,500 What's the necessary action I need to take for that risk? 149 00:12:36,520 --> 00:12:53,460 And the third, the security engineer who's really concerned about what is the security posture of this overall application and is this new feature or this new service introducing some sort of vulnerabilities or risks that I need to be aware of? 150 00:12:53,460 --> 00:12:56,960 Also, does it satisfy the compliance requirements? 151 00:12:58,220 --> 00:13:02,580 So now let's talk about the application security pipeline. 152 00:13:04,260 --> 00:13:20,200 So if now we look at the application security pipeline in a very vanilla way, in a very serialized way, it's a security design review that you can do at the start, exploration, planning, design phase. 153 00:13:20,200 --> 00:13:33,760 Then you have your security code review which is essentially doing your tooling for your code analysis as well as your manual code review for things that your tool really cannot catch and your dynamic testing. 154 00:13:33,760 --> 00:13:45,660 But keep in mind that this serial activity is not going to scale when you really, really, really, really have thousands of services, microservices that connect to each other here and there. 155 00:13:45,660 --> 00:13:48,740 You have thousands of infrastructure components. 156 00:13:49,100 --> 00:13:54,940 Did I tell you about the commandment here when you work in a high-speed environment? 157 00:13:54,940 --> 00:13:56,500 Thou shall not block. 158 00:13:56,500 --> 00:13:59,820 You do anything for security, but you will not block me. 159 00:14:00,000 --> 00:14:02,240 So how do you do that then? 160 00:14:04,830 --> 00:14:16,970 So today we are going to focus on security design review and we are going to talk about how we can implement different measures as part of a security design review and how we can scale our review processes. 161 00:14:17,090 --> 00:14:22,370 And to reiterate, fixing a design issue is a lot more complicated than fixing a code issue. 162 00:14:24,970 --> 00:14:26,670 So now let's take a look. 163 00:14:26,670 --> 00:14:28,790 So this is the vanilla pipeline. 164 00:14:28,790 --> 00:14:33,610 Like a security design review followed by security code review and dynamic testing. 165 00:14:33,690 --> 00:14:42,250 So in a security design review, as a security engineer, when we start looking at our reviews, don't do it in isolation. 166 00:14:42,770 --> 00:14:43,970 There are different... 167 00:14:43,970 --> 00:14:51,290 On the left, what we see is just a pipeline and in the middle, these are parallel activities which need to happen. 168 00:14:51,290 --> 00:14:55,310 We have experts which are focused on privacy aspects. 169 00:14:55,310 --> 00:14:58,190 We have experts who are focused for risk. 170 00:14:58,190 --> 00:15:01,970 We have security operations and supply chain as well. 171 00:15:01,970 --> 00:15:04,450 So when you are doing reviews, talk to them. 172 00:15:04,450 --> 00:15:08,550 Talk to them and understand different implications of what we are introducing. 173 00:15:08,650 --> 00:15:13,830 We are having different design aspects from a privacy point of view. 174 00:15:13,830 --> 00:15:14,790 Data handling. 175 00:15:14,790 --> 00:15:17,510 So they are the experts who can help us understand. 176 00:15:17,510 --> 00:15:22,750 So when we have that understanding, we come up with security and privacy requirements. 177 00:15:23,350 --> 00:15:29,810 As we are doing this process, we are collaborating with the engineers, we come up with threat model as well. 178 00:15:29,890 --> 00:15:35,850 Based on the threat model and based on the mitigations we have in place, we have implementation guidance. 179 00:15:35,870 --> 00:15:38,950 And to have implementation guidance, what do we need? 180 00:15:38,950 --> 00:15:40,530 We need some kind of a test plan. 181 00:15:40,530 --> 00:15:46,970 We need some kind of security findings and events which will be coming out of security code review pipeline as well. 182 00:15:46,970 --> 00:15:53,350 So let's focus on security design review where we will be doing RFC's fake review. 183 00:15:53,350 --> 00:15:58,210 Here we will be engaging with our different teams and come up with the security requirements. 184 00:15:58,530 --> 00:16:03,370 We have to make sure these align with what our product team is developing. 185 00:16:03,370 --> 00:16:11,750 We need to make sure that this is not actually making these features less attractive to the customers they are providing. 186 00:16:13,250 --> 00:16:17,150 Nillet will be talking now about security design review process. 187 00:16:17,150 --> 00:16:24,630 She will be talking about how we have to design the intake process and how we can have different phases altogether. 188 00:16:25,030 --> 00:16:39,670 So as you saw in the pipeline where there was the security design review, that is the injection point for even bringing in your experts who do supply chain or privacy or risk, everything that you can inject in there. 189 00:16:39,670 --> 00:16:42,850 The starting point is a security design review. 190 00:16:42,850 --> 00:16:44,610 So when should you be doing it? 191 00:16:44,610 --> 00:16:52,270 You can do it whenever you are launching a new service or anytime there is a major update to an existing service. 192 00:16:52,270 --> 00:16:59,390 Any service that has a security sensitive context, you need to have a security design review as well. 193 00:16:59,390 --> 00:17:03,170 And periodical evaluation of your services. 194 00:17:03,170 --> 00:17:04,810 So this is part of the process. 195 00:17:04,810 --> 00:17:10,570 At an organization level, we define, even at Datadog, we define when should you have a design review? 196 00:17:10,570 --> 00:17:14,770 Because folks need to have a clear understanding of the expectations here. 197 00:17:17,600 --> 00:17:19,700 So security review calibration. 198 00:17:19,700 --> 00:17:23,880 So now we saw there are different processes which are in place. 199 00:17:23,880 --> 00:17:27,540 I see one of my engineers, past engineer, Nick. 200 00:17:28,380 --> 00:17:29,880 I know you. 201 00:17:29,920 --> 00:17:58,180 So security review calibration, which was a very heavily focused process in AWS, a US successful process because we work on so many different services and there are different risks coming out, there are different guidance coming out and we need a centralized place where engineers who are working on different services can look at different insecure patterns and they can develop a shared context on how we are doing and processing these services. 202 00:17:58,280 --> 00:18:03,740 Some of the activities as part of that exercise were about how do we assign different risks? 203 00:18:03,740 --> 00:18:06,020 How do we assign different severities? 204 00:18:06,020 --> 00:18:11,160 Not all severities will be the same and having that context helps us to scale differently. 205 00:18:11,280 --> 00:18:13,540 So why do we need security review calibration? 206 00:18:13,540 --> 00:18:15,540 We need it to be consistent. 207 00:18:15,540 --> 00:18:25,120 Our process needs to be consistent in how we find different vulnerabilities, how we assign different severities and if we have some gaps, what can we do about it? 208 00:18:25,120 --> 00:18:26,560 We need to have a knowledge base. 209 00:18:26,560 --> 00:18:28,100 We need to expand on it. 210 00:18:28,280 --> 00:18:35,900 By chance, if there was no knowledge base, if there were no processes in place, we have good opportunities to set up new processes. 211 00:18:35,900 --> 00:18:39,080 We have good opportunities to innovate. 212 00:18:41,920 --> 00:18:51,400 So now I will dive a little into partnership because if you want to set a good pipeline, you need to have some foundational elements in place. 213 00:18:51,400 --> 00:18:54,200 You need to try and test and evolve accordingly. 214 00:18:54,200 --> 00:19:00,620 So you can pick some of your products or services that are really critical and aim for that to be your partner. 215 00:19:00,620 --> 00:19:19,660 So where your security engineer is partnering with that organization or that product and that's when, say, you define how the security reviews get done, how you bring in the different domain experts in as well, how you streamline the secure code reviews for that particular organization, 216 00:19:19,660 --> 00:19:24,680 as well as how the pen test scoping is done for that particular organization. 217 00:19:24,680 --> 00:19:34,940 So you can try to do it in different contexts but if you pick a few feature services or products that you can partner with, that is going to be the best bang for buck. 218 00:19:34,940 --> 00:19:38,420 Because then you can really measure your progress properly. 219 00:19:38,940 --> 00:19:43,880 So Nilit, we have this partnership program, then what is the role of security champions? 220 00:19:43,880 --> 00:19:45,140 That's a good question. 221 00:19:45,140 --> 00:19:50,060 So with partnership, it's a security engineer going to the product teams. 222 00:19:50,060 --> 00:19:52,640 But you also need to scale the guidance, right? 223 00:19:52,640 --> 00:19:54,620 You need to scale what needs to be done. 224 00:19:54,620 --> 00:19:57,820 You need eyes and ears where the real action is. 225 00:19:57,820 --> 00:20:01,060 So security champions are folks who are in the product teams. 226 00:20:01,060 --> 00:20:04,440 These are folks who are extremely security-minded. 227 00:20:04,440 --> 00:20:11,380 They have the right direction, the right support, as well as they know what needs to be done. 228 00:20:11,380 --> 00:20:21,720 So training few folks within the organization to take care of security-sensitive tasks is where the security champions really shine in. 229 00:20:23,040 --> 00:20:25,960 Now let's take an illustration of pipeline. 230 00:20:25,960 --> 00:20:31,620 So before going in there, we covered a lot about what are the different activities. 231 00:20:31,620 --> 00:20:35,940 Security design review, code reviews, dynamic testing. 232 00:20:35,980 --> 00:20:39,840 Let's take an example to see how we can do that in practice. 233 00:20:40,740 --> 00:20:51,260 Now, you have your intake process as a security team and the development team comes in through that intake process and saying, hey, we are doing this exciting feature. 234 00:20:51,260 --> 00:20:52,880 It's a code playground. 235 00:20:53,580 --> 00:20:57,340 We all are pretty familiar with what a code playground is, right? 236 00:20:57,340 --> 00:21:01,680 So, they come in saying they want to do a code playground. 237 00:21:02,320 --> 00:21:05,780 We ask them to go through a security review intake. 238 00:21:06,260 --> 00:21:13,880 Then that security review intake should be hooked up to a good project tracking software. 239 00:21:13,880 --> 00:21:15,780 Now what does the intake involve? 240 00:21:16,000 --> 00:21:20,740 If we have heard talks or we have seen different tools, context is super important, right? 241 00:21:20,740 --> 00:21:24,680 We need to collect as much information or context of what is being built. 242 00:21:24,680 --> 00:21:28,080 Otherwise, anything that you say is not going to be actionable. 243 00:21:28,140 --> 00:21:42,460 So, you collect different details like what data stores you have, what's the internet exposure, what kind of untrusted inputs are you handling, what are the service interfaces in terms of how is your server looking like, what's your client looking like, 244 00:21:42,460 --> 00:21:52,060 what is your authentication and access control model, what's your cryptographic usage, do you have any customer data that you are handling, tell me about your APIs. 245 00:21:52,060 --> 00:21:58,520 You collect all of that information as part of the intake so that you know what is being done. 246 00:21:58,660 --> 00:22:10,660 Based on that review intake, it tells us that hey, this feature that allows the customer to bring in or allows the user to bring in arbitrary code, it's a high risk critical feature. 247 00:22:10,660 --> 00:22:12,860 So, it needs a security design review. 248 00:22:12,860 --> 00:22:14,320 It needs an assessment. 249 00:22:14,800 --> 00:22:21,580 So, the security team goes like, this is a critical feature, let's work together to do a security assessment. 250 00:22:22,320 --> 00:22:24,480 So, now they have a lot of questions. 251 00:22:24,860 --> 00:22:33,900 We talked about different requirements, we talked about the criticality of the service, and now they are confused like, hey, how are we going to do this, and how are we going to ship? 252 00:22:33,900 --> 00:22:40,880 So, one of the things we do is collaborate with them, not only just give the requirements, but exactly what they need to do. 253 00:22:40,880 --> 00:22:44,480 There are different activities that can go wrong with the code playground. 254 00:22:44,600 --> 00:22:48,980 And we first need to understand, what can we do about it? 255 00:22:48,980 --> 00:22:51,820 The first thing that comes to our mind is sandbox. 256 00:22:51,820 --> 00:22:56,060 Like, we can give them like, okay, create a sandbox environment. 257 00:22:56,060 --> 00:22:59,160 But what does sandbox environment mean to them? 258 00:22:59,280 --> 00:23:08,340 I have seen in the past, a sandbox environment means to them is like, just scanning what customers are uploading with the virus scanning software, and just call it done. 259 00:23:08,340 --> 00:23:11,080 That is not a sandbox, what it's supposed to be. 260 00:23:11,080 --> 00:23:17,720 A sandbox has to be carefully designed, that even in case of a compromise, we are limiting the blast radius. 261 00:23:17,720 --> 00:23:24,740 So, this we have to be collaborative and prescriptive in how we want to see this environment to play out. 262 00:23:26,040 --> 00:23:30,920 So, if you go back a slide, you can see that there are so many different aspects. 263 00:23:30,920 --> 00:23:36,860 You know, if you were going to do a pen test later in the game, you have still established a very good scope here. 264 00:23:36,860 --> 00:23:42,420 Look at the different high risk areas that we are highlighting right at the design phase. 265 00:23:42,420 --> 00:23:44,160 Yeah, that's an interesting point. 266 00:23:44,160 --> 00:23:51,060 Because all this we are doing, and by the end when the feature is going to be shipped, we will be looking at different pen tests. 267 00:23:51,060 --> 00:23:57,780 And to have a good pen test scope, we need to define these as part of our requirement gathering and threat modeling. 268 00:23:57,780 --> 00:24:05,680 So, our pen test team will be very happy to see the scope is already defined for them, and they know where exactly to focus on. 269 00:24:09,740 --> 00:24:12,080 So, the implementation is done. 270 00:24:13,140 --> 00:24:21,480 When you say that here are my security requirements, you are going to check for, like, they are implementing what was promised, right? 271 00:24:21,800 --> 00:24:22,720 Yes. 272 00:24:22,800 --> 00:24:27,100 So, then you need to call for an implementation review as well. 273 00:24:29,600 --> 00:24:32,360 So, what do we do in an implementation review? 274 00:24:32,400 --> 00:24:41,860 So, in implementation review, we will first look at, like, what were the security requirements, and we will start evaluating different frameworks. 275 00:24:41,860 --> 00:24:44,060 One of the frameworks can be, like, insecure. 276 00:24:44,060 --> 00:24:50,160 Like, some of the libraries will be, they will have secure usage and insecure usage as well. 277 00:24:50,160 --> 00:25:02,180 We need to help developers understand what will go wrong if we use insecure patterns, because libraries, the documentation, is difficult to understand sometimes, and details are very hidden. 278 00:25:02,180 --> 00:25:08,820 So, helping them understand, if we don't have guidance, we can help them understand how to do and build it securely. 279 00:25:11,120 --> 00:25:23,980 So, ultimately, the goal of the pipeline is you start with the design review, you have your pen test, you've also identified that maybe I need some audit logs for certain high-risk activities. 280 00:25:23,980 --> 00:25:25,880 I need some detective controls. 281 00:25:25,880 --> 00:25:30,120 You combine it all together, ultimately you're driving down the residual risk. 282 00:25:30,120 --> 00:25:36,320 The risk is never going to go away, but your residual risk is much lower than the actual risk that could have been in place. 283 00:25:36,520 --> 00:25:44,320 And that also helps with prioritizing remediation, because I got a thousand things to do, why should I do this thing that you're asking me to do, right? 284 00:25:44,320 --> 00:25:50,940 So, it really helps to be precise with prioritizing remediations. 285 00:25:51,580 --> 00:25:55,520 And then, Larkins, you were talking about calibrating reviews. 286 00:25:55,580 --> 00:25:59,320 How can we calibrate this particular review? 287 00:25:59,320 --> 00:26:06,400 Yes, so now when we look at what were all the different requirements, and then we understood there were some gaps in our knowledge bases. 288 00:26:06,400 --> 00:26:12,280 So, now this is a good opportunity for us to go ahead and build some kind of knowledge base. 289 00:26:12,280 --> 00:26:14,120 Think about the sandbox. 290 00:26:14,120 --> 00:26:15,580 Sandbox implementation was missing. 291 00:26:15,580 --> 00:26:28,980 So, now we have a sandbox environment, which we need to publicize, which we need to tell our different engineers that, hey, we have this already in place, and we should be using and suggesting moving forward. 292 00:26:29,140 --> 00:26:31,020 Then, fine-tuned rules. 293 00:26:31,020 --> 00:26:39,860 As part of these, we also came to know that there was some insecure implementation of code while doing secure code reviews, which were not caught previously. 294 00:26:39,860 --> 00:26:43,960 But now we have opportunities to expand our rule set and develop new rules. 295 00:26:44,720 --> 00:26:46,660 Write new monitoring test cases. 296 00:26:46,660 --> 00:26:49,420 We all know that there were so many different attack vectors. 297 00:26:49,420 --> 00:26:51,600 One of the attack vectors is SSRF. 298 00:26:51,600 --> 00:26:53,900 Now we can write different alerting rules. 299 00:26:53,900 --> 00:26:57,660 We can write different rules for malicious behavior as part of it. 300 00:26:57,660 --> 00:26:59,740 And then extend our dynamic testing. 301 00:26:59,800 --> 00:27:01,460 Some of the test cases were missing. 302 00:27:01,460 --> 00:27:08,040 Like, some of the test cases which should have been in place, they were missing, and we will have an opportunity to expand on them. 303 00:27:08,500 --> 00:27:18,640 But now, as we talked about our security champions program, when our champions look at different security requirements, they look at the checklist sometimes. 304 00:27:18,640 --> 00:27:26,560 Not everything can be as part of a checklist, but if they can look at some of the insecure patterns, they can understand this is critical service. 305 00:27:26,560 --> 00:27:37,080 This is something that needs careful attention of our security teams, and they can highlight us, like, hey, these are anti-patterns in our system, and can you help us design some secure mechanisms? 306 00:27:38,800 --> 00:27:44,220 So as we saw, calibration is super important when there is so many moving parts in here. 307 00:27:44,220 --> 00:27:50,980 Also, how do you measure progress with so much dynamic pipelines in place, so much parallel activities happening? 308 00:27:51,020 --> 00:27:53,300 How many bugs are you shipping pre-GA? 309 00:27:53,300 --> 00:27:57,960 How many vulnerabilities were covered as part of the design review itself? 310 00:27:58,080 --> 00:28:07,580 And also retrospectives, really quantitatively, qualitatively doing retrospectives, bringing everyone in the room together to see, like, did we do a good job here? 311 00:28:07,580 --> 00:28:12,740 And most importantly, did getting started early on help your pen test? 312 00:28:12,740 --> 00:28:15,940 That is probably the most... pen tests are expensive. 313 00:28:15,940 --> 00:28:21,560 If you don't scope them right, you're not really going to cover the real high-risk areas. 314 00:28:21,560 --> 00:28:23,840 So did it help your pen test as well? 315 00:28:25,240 --> 00:28:30,300 There was a lot that we covered, and now let's summarize towards the end. 316 00:28:30,300 --> 00:28:31,540 Key takeaways. 317 00:28:31,800 --> 00:28:36,080 First and foremost, decentralize your security functions. 318 00:28:36,700 --> 00:28:42,440 Decentralize them in a way where the key folks really know what needs to be done. 319 00:28:42,440 --> 00:28:44,520 Set your expectations right. 320 00:28:44,600 --> 00:28:47,360 Build as much security context as possible. 321 00:28:47,360 --> 00:28:48,580 That's your intake. 322 00:28:48,580 --> 00:28:52,080 Design your intake very crisply. 323 00:28:52,400 --> 00:28:56,100 Leverage tools, processes and people effectively. 324 00:28:56,100 --> 00:28:58,680 Go back and see if something's not working right. 325 00:28:58,680 --> 00:29:00,700 Go back and see, is it a tooling problem? 326 00:29:00,700 --> 00:29:01,880 Is it a process problem? 327 00:29:01,880 --> 00:29:03,700 Or is it a people problem? 328 00:29:03,740 --> 00:29:06,540 You can effectively debug from there. 329 00:29:06,540 --> 00:29:09,220 And most importantly, none of this happens in a day. 330 00:29:09,220 --> 00:29:10,740 This is very iterative. 331 00:29:10,740 --> 00:29:14,440 Take an iterative approach and be patient and keep building on it. 332 00:29:16,040 --> 00:29:18,140 So what is the endgame? 333 00:29:18,700 --> 00:29:26,120 Earlier our engineers come to us with what they have built and ask, hey, is this secure? 334 00:29:26,200 --> 00:29:31,700 And then we do a bunch of work and then let them know, hey, assure them that this is secure. 335 00:29:31,760 --> 00:29:33,720 But that's not what we want to do. 336 00:29:33,720 --> 00:29:41,640 We want to be in a state where our software developers come to us and tell us, these were the requirements which were promised. 337 00:29:41,640 --> 00:29:44,160 These were the requirements which we agreed upon. 338 00:29:44,300 --> 00:29:48,700 And now we have developed and we are ready to ship secure software. 339 00:29:50,180 --> 00:29:52,200 That's the endgame we are aiming for. 340 00:29:52,200 --> 00:29:53,160 That's it, folks. 341 00:29:53,160 --> 00:29:58,280 I hope we covered a bunch of things of how we can do this in a pipelined approach. 342 00:29:58,280 --> 00:30:00,460 Time for some questions, if you have any.