1 00:00:13,610 --> 00:00:15,190 Yeah, hear me. 2 00:00:15,190 --> 00:00:17,230 Thank you guys for joining us today. 3 00:00:17,230 --> 00:00:19,050 It's the last day of DEF CON. 4 00:00:19,050 --> 00:00:20,310 Appreciate that. 5 00:00:20,310 --> 00:00:22,670 And thank you for joining to our talk. 6 00:00:22,670 --> 00:00:26,410 Your CI CD pipeline is vulnerable but it's not your fault. 7 00:00:26,450 --> 00:00:29,550 So without further ado, let's move on. 8 00:00:32,800 --> 00:00:34,600 We are not moving on. 9 00:00:39,980 --> 00:00:45,720 So my name is Elad, I'm a security researcher at PsyCode with seven years of experience. 10 00:00:45,720 --> 00:00:59,400 I'm mainly focusing on web application security and supply chain security and I'm love hacking random stuff, basically everything with an IP and I'm from PsyCode. 11 00:01:00,900 --> 00:01:03,120 Hi, my name is Orin. 12 00:01:03,120 --> 00:01:05,260 I hope the presentation will work. 13 00:01:05,260 --> 00:01:12,800 So I have also seven years of experience in cyber security and I'm working in cyber security. 14 00:01:12,800 --> 00:01:22,220 In my background I used to research Kerberos and networking but currently I focus on supply chain security on the same research team with Elad. 15 00:01:22,980 --> 00:01:24,720 Thank you Orin. 16 00:01:24,720 --> 00:01:31,700 So for our agenda today we're going to start and speak about CI CD platforms, about GitHub actions. 17 00:01:31,720 --> 00:01:41,360 Then we'll speak about command injections 101 and see how command injections appears and takes place in CI CD platforms. 18 00:01:41,520 --> 00:01:53,260 Then we'll tell the story of Buzzle, how we found a critical vulnerability, a CI CD vulnerability in a major Google owned open source project. 19 00:01:53,400 --> 00:02:00,140 We'll continue with the demo and then we'll go home with some take up, takeaways and a recap. 20 00:02:00,840 --> 00:02:05,360 So starting with GitHub actions and CI CD platforms. 21 00:02:05,480 --> 00:02:09,480 So what is even CI CD platforms? 22 00:02:09,480 --> 00:02:18,780 So they are building and testing uh tool meaning they can do all the manual actions that we as a person do. 23 00:02:18,780 --> 00:02:29,480 And there are events trigger meaning we have different SCMs like GitHub, GitLab and Bitbucket and they have some sort of features right? 24 00:02:29,480 --> 00:02:37,880 You can create a pull request, you can create an issue, you can create anything else and those events will trigger that pipeline. 25 00:02:38,620 --> 00:02:42,100 So there are many, many CI CD platforms. 26 00:02:42,100 --> 00:02:49,520 There are GitLab CI, GitHub actions, Jenkins and today we are going to speak about GitHub actions. 27 00:02:49,860 --> 00:02:53,180 And why we chose GitHub actions? 28 00:02:53,180 --> 00:03:03,260 There are so many Jenkins and others because GitHub actions have four million public pipelines around the ecosystem. 29 00:03:03,260 --> 00:03:10,920 That is huge and it's appealing for attack for in a huge attack vectors for attackers. 30 00:03:11,860 --> 00:03:14,880 So let's a little bit visualize this, right? 31 00:03:14,880 --> 00:03:18,960 So we have all the events in the left side of the screen. 32 00:03:18,960 --> 00:03:24,940 We can create a new commit to the repository, we can create a new issue, we can create a new pull request. 33 00:03:25,040 --> 00:03:30,900 Then we have the pipeline that will be triggered based on that, on those events. 34 00:03:31,080 --> 00:03:36,460 Then we can create any, any uh action that we wanna do. 35 00:03:36,460 --> 00:03:41,920 Meaning we can create a task that is logging in to our Google Cloud. 36 00:03:41,920 --> 00:03:47,220 We can create a task that builds a Docker image and push that to the registry. 37 00:03:47,220 --> 00:03:52,980 So basically we can do anything that we, that we want doing that pipeline one. 38 00:03:53,720 --> 00:03:59,420 And just to understand how the basic flow works, let's imagine that. 39 00:03:59,840 --> 00:04:03,060 We have a push, new push to the repository, right? 40 00:04:03,060 --> 00:04:07,800 New commit to the main branch, maybe a side branch, everything is okay. 41 00:04:08,360 --> 00:04:12,080 Based on that, the pipeline will start to run. 42 00:04:13,400 --> 00:04:22,260 That pipeline will log in to our cloud environment, could be any one of them, and maybe we'll create a new blob in a bucket. 43 00:04:22,260 --> 00:04:24,900 So pretty, pretty easy right? 44 00:04:26,000 --> 00:04:31,920 But how does the pipeline itself logs in to our cloud environment? 45 00:04:31,920 --> 00:04:35,780 Because we ourselves need some authentication tokens, right? 46 00:04:35,780 --> 00:04:37,280 Access tokens. 47 00:04:37,280 --> 00:04:47,700 So GitHub Actions have a key store that encrypt, encrypt and save those access tokens and decrypt them one time. 48 00:04:47,700 --> 00:04:55,940 So all the secrets are being saved, encrypted, and during one time they are being decrypted and being, and being used. 49 00:04:56,080 --> 00:05:06,620 So we can have our production environment, a staging environment keys, DB access tokens, all of those inside our pipeline key store. 50 00:05:06,620 --> 00:05:09,460 And probably think about that. 51 00:05:09,500 --> 00:05:12,660 It's appealing target for an attack, for attackers. 52 00:05:12,660 --> 00:05:24,960 Because if an attacker will be able to control over our pipeline, it will be able to steal those tokens and do whatever he wants, right? 53 00:05:25,480 --> 00:05:30,660 And among those tokens, we have a special one. 54 00:05:30,900 --> 00:05:32,480 The GitHub token. 55 00:05:32,720 --> 00:05:41,600 That GitHub token spawns in every pipeline that we create and can do any action in the repository itself. 56 00:05:41,600 --> 00:05:49,580 It can create new permits, it can create new releases, it can create new actions, new pull requests based on these permissions. 57 00:05:49,580 --> 00:05:59,200 So from an attacker perspective, if he steals that token, he can do whatever the maintainer does, whatever the owner can do. 58 00:06:00,000 --> 00:06:03,100 That GitHub token has a variety of permissions. 59 00:06:03,300 --> 00:06:07,680 It can do all that I mentioned uh previously and way more. 60 00:06:07,680 --> 00:06:09,220 So think about that. 61 00:06:09,220 --> 00:06:27,600 Stealing the GitHub action, the GitHub token with privileged permissions could gain an attacker a privileged permission to the repository itself helping everybody that is using that repository and all of its end users down the line. 62 00:06:28,060 --> 00:06:37,500 So to understand how attackers are able to take over those pipelines, Erwin will take the stage. 63 00:06:37,500 --> 00:06:41,870 Thank you Elad. 64 00:06:43,610 --> 00:06:59,030 So after understanding the basics of pipelines, what permissions they have and how do they run, now we can dive into the more interesting part of how command injections come into a form in CICD pipelines. 65 00:06:59,770 --> 00:07:03,550 So just for example I have this PHP code. 66 00:07:03,550 --> 00:07:05,750 It's not related to pipeline yet. 67 00:07:05,750 --> 00:07:10,110 Raise your hand if you ever encountered this kind of vulnerability. 68 00:07:10,570 --> 00:07:12,410 If you ever seen it. 69 00:07:12,450 --> 00:07:13,390 Okay. 70 00:07:14,010 --> 00:07:14,750 Perfect. 71 00:07:14,750 --> 00:07:18,410 So about half of the people has seen this vulnerable code. 72 00:07:18,410 --> 00:07:20,270 And what is the problem here? 73 00:07:20,270 --> 00:07:23,450 The problem is simple. 74 00:07:24,090 --> 00:07:32,010 This website will execute a command using unsanitized user controlled input. 75 00:07:32,070 --> 00:07:32,950 Right? 76 00:07:33,050 --> 00:07:43,490 So what that means is that a user could perform a command injection attack by providing a malicious user name. 77 00:07:44,970 --> 00:07:46,730 Very bad. 78 00:07:46,730 --> 00:07:49,130 We don't want that in our pipeline . 79 00:07:49,130 --> 00:07:52,730 And the same logic goes for pipelines. 80 00:07:52,810 --> 00:08:12,730 Because if we will use in our pipeline a user controlled input in an unsanitized way, that means that an attacker could gain access to our pipeline and extract the secrets and run inside our environment and do all the malicious things Elad have described before. 81 00:08:12,730 --> 00:08:16,590 So we would definitely don't want this to happen. 82 00:08:16,830 --> 00:08:17,690 Right? 83 00:08:19,490 --> 00:08:29,550 To understand how GitHub pipelines injections look like, we'll first have to get familiar with GitHub workflows. 84 00:08:29,950 --> 00:08:34,490 So GitHub workflow is a single step of the entire pipeline. 85 00:08:34,810 --> 00:08:37,490 And it is a YAML configuration file. 86 00:08:37,490 --> 00:08:38,110 That's it. 87 00:08:38,110 --> 00:08:40,030 That's everything we have to know. 88 00:08:40,630 --> 00:08:47,270 To see our first example of a GitHub workflow, this GitHub workflow is called test issue. 89 00:08:47,810 --> 00:08:50,570 And we can see the on end tree. 90 00:08:50,570 --> 00:08:55,330 On end tree means on what triggers will this pipeline be executed. 91 00:08:55,650 --> 00:09:06,310 So since it is using the issues keyword, it means that any issue related event on the repository will trigger the pipeline. 92 00:09:06,310 --> 00:09:12,710 So whether an issue is opened, assigned to someone else, closed, the pipeline will run. 93 00:09:13,430 --> 00:09:16,890 And here we can see a step of the pipeline. 94 00:09:17,130 --> 00:09:24,990 A step is a single instruction of the pipeline, and it will of course run under the same VM of the pipeline. 95 00:09:25,430 --> 00:09:31,370 And the run keyword means that we're simply going to use a bash command. 96 00:09:32,150 --> 00:09:32,950 Okay? 97 00:09:32,950 --> 00:09:36,070 So here we can see echo, which is print. 98 00:09:36,070 --> 00:09:39,710 And it will print the issues title. 99 00:09:39,950 --> 00:09:40,150 Okay? 100 00:09:40,170 --> 00:09:42,550 That's still basics. 101 00:09:42,690 --> 00:09:52,770 And what will happen is before the pipeline will run, GitHub will replace that placeholder, the GitHub event issue title, with the actual issues title. 102 00:09:53,910 --> 00:10:04,830 So for example, if someone has created this is a new issue, it will create an event that will trigger our pipeline. 103 00:10:04,830 --> 00:10:14,330 And then in the bit logs we will see that this is a new issue was printed because the pipeline used the user controlled input to run a command. 104 00:10:16,510 --> 00:10:22,430 So for example, I can have that issue title or that issue title. 105 00:10:23,010 --> 00:10:26,650 And I can also have emojis in the issue title. 106 00:10:26,650 --> 00:10:28,970 I don't know if it will print them or not. 107 00:10:29,010 --> 00:10:35,470 But another example for totally valid issue title would be that one. 108 00:10:38,450 --> 00:10:39,750 It works. 109 00:10:39,750 --> 00:10:41,870 It works totally fine on GitHub. 110 00:10:41,870 --> 00:10:44,310 Because it is not their fault. 111 00:10:44,730 --> 00:10:51,610 And what will happen here is the same idea from what we've previously seen in the PHP code. 112 00:10:51,610 --> 00:11:00,650 Here the pipeline will run this command under the run execution entry. 113 00:11:00,710 --> 00:11:01,750 Right? 114 00:11:01,750 --> 00:11:15,930 And it will concatenate more commands after the echo command, which will dump the memory of the pipeline and then send all the secrets to the to an attacker controlled server. 115 00:11:16,030 --> 00:11:20,230 So that's an example for something you wouldn't want to have in your organization. 116 00:11:20,470 --> 00:11:29,470 Because then an attacker will receive your PyP token, your Docker hub token, your GCP token, your GitHub token. 117 00:11:29,470 --> 00:11:33,170 So basically whatever you use in your pipeline. 118 00:11:34,610 --> 00:11:36,990 So what is the solution? 119 00:11:36,990 --> 00:11:40,390 The solution is pretty simple. 120 00:11:40,530 --> 00:11:44,470 It is from the GitHub official documentation. 121 00:11:45,110 --> 00:11:53,150 You just have to first set the value of the user controlled input to an environment variable. 122 00:11:53,290 --> 00:11:58,070 And then use the environment variable in the command execution. 123 00:11:58,330 --> 00:11:58,930 Okay? 124 00:11:58,930 --> 00:12:02,370 That's a simple solution for bash injection in general. 125 00:12:02,370 --> 00:12:04,430 And it also works in pipeline. 126 00:12:05,530 --> 00:12:06,610 Okay. 127 00:12:06,610 --> 00:12:07,230 That's it. 128 00:12:07,230 --> 00:12:08,550 Thank you very much. 129 00:12:10,150 --> 00:12:20,410 I mean, well, if it were not protected, we wouldn't be here today, right? 130 00:12:20,410 --> 00:12:36,630 So now after understanding the basics of command injection attacks, we can now explain the new attack vector we have invented that allowed us to find thousands of vulnerabilities in open source projects. 131 00:12:37,030 --> 00:12:49,290 And also in the Basel project, which is a flagship repository of Google which could affect millions of end users if being compromised. 132 00:12:50,810 --> 00:12:54,030 So let's begin with the story of Basel. 133 00:12:56,210 --> 00:12:59,150 This is the same workflow as we have seen before. 134 00:12:59,150 --> 00:13:04,690 And it will again be triggered on issue events. 135 00:13:05,610 --> 00:13:19,450 And since we're taking security very seriously in our organization, we follow the official documentation and before executing the command, we have first set uh the user controlled input to an environment variable. 136 00:13:19,450 --> 00:13:23,950 But then we have this new step. 137 00:13:24,520 --> 00:13:27,030 And here we can see the users keyword. 138 00:13:27,030 --> 00:13:35,930 And what the users keyword means is that we are importing logic from something called costume action to our project. 139 00:13:36,930 --> 00:13:46,150 So now it means that I can get vulnerable code that someone else has written and that will run under my pipeline's permissions. 140 00:13:47,530 --> 00:13:52,410 So costume actions in a word, it is pre-built logic. 141 00:13:52,410 --> 00:13:55,870 It's like you can think about it like a dependency in code. 142 00:13:55,870 --> 00:14:08,070 Someone else has written a module, a costume action, and then to create pipelines faster, I can just import it to my project and use it and I can pass parameters to it like I do to a function . 143 00:14:08,070 --> 00:14:15,070 It will return something or it can be like a void costume action that will just perform something . 144 00:14:15,230 --> 00:14:15,990 And that's it. 145 00:14:15,990 --> 00:14:16,730 Perfect. 146 00:14:18,310 --> 00:14:36,090 And for that reason, GitHub has created the GitHub marketplace, which is like the ecosystem for pipelines and there are many open source costume actions and there are thousands over thousands and you can just import and use them and deploy faster and work better. 147 00:14:36,270 --> 00:14:39,970 Well, you can work better, but safer? 148 00:14:40,070 --> 00:14:43,290 We'll have to figure out. 149 00:14:44,350 --> 00:14:47,470 So let's take my workflow, for example. 150 00:14:47,470 --> 00:14:51,790 I've written a workflow and I'm using one costume action as a dependency. 151 00:14:52,650 --> 00:15:00,090 But what happens is that this costume action happens to use another dependency itself. 152 00:15:00,170 --> 00:15:04,150 And that costume action dependency has three more dependencies. 153 00:15:04,190 --> 00:15:07,350 And this has more dependencies and more dependencies. 154 00:15:07,350 --> 00:15:11,570 And the next thing you know, you have tons of dependencies. 155 00:15:11,570 --> 00:15:20,630 And what could happen if one of the dependencies brings commands vulnerability to my project? 156 00:15:20,630 --> 00:15:23,310 Then I'm in real trouble, right? 157 00:15:23,310 --> 00:15:36,030 Because that means that now by injecting code, I could affect the pipeline because everything you see here is part of my dependencies. 158 00:15:36,030 --> 00:15:40,010 Everything runs on my pipeline's permission and environment. 159 00:15:40,010 --> 00:15:51,470 So dumping the secrets from there could mean that an attacker gained control to my organization and I wouldn't even know that I have imported this vulnerability. 160 00:15:52,010 --> 00:15:55,810 So how would it look like from the code's perspective? 161 00:15:56,530 --> 00:16:03,250 Let's say we have a workflow and it is using, importing action one. 162 00:16:03,250 --> 00:16:06,890 Action one is using action two. 163 00:16:06,890 --> 00:16:15,790 And action two contains the same vulnerability from the first, from the previous chapter. 164 00:16:15,790 --> 00:16:26,130 So that means that now, that means that now my pipeline has command injection vulnerability even though it's not my fault. 165 00:16:26,810 --> 00:16:30,410 So that brought the next question. 166 00:16:33,620 --> 00:16:35,400 Thank you, Erwin. 167 00:16:35,400 --> 00:16:41,840 So it's all working fine in this demo lab and visualization, right? 168 00:16:41,840 --> 00:16:47,380 But we are going to look at how do we exploit this in scale? 169 00:16:47,480 --> 00:17:01,640 Meaning going over the UI and going over one by one and checking all those post actions and navigating to different GitHub repositories, it's not scalable, right? 170 00:17:01,640 --> 00:17:03,540 It won't work. 171 00:17:04,220 --> 00:17:08,460 So we thought about different methods. 172 00:17:09,340 --> 00:17:14,800 The first phase, we are going to index all the GitHub atmosphere. 173 00:17:14,800 --> 00:17:24,100 Meaning all the workflows, all the custom actions, everything into one place. 174 00:17:24,240 --> 00:17:26,500 And how are we going to do that? 175 00:17:26,500 --> 00:17:28,120 Using Raven. 176 00:17:28,380 --> 00:17:41,260 Raven will allow us, will allow us to query all GitHub atmosphere into a single DB and will query and search result and vulnerability. 177 00:17:41,260 --> 00:17:43,740 And we will query all the activities based on that DB. 178 00:17:44,260 --> 00:17:50,000 So just a quick recap about Raven, which is an open source project now. 179 00:17:50,020 --> 00:17:56,340 It will download all the workflows in one GitHub ecosystem into a Redis DB. 180 00:17:56,480 --> 00:18:00,240 Then it will index them to a graph DB. 181 00:18:00,240 --> 00:18:07,980 And then we will be able to query anything that we want based on that results. 182 00:18:08,680 --> 00:18:11,000 And that's how it looks like. 183 00:18:11,220 --> 00:18:21,480 So we have all the connections, all the custom actions, all the workflows, all the jobs, all the steps, everything that we mentioned in a single place. 184 00:18:21,480 --> 00:18:22,820 That's amazing. 185 00:18:23,040 --> 00:18:34,920 And just a closer look, we have all the workflows which are connected to some steps and in the end of go, they are importing a single custom action. 186 00:18:35,140 --> 00:18:45,200 So by finding a vulnerability inside that action, will gain us a vulnerability inside all of those workflows. 187 00:18:45,200 --> 00:18:46,320 Insane. 188 00:18:46,660 --> 00:18:49,220 Second part, querying. 189 00:18:49,220 --> 00:18:52,220 Querying based of those results. 190 00:18:53,040 --> 00:18:56,020 We queried thousands of workflows. 191 00:18:56,020 --> 00:18:59,240 I start waiting in GitHub atmosphere. 192 00:18:59,240 --> 00:19:05,640 Meaning, so it will be an important one that will affect millions probably users. 193 00:19:06,580 --> 00:19:11,420 We found thousands of vulnerability in different severity levels. 194 00:19:11,880 --> 00:19:16,060 And today, I want to talk about one of them. 195 00:19:16,520 --> 00:19:17,520 Bazel. 196 00:19:18,300 --> 00:19:23,240 Bazel is a build and test tool that is widely used among the community. 197 00:19:23,240 --> 00:19:25,500 It's a project owned by Google. 198 00:19:25,500 --> 00:19:28,700 It's a flagship by them. 199 00:19:28,700 --> 00:19:30,720 It's used by Google internally. 200 00:19:30,720 --> 00:19:34,420 And a few other companies that you probably heard of. 201 00:19:35,460 --> 00:19:38,500 And now, for the exploitation phase. 202 00:19:38,580 --> 00:19:43,160 How do we take that finding and exploit it? 203 00:19:44,320 --> 00:19:52,460 Navigating to the repository itself and to the workflow itself, we see that that workflow doesn't seem vulnerable to anything. 204 00:19:52,460 --> 00:19:53,000 Right? 205 00:19:53,000 --> 00:20:00,800 We saw how command injections looks like by utilizing a user input inside the workflow itself. 206 00:20:00,800 --> 00:20:03,660 So, we don't have nothing like that. 207 00:20:04,080 --> 00:20:16,580 We only have a custom action in another repository managed by other maintainers and other developers and it passes two inputs. 208 00:20:16,580 --> 00:20:19,340 The first one, issue title. 209 00:20:19,700 --> 00:20:21,560 The second one, issue body. 210 00:20:22,000 --> 00:20:25,180 So, probably makes you think, right? 211 00:20:25,640 --> 00:20:30,160 Navigating to the custom action and that's we have it. 212 00:20:30,960 --> 00:20:38,260 The custom action, well, vulnerable, was vulnerable to a command injection vulnerability like we saw before. 213 00:20:38,640 --> 00:20:39,940 But wait a minute. 214 00:20:39,940 --> 00:20:41,420 Not only that. 215 00:20:41,560 --> 00:20:44,300 Remember the GitHub token that we saw before? 216 00:20:44,960 --> 00:20:48,140 That workflow has a full permission to the repository. 217 00:20:48,140 --> 00:20:48,760 So, we have to exploit that vulnerability. 218 00:20:48,760 --> 00:20:54,220 Meaning, exploiting that vulnerability will gain us a full permission to the repository. 219 00:20:54,220 --> 00:21:02,560 Not only compromising the repository itself, but compromising everyone that are using it. 220 00:21:03,940 --> 00:21:06,000 Let's move to the demo, right? 221 00:21:06,960 --> 00:21:10,940 So, in the demo, we'll have two sides of the screen. 222 00:21:10,940 --> 00:21:13,240 In the left side, we'll have a repository. 223 00:21:13,240 --> 00:21:14,560 A vulnerable one. 224 00:21:14,560 --> 00:21:24,340 And in the right side, we'll have an attacker server that's waiting to get a connection and waiting to run malicious commands inside that pipeline. 225 00:21:26,140 --> 00:21:32,700 So, at the left side of the screen, as I said before, we have a repository. 226 00:21:33,380 --> 00:21:39,800 Navigating to that repository and we'll be able to see that it's pretty empty one. 227 00:21:39,800 --> 00:21:43,660 It doesn't have any releases, none at all. 228 00:21:43,660 --> 00:21:46,440 And there with me is pretty empty. 229 00:21:46,440 --> 00:21:48,460 Keep that in mind. 230 00:21:49,520 --> 00:21:55,340 Scrolling back and a maintainer saw a new issue in that repository. 231 00:21:55,520 --> 00:22:15,640 That issue will contain some build logs and some events on the OS machine and what it doesn't know, it has one malicious command that will compromise the entire pipeline, inject malicious code, will connect to a remote server and will execute some more commands. 232 00:22:15,720 --> 00:22:20,260 So, by clicking milestone, the pipeline starts to run. 233 00:22:20,660 --> 00:22:25,880 Running the pipeline will execute our command injection. 234 00:22:26,260 --> 00:22:45,240 It will bring a malicious script from the attacker server as we can see and will dump all the secrets in the memory of that pipeline and will use that to create new releases, inject malicious code to that repository and way more. 235 00:22:45,820 --> 00:22:52,500 After the injection was successfully completed, we are navigating back to the repository itself. 236 00:22:52,500 --> 00:22:54,580 And you can see we have new release. 237 00:22:54,580 --> 00:22:58,100 By a GitHub action user, not even our user. 238 00:22:58,460 --> 00:23:03,120 Scrolling down and we have that APSEC village picture right in there. 239 00:23:03,660 --> 00:23:17,500 And from the user perspective, it's not only will hurt the repository itself, we can see that the user will clone the latest version and will do a simple make build command. 240 00:23:17,960 --> 00:23:38,240 But what he doesn't know that in the moment he will do a make build command, all of his environment variables will be sent to a remote attacker server with along with some system information, public private keys, DB information and everything that he has in his environment. 241 00:23:38,240 --> 00:23:39,660 That is insane. 242 00:23:39,660 --> 00:23:49,840 So not only hurting the repository itself that has 22,000 stars, it will hurt millions of end users down the line. 243 00:23:50,260 --> 00:23:51,560 Insane. 244 00:23:52,000 --> 00:23:55,460 So, so some recap and takeaways. 245 00:23:56,460 --> 00:24:00,760 The takeaways are separated to a blue and red . 246 00:24:00,760 --> 00:24:03,720 So everybody can take something from that. 247 00:24:04,120 --> 00:24:06,800 First one, insecure input. 248 00:24:06,800 --> 00:24:11,840 Don't just pass insecure input just to an inline script. 249 00:24:11,840 --> 00:24:19,880 Like you do in code and other methods, don't use untrusted user input in untrusted ways. 250 00:24:20,140 --> 00:24:25,360 The second one is custom actions and particularly composite actions. 251 00:24:25,360 --> 00:24:29,060 They are importing logic to inside your pipeline. 252 00:24:29,060 --> 00:24:30,740 So, be careful about that. 253 00:24:30,740 --> 00:24:39,820 Don't run a vulnerable one that will compromise your entire GitHub workflow. 254 00:24:39,820 --> 00:24:43,420 And the last one, do I need to stress that enough? 255 00:24:43,420 --> 00:24:49,580 Like everything in cyber security, least privilege principle. 256 00:24:49,580 --> 00:24:56,840 So, make sure your workflow has the minimum privilege it needs to be for each one. 257 00:24:56,840 --> 00:25:02,340 So, no extra permissions and that's it. 258 00:25:02,360 --> 00:25:04,100 Thank you for listening to us. 259 00:25:04,100 --> 00:25:05,980 We have more details, thank you. 260 00:25:13,890 --> 00:25:24,890 We also want to say that Raven is open source and it is equipped with uh a query library from our previous two years of research, GitHub action. 261 00:25:24,890 --> 00:25:35,090 So, if you want to use it either for um for bad bounties, red team or for internal uh security, you are more than welcome. 262 00:25:35,090 --> 00:25:38,850 We will share the QR code for the GitHub repository as well. 263 00:25:38,850 --> 00:25:39,670 Thank you.