Okay, let's start. Hi, everybody. Today we're going to talk about... Okay, maybe I won't use it. Okay. Today we're going to talk about some GitHub action worms. So this talk is going to be very technical. Can you hear me good in the back? Yeah? Woo! Let's go. I try to not lose you if you get lost. You'll have something that will show you the progress bar on the bottom of the slides. And this is basically a result of research I did. It took about three months. My basic goal was to find a new way to attack CCD pipelines. And this is what I came up with. This is a new way which will understand slowly the real impact and the scale of it. So a bit about myself. My name is Asik Reynolds. I'm a security researcher currently at Palo Alto Networks. And I'm going to talk a little bit about myself. I have around eight years of experience in cybersecurity. I've done incident response, SOC security architecture, and of course, application security. For the last two years, I've been working for cybersecurity, which was acquired not too long ago by Palo Alto Networks. And I research CCD security and all the things that revolve around it. So let's talk about some notable projects I've been a part of. So the first one is the Top 10 CCD Risks. This is a project we released about a year ago. And it was embraced by OWASP. You can find it on GitHub, also on OWASP's website. The second one is the CCD Go. This is a deliberately vulnerable CCD environment, basically a CTF, in which you can hack a real CCD environment that's being installed on your local computer. You can find it on GitHub, download it, play with it, and learn how to hack CCD pipelines. Now, before we begin, let's do a quick overview of what gave us the name GitHub Actions is. So how many of you are using GitHub Actions, by a raise of hand? Okay, that's a lot. Nice. So I'll do this quick, and we'll just get everybody to the same page. So GitHub Actions is a continuous integration, continuous delivery platform, CACD, that allows you to automate your build, test, and deployment pipelines. You can see on the left side, there are events that can trigger pipelines, such as push, pull request events, and so on. And pipelines in GitHub Actions can be used to run multiple jobs. So workflows can contain multiple number of jobs, as you see. Each job is running on a different runner, and on each job can contain multiple number of steps. Each step can contain a bash command or an action. What is an action? An action is basically a code package that allows you to use someone else's, let's say, library to execute some stuff in your pipeline. For example, you want to do something that probably everyone does, like checking out the code from the repository to the runner itself. You don't want to develop it yourself, someone else probably already developed it. So you can use an action that checks out your code from the repository to the runner itself. Now let's see an example of a workflow, a simple one. So let's start with our first part. So we have the on keyword, which is the triggers of the workflow. Here it's triggered by a workflow dispatch, which is a manual trigger. Push to the main branch. And to access a new command, you control the application with ID ĐỞPù mistress. I do that, pull requests. Pretty easy. Next we have the jobs. We have only one job here. It's called check links and it's running on an Ubuntu virtual machine. Next we have the steps. So here we have the first step that checks out the code and it uses an action. The name of the action is actions slash checkout at v3. Now what v3 means, it's the version of the action and the actions slash checkout is the organization slash repository. So actions are contained in a GitHub repository and this is how you reference them and how you call them. This specific action was written by GitHub themselves. The actions organization is an organization that's maintained by GitHub. Next we have the setup node step which uses a setup node action which also receives two inputs as you can see here. Actions can also return outputs which is nice. Simple stuff. And next we have a bash command that's using the to do NPMCI, install the dependencies of the package here. And after that we see a third party package. This is a package that was written by someone on the internet and published as a public repository and we're using it here. You can see at the end there's a different reference type. This reference is a hash commit of the repository. We'll go later exactly into what it means and how we can use it but this is the basic idea of workflows. And here you have a screenshot of the GitHub actions actions. And finally, let me tell you about the GitHub marketplace. The GitHub actions, the GitHub marketplace and specifically the actions. When I took this picture not too long ago, there was around 19,000 actions on the marketplace. The vast majority of them is actions written by the community. Some of them are written by GitHub. Some of them are written by vendors. But the majority are is written by kind people on the internet. So let's talk about the worm itself now, finally. So in order to understand how to build the GitHub Actions worm, we need to understand a few parts of the puzzle, which we will build during this presentation. And the different parts are initial attack vector, action dependencies, action to infect actions, and finding attack graphs at scale. Now, if this doesn't mean anything to you right now, you'll understand it in a few minutes. But we'll go through each one of them, basically completing the puzzle. And when the puzzle will be finished, we'll be able to show a demo of the worm itself attacking repositories. So let's start with initial attack vectors. So most of the CICD attacks that happened up until now were done kind of in a similar fashion. Basically, attackers compromised a repository or a package or some kind of a project. And they infected it with code that is used to directly infect. The direct dependence of the package. Let's show some examples. So one of them will be to exfiltrate environment variables when the package is being run, to steal maybe secrets from the pipeline execution or from production environments. Second thing may be to run a reverse shell. When this package is being run in production, it will start a reverse shell, allowing attackers access to production environments. But when they compromise a package, they basically only affect the direct dependence. And let's see a few examples of how to compromise GitHub repositories specifically with some known attack vectors. So we're going to talk about three attack vectors. I've implemented scanning automatically for those attacks to look for vulnerable repositories that are vulnerable to those attacks in my research. So this is the reason they're the only ones relevant for this presentation. But of course, there are more. So let's go through them. The first one is the attack. The second one is repo-jacking. What is repo-jacking? On the left, we have a repository that's using the action in the middle. The action is part of an organization. And let's say one day the maintainer wakes up and decides to move the action to a new organization. Nice animations. So what happens next? The repository makes a request to the action, and GitHub automatically redirects it to the new repository. That's great, right? But what happens when the maintainer decides to delete the old organization? What happens? Well, when it doesn't exist anymore, an attacker can come and basically register the same organization name and same old repository name. When another request is being made by the repository, it will cancel the redirection, which will actually compromise the repository that is using the now malicious action instead of the original one, which was moved or maybe deleted. Now, GitHub knows of this issue, and they've made a mitigation. They retired the namespaces of projects that had more than 100 clones in the week leading up to this. They have an election system called But still, it's not full proof. It's not sealed tight. There are still cases which repositories are reprojectable. We want to talk about why, but I'll show you some real examples of repositories that have reproject, but it's still possible. So just know this for now and you can look it up later. The next one is NPM email hijacking. So here we want to basically hijack an NPM package. How can we do it? So we pass the package log JSON over a repository, getting all the packages, that the target repository that we want to compromise is using. For each package, we'll send a request to the NPM registry to get the manifest of the package. Inside the manifest, we find a few interesting things, the maintainers and their emails. For each email, we can send a request to check if the domain of the email is available for purchasing. Basically, the maintainer created an email for themselves and they forgot to renew the domain or the domain got expired or deleted or something like that. And if it's possible to buy the domain, we buy the domain. We can then set up a mail server, redirect the emails to our inbox, and reset the maintainer's password. Now, this is only possible on accounts that don't have two-factor authentication, but still, a lot of accounts that have two-factor authentication. And, of course, I'll also show you a real example later. Now, NPM also knows of this issue, and this is a snapshot from them. This is a snapshot from their documentation, and they're saying that they periodically check if packages have expired domains, and if so, they disable the account from doing password resets. The issue is that today, there are on NPM around 2.5 million packages, probably huge numbers of different domains, and it's pretty hard to scan them daily or even weekly. I don't know how long they're doing it for, but let's say you're an attacker and you want to target specific packages, and you scan them even hourly if you have a few packages, and you check if the domain is expired or something like that, and you can buy them before NPM makes their checks, you can still take over the package and do this attack, of course, if they don't have two-factor authentication. And the last one is command injection. So, here we have a code snippet from a GitHub action. You can see here a simple configuration of the Git client, and then pushing some code to the repository. Now, in the line with the red box, you can see that it's using something that's called context. So, as I told you, GitHub actions, GitHub workflows, when they're triggered, they're triggered by an event. The workflow itself receives the event in the type of a context, and it can access some fields on the events and get data about what triggered the event itself. So, for example, one of the events that are available is the author email of the head commit. Now, who controls the author email of the head commit? Whoever did the commit and not the maintainers of the repository. So, they can write, anything they want there. One of the funny things they can write in the author email of the Git commit is this string. What is this nice string? This is basically command injection. We write an email. We do like a small back tick before and after the curl command. We download a malicious bash script and execute it inside the pipeline. So, you simply do that on your computer, push the code with this nice email, and it will cause this code snippet here to execute your code, download the bash script, and execute malicious stuff, which is nice. Now, of course, there are more attacks. As I've told you, some of them are dependency confusion, public PPE, and just creating a malicious pull request, hoping the maintainers will merge it. Now, you think maybe this is crazy, but actually someone did it to the Linux project about a year or two ago. They didn't like it so much, but they actually successfully committed malicious code with a vulnerability to the Linux project. And, of course, there are more. I won't get into what each of those attacks are. You can look it up on Google, but just know there are more possible ways. Now, how can we further our attack? We just understood how to compromise a single repository. Of course, here we're going to talk about worms. We want to compromise infinite repositories. How can we do that? So, next thing we'll talk about is action dependencies. Now, there are a few types of actions. Three types to be exact. The first one is a Docker action. You can see here it's using a Docker file. You can also use... a Docker image to define what the action does. Now, what you're seeing here is the action YAML file. This is a file that sits at the root of the repository that defines what the action actually does. So, this is like the main function of the action. So, this is simple. Next, we have a JavaScript action. You can write plain JavaScript. And this is also relevant for the NPM email hijacking attack because if an action uses JavaScript and it has a dependency that we can hijack, we can hijack the action. And the third one which is important for the dependency part is a composite actions. Now, composite actions can use other actions as part of their logic and they can also execute bash. So, this is the first type of dependencies between action. A composite action can actually depend on other action and just execute it when it's been executed. Now, what is the second way actions are depending on each other? Actions are stored on GitHub. They obviously need their own CICD. And most of the times, what CICD platforms do they use? GitHub actions, of course. So, here's an example of a GitHub workflow of an action. You can see that it uses other actions. Well, this is a dependency not in a similar fashion that we know like code libraries. This is kind of an implicit dependency. Now, this action is depend... The action that this workflow belongs to is depending on the actions that are being ran inside its workflow, but it's not part of the code itself. Now, as you saw in the snippet that I've showed you of the command injection, maybe it has some permissions. Maybe we can, by compromising an action in the workflow, push malicious code to the repository. Maybe we'll see it. Maybe not. Maybe nothing will work. So, this is the other way actions are dependent on each other using other actions in their CICD. Now, what we can do is basically take those two files, parse them, and build a huge tree on Neo4j of action dependencies. And this is exactly what I did. And this is how I do art. I don't know how to paint, so this is my art. I create flowers of dependencies using GitHub Actions. I promise you this is a random query of the database. I didn't make it, like, by myself. So, what we're seeing here are action dependencies. We can see a repository with a purple node. Now, we parse the files and we can see all the action usages. Each orange node of an action usage is an action which comes from a repository. So, we have a purple node that's connected to an action usage node, which is connected to the repository of the action being used and so on. It goes recursively. And you can see this in this beautiful flower that we have all the actions, like, on the outer side of the flower that are dependent on the one in the middle, which is nice. Let's see the same graph in a different way. This is the same graph. Now, here we want to target the repository on the left. How can we do that? Let's say we have some weak link in the chain. Some action is using another action, which uses another action. And the other action was created by someone random on the Internet. They probably made it. They didn't make so much effort to secure it, so on. So, we can maybe compromise it. And by compromising that action, potentially, we may be able to climb up the tree, infect all the actions that are dependent on it, and reach our target. Now, how can we do the initial infection of the weakest link? This is by the... You can see the line that is missing there, but we can do it using one of the initial attack vectors that we talked about earlier. So, we have a few parts of the puzzle. We know that we have the initial attack vector, and now we need some kind of a way to infect actions and to jump from one action to another action. So, let's see actually how to do it. So, action to infect actions. We'll start with talking about secrets in GitHub Actions. So, here we have an example workflow that I'll use to explain how secrets work. So, we have the first job on the top that's using the first secret, as you can see, and the second job that uses the second secret on its second step. Now, you can see some interesting bash code here in the red box. What this bash code does is basically dump the memory of the runner and grab four secrets in its memory. Now, secrets are stored in clear text in the memory of the runner. I know this thanks to research by a guy that's mentioned here below, Karim Rahal. And what he described in his research is that the job receives all the secrets that are being used inside the job even before it starts. So, it doesn't matter where we dump the secrets inside the job. We'll get all the secrets that are available. So, here we see an example that we're dumping the secrets even before it's being used. And let's see how the secret dump will look like. So, this is the decoded base64. This is the dump. We see the second secret and its value. I'm a secret. And we also see a GitHub token. We'll get in a second into what GitHub token is. But so far, we know that all secrets are accessible to all steps in a job. We didn't see the first secret because it's on a different job which runs on a different runner. We only saw the second secret. Another point worth mentioning is that on self-hosted runners, if they're not configured correctly and they're not destroyed after each execution of a workflow, they're not able to get secrets of past jobs that were ran on the same runner, which is much cooler. And the GitHub token is accessible, although it wasn't even referenced in the workflow at all. So, these are the two important things we know. And what is the GitHub token? So, in the start of each workflow, GitHub generates a token for the workflow so the workflow can use it to authenticate to GitHub's API and perform actions like pushing code to the repository, publishing comments on pull requests, querying some data about the repository, basically identifying as the workflow itself. Now, to understand the next part, we'll get into how actions are being called. Everything will just get... will complete the picture in a few seconds. So, there are three main ways to reference actions. There are more ways, but those are the ones that are relevant for this presentation. We can reference an action using a hash commit. We can reference it using a branch or a tag. So, the GitHub actions runner will know which action it needs to fetch. Now, if we want to infect actions, we need to modify one of those references. Now, modifying an existing commit hash might be a bit difficult, but we can create a new commit to an existing branch, and something else we can do is we can delete an existing tag, creating a new malicious commit, and creating the same tag name with the new malicious commit. Now, let's see how it's actually being done. Just a diagram. So, here we have an action repository on the left, which uses GitHub actions as its CICD, and it uses the compromised action on the right using the main branch reference. Now, we want to infect the main branch of the left action. How can we do that? So, when the job begins, of course, as we said, the runner generates a GitHub token for the job, and also because we can dump secrets, as I showed earlier, we may be able to use some personal access tokens that are being used during the workflow. Maybe they also have some nice permissions that we can exploit. So, when the compromised action is being run, it can use this token to push code back to the main branch. Now, this is only possible if the main branch doesn't have branch protection rules, but what can we do if it does have branch protection rules? We can do the same thing. Let's see here, like, a different scenario. We want to infect the temporary branch, so same thing. The token is being generated. We push code to the unprotected branch because the main one has branch protection rules, and then we push a new tag to the repository, and by that, overriding an existing tag, which will now cause any new requests for using the action to use the new malicious tag. We'll see an actual example of this in a few minutes. And to do that, of course, all those pushes and stuff like that, and deleting tags, we need permissions. So how does the GitHub token permissions work? So up until not too long ago, all the repositories had default write permissions for the tokens. GitHub changed it about half a year ago, but this still means that most of the repositories on GitHub nowadays have write permission to the token by default, which is great for hackers, not so great for the maintainers of the repositories. And what maintainers can do if they still need the write permissions, they can override the permissions of the token specifically for specific workflows, like this snippet here, which says that the content permission which is used for pushing code to the repository will be set to read, even though the repository is defined to have write access for the token. Now, in my research, I wanted to find which repositories are actually vulnerable to this kind of attack, and which repositories will allow the worm to spread between them, so I needed to calculate what is the actual permissions of the GitHub token. Now, if I see this, I know the exact permissions, but if it doesn't exist, I need to find out the default permissions of the repository. How can I see that? We can look at the logs. It says there, right in clear text, the GitHub token permissions are right, and we can just pass the logs. It sounds simple, but to actually implement it and get all the logs from the repositories and get the ones that are relevant is a bit more complicated than I expected at first, but it worked eventually. So let's do a quick recap of what we've got until now. So the first step to execute the worm is to compromise a repository using one of the three initial attack vectors I've showed earlier. The next step is to infect actions by using the GitHub token or a personal access token inside the repository to push code to the main branch, one or another branch that is being used, or override an existing tag. By that, we'll climb up the tree of action dependencies, and we'll reach the target repository in which we'll be able to execute code, steal secrets, maybe modify its code, and a lot of fun like this. Now, let's start with the automation. How can we find vulnerable repositories like this one at scale? So what I did was this process. So the first thing I did was to collect targets. I collected two types of targets. The first one is the top 10k repositories in GitHub by stars, and the second one was 32k repositories of companies with bug bounty programs. I collected this data using a database that's here in the picture. It contains a lot of bug bounty programs. And what I did next is to filter out all the repositories that are not using GitHub actions because it's not relevant. Then I cloned each repository to my computer, checked for the three initial attack vectors. If I found one that's possible, I added a red node inside the Neo4j graph, and then I collected metadata about the actions. So I collected... I passed the action YAML files and the workflow YAML files that we've seen earlier to find which actions this repository is depending on. And I collected this metadata about each action. You can see if the content write permissions is true or false according to the calculation of the different permissions and the override of the permissions inside the workflow file. We can see here the name of the action, which line it was used in, what secrets are accessible to it inside of the job. Here it's empty, but of course there are a lot of secrets that are accessible to a lot of actions. And next thing we do... Next thing I did was to go through this step for each action. So for each action dependency I find, I clone its repository, search for its dependencies, check for initial attack vectors, and for each dependency, this process goes on and on and on. And by using this process, we can create this beautiful graph. Now, this is a real case of a project that's vulnerable to this attack. Now, let's explain what we're seeing here. So at the bottom we see two red arrows that are pointing to two initial attack vectors. Now, those two repositories that it points to are actually the same repository which was moved from one name to another. So it has two references, but it's actually the same repository. Now, what this repository is, is a dependency of some other actions that are using it. And those other actions are a dependency of the target repositories that have started scanning. So in this picture, we can see that by attacking one repository and compromising it, we can compromise 18 intermediate actions, and by compromising them, we can compromise 72 of the target repositories I initially started scanning, which is super crazy, but still this is not the whole picture and the impact and scale of this attack. Sadly, I cannot disclose the exact names of those repositories. I can tell you that the target repositories that you see here are target repositories of huge companies, names that all of you know, and I'll show you some real examples which I can disclose to describe the real impact and scale of this attack. So here's a real example that I can show all the participants in this attack graph. So what we're seeing here on the bottom left side, you can see the Hangfire repository, which is a popular open source about 8K stars on GitHub, and it uses two actions, which you can see in the orange nodes. Those two actions come from two repositories, the Veracode repository at the top and the PayPlotter repository at the bottom. Now, the PayPlotter repository has a red node connected to it, which says Reprojecting, meaning this repository is reprojectable. Now, next thing I did was to register the organization. I am the owner of the PayPlotter organization, and as you can see here in my screenshot, I can register the ActionZip repository. Now, I didn't do that in order to not break anyone's pipeline or execute malicious code on innocent people, but it's possible. I still own this organization. And I, of course, reported this issue to the other repositories that are depending on it, and they fixed it. But let's see how their workflows looked like. So this is the Veracode repository, the Veracode workflow. You can see it's using the PayPlotter, the action that I'm able to reproject. And you can see here the Hangfire repository. We chose the PayPlotter and the Veracode repository. So, and also in the middle, you can see some secrets that it uses that, of course, this worm can potentially access. So this means that in order to attack these Hangfire repositories, we have two paths. We can directly attack it using the ActionZip reprojectable repository. We can also reproject the ActionZip repository, infect the Veracode repository, and through that, infect the Hangfire repository. Now, this looks simple, right? This is the same diagram. We see the same repositories. So, okay, we reproject this one repository. We get to two other repositories. Sound boring, right? But you can see because there is a lot of empty space on the slide that there's actually much more to that. So let's say we do this attack. We reproject the ActionZip repository, and we by that infect the Veracode and the Target repository. But this is not the whole story. The Veracode repository is an action by itself which has 1.6k dependents which we can also infect them. And these dependents probably have more dependents and more dependents and so on. So that's it. And the ActionZip repository also have about 600 dependents which probably have maybe their own dependents. So we can see this looks like, okay, that's a lot of repositories. Instead of attacking like three, I can now attack like 2,000 repositories. Yeah, it's nice, but still there's a lot of empty space on the slide. The Hangfire repository actually creates a NuGet package which has 9.4k daily downloads, which is nice. So we can also compromise all the 9.4k daily downloads of the NuGet package. But this is still not the full picture. Now, this is only public information. Those are only public repositories that we've seen. What about all the private repositories? There are probably a lot more private repositories that are dependent on this action. And by infecting them, we can also propagate inside private organizations. Now, let's say even if we don't have right permissions for the GitHub token, actually running the worm inside those private repositories, they give us read permission, which you can use to exfiltrate source code of a lot of companies, potentially organizations. So you can say now, okay, so this is really cool, real crazy, huge impact of the attack, right? But that's not it. That's just one scenario, one attack path. I found a lot of those. And this is actually the real impact of the attack. Woo! Woo! Nice, yeah. Let's see some energies. Now we finally have all the different puzzle pieces combined. And the next thing we can do is some PowerPoint magic. And let me introduce you the dendro worm. The word dendro comes out of the word dendrology, which is the science and study of woody plants. This is how I called my pet worm. And let's see how the demo actually looks like. So in the demo, we'll see this environment. In this environment, we have the target repository on the left, which uses a GitHub Actions CACD workflow that uses the random action using a V1 tag annotation. The random action also uses GitHub Actions, and it uses the main branch annotation of the RevDate action in its workflow. The RevDate action is a composite action which uses directly the Rev action. Now, as an attacker, what we'll do is we'll start with right access to the repository on the right. We'll infect it with malicious code of the worm, and then it will automatically, of course, infect the composite action because it uses it as part of its logic. And then we'll see what happens when a maintainer of the random action creates a push to the main branch of its repository, which will trigger the workflow. When the workflow is being triggered by running the compromised action, the worm will infect the repository by overriding an existing tag, which this tag is being used by the target repository. So when the target repository workflow is being ran, it will actually execute the model itself, and then it will be able to steal secrets. Now, let's see the demo itself. Let's do duplicate. Okay, nice. Okay, you can see here in the bottom, there's the same graph that I've shown you. It's dynamic, so it will evolve during the demo. On the right side, you can see the terminal of the server, and on the left side, the repositories. Now, we'll start with the first repository. Here it's an ActionML file, and we're infecting it with malicious code, some Zoom magic, and we see that we're downloading a malware from the server and installing it as a Python package, and executing it. Now, I did it using Python just as a PLC, but this, of course, can be done much more stealthy. And now we commit the changes to the repository, and we go to the second repository. Now, the second repository, we can see it uses the first repository as part of its composite ActionML file, which means this repository is automatically compromised, because next time it will run, it will run the malicious action we've just infected. Next thing we see is the third repository, which is the CICD action. Here you can see it just generates a random number, which does nothing, and it has a CICD workflow. Now, this workflow uses the second action as part of its logic. You can see here, so it's using the main branch, which is infected because of the composite action. And another thing we can see, this repository has a V1 tag that was created yesterday, which we'll override soon. Now, here we can see the maintainer pushes new code to the main branch, which you'll see here, it's protected using branch protection rules. This is why the override is needed. And this push triggers the workflow we've just seen. And you'll be able to see in a few seconds, on the right, the worm being executed. Here you can see it's being downloaded, executed on the left. And in a few seconds, we'll see the actual infection. And you can see that it didn't successfully infect it using a push. But it successfully infected it using override of the tag itself. And also, it printed out all the secrets that are available, which is only the GitHub action token. And we can see now the tag that was overwritten just now. Here is the new malicious code, same code like the infection we did at the start. And now we're seeing the target repository, which also has HCI, which uses the action that just got infected using the V1 tag that was just got also infected. And it's also using the very secret, secret, very cool name. And what we see here next is the maintainer of the repository pushing code to the main branch, like everything as usual, business as usual. And it will trigger the workflow that we've just seen. And same thing happens. We'll see the malware being downloaded. And executed and installed. And you can see here that it successfully exfiltrated the secrets from inside. You can see it failed to infect the action, the workflow, the repository, because it's not an actual repository, but it did actually infect the secret. Still a secret. Woo! Thank you. Okay, let's continue. Okay. So we've just seen the demo of the actual malware. And we have a bit of time, so I'll show you more interesting stuff I found out during this research. So turns out there are a lot of repositories that are directly vulnerable to the three initial attack vectors I've shown you at the beginning. I found 175 repositories directly vulnerable to those three attacks, using 192 different ways. So some of the repositories had multiple command injections available on them, multiple NPM email hijacking of packages they're using. And those projects are actually projects of really known organizations. You can see the coolest one is I found a command injection in Angular, which is crazy. Probably everyone here is using Angular in some sort of a way, maybe as a user, maybe as a developer. Also, I found some command injection in a popular open source you can see here, the Astro open source, Canva. And in the last bullet you can see I hijacked one email domain of a company that's called Plotly. And of course I reported it to them, but by hijacking, by possibly hijacking that one domain, I could compromise 67 repositories that were maintained by this one user that belonged to this company. Now this user actually had like 90 repositories, but only 60 of them belonged to the company. So technically I was able to compromise 90 repositories by actually buying a single domain of a single user that forgot to renew its email domain. And now that we're nearing the end, let's talk about how actually you can protect yourself from this attack. So the first and most important thing you can do, it's ordered by most effective stuff to the less effective stuff. So you can set the GitHub token and any personal access token being used inside workflow to minimal permissions. Basically the content permission is the permission that's used to push codes. So if you don't need to push code to the repository, set it to read. You can also configure branch protection rules to prevent pushes to used branches and use protected tags, which is a less known feature of GitHub. Also you can limit outbound connections from runners to prevent downloading of malware, like in this example. Now of course the worm itself can contain its own code inside its own code without accessing the internet and still infect stuff, but it makes lives of attackers much harder. You can also pin actions by using a hash, which also makes it a bit difficult for attackers to perform this attack. It's still not sealed tight. And you can also use this project that was released by GitHub not too long ago, which helps you to reduce permissions for your workflows. That was the GitHub Actions worm, and thank you everybody for coming. I think if we have some time for questions. Do you have a mic? Yes. Okay, so we asked, how can I pass branch protection rules to override a tag? So branch protection rules don't affect tags. So even if you have branch, you need to use protected tags. It's a different feature. More questions? Yes. Can you say again a bit louder? I can barely hear you. Ah, yeah. Yeah, okay. So the companies have showed, that have reported this issue to, they fixed their workflows, they removed vulnerable actions, which makes them, which basically mitigates this issue. Most of the companies that had more like, complicated graphs, like you had to compromise a dependency of a dependency, they didn't consider it as an issue, because it's dependencies, and like in bug bounties, or generally in vulnerability disclosure programs, they consider it out of scope, or not relevant, but yeah, it's still possible to attack them this way. More questions? Yes. Okay, so if I come around any malicious action, being used in the wild, actually didn't see anything. I didn't look for them, so that's maybe the reason. But there are malicious actions, like probably around there. Not doing this stuff probably, but maybe other stuff, yeah. More questions? More questions? Okay, thank you.