logoalt Hacker News

mrdosijayesterday at 9:05 PM4 repliesview on HN

So it wasn't phishing attack? Wonder how those bot access tokens got stolen.


Replies

jameskiltonyesterday at 9:15 PM

> The PR was opened, the workflow run, and the PR closed within the space of 1 minute (screenshots include timestamps in UTC+2, the author's timezone):

It's an unfortunately common problem with GitHub Actions, it's easy to set things up to where any PR that's opened against your repo runs the workflows as defined in the branch. So you fork, make a malicious change to an existing workflow, and open a PR, and your code gets executed automatically.

Frankly at this point PRs from non-contributors should never run workflows, but I don't think that's the default yet.

neoecosyesterday at 9:17 PM

They do explain all the details how the got the tokens stolen.

animexyesterday at 9:26 PM

It explains in the article under "Why did it happen?".

moi2388yesterday at 9:16 PM

They explain how.

“ At 5:40PM on November 18th, now-deleted user brwjbowkevj opened a pull request against our posthog repository, including this commit. This PR changed the code of a script executed by a workflow we were running against external contributions, modifying it to send the secrets available during that script's execution to a webhook controlled by the attacker. These secrets included the Github Personal Access Token of one of our bots, which had broad repo write permissions across our organization.”

show 2 replies