Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improvement: Speed up public organization enumeration #49

Merged
merged 25 commits into from
Dec 8, 2023

Conversation

AdnaneKhan
Copy link
Contributor

@AdnaneKhan AdnaneKhan commented Nov 19, 2023

This PR addresses the core problems highlighted in #44

For large public organization enum, Gato will now only perform run log analysis if repositories pass a heuristic based on workflow analysis. Additionally, Gato will use the GraphQL API to download all workflow ymls and cache them before enumerating individual repositories.

Additionally, Gato will be more selective with the run logs it downloads to avoid downloading duplicate logs for the same workflow file and trigger. Furthermore, I've added a new heuristic that will determine whether a self-hosted runner is ephemeral. The heuristic works by looking for the clean repository step in the output for actions/checkout. Note, this is a heuristic, and it may be subject to false positives (rare, but possible in limited scenarios with caching), or false negatives (more likely).

With these changes, you can run Gato against a large organization like Microsoft within a reasonable time. This supports continuous testing and monitoring use cases as more organizations become aware of the dangers of self-hosted runner misconfigurations.

@AdnaneKhan AdnaneKhan merged commit 3ca6e79 into dev Dec 8, 2023
21 checks passed
@AdnaneKhan AdnaneKhan deleted the update/checker_and_faster branch December 19, 2023 02:56
@mas0nd mas0nd restored the update/checker_and_faster branch April 16, 2024 22:38
@mas0nd mas0nd deleted the update/checker_and_faster branch April 16, 2024 22:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant