# Making the Most of AI in Open Source

> Source: <https://phpstan.org/blog/making-the-most-of-ai-in-open-source>
> Published: 2026-11-26 13:25:27+00:00

**Recommendation:** Treat issue text and other untrusted input to agents in GitHub Actions as hostile: scope credentials tightly and audit workflow permissions, since a prompt injection in an issue nearly exposed PHPStan's secrets.
More in the playbook "Securing agents and AI tools": <https://wpnews.pro/playbooks/agent-security>

# Making the Most of AI in Open Source

November 20, 2026 · 2 min read

Today I gave a talk at [TechMeetup Ostrava](https://techmeetup.cz/) about how AI changed the way I work on PHPStan. AI tools and trends change from week to week, so instead of tricks that expire with the next model, I tried to share lessons that should last.

The talk was in Czech, but I translated the slides to English. Every slide also ends with a short summary of what I said, so you don’t need the recording to follow along:

1. **What I built with AI that wouldn’t exist without it** :[documentation for all 1100+ error identifiers](https://phpstan.org/error-identifiers) , and[PHPStan Turbo](https://phpstan.org/blog/phpstan-2-3-leap-in-performance) , about 200 thousand lines of C++, even though I don’t know C++.
2. **AI in everyday work on GitHub** : keeping the documentation in sync with the code, and`phpstan-bot` fixing bugs I assign to it.
3. **One big disaster that almost happened** : how a prompt injection in an issue could have stolen PHPStan’s secrets, how I fixed it, and the GitHub Actions security traps that have nothing to do with AI.
4. **Mob Programming 2.0** : why I’d rather get a well-described issue than a generated pull request.
5. **Where humans are still irreplaceable** : taste, priorities, and the idea an agent doesn’t come up with on its own.
6. **Take care of yourselves.**

Click into the slides and use the arrow keys, or the controls in their bottom left corner, which also go fullscreen. They’re also available [on their own page](https://ondrejmirtes.github.io/ai-v-open-source/en/), and the [Czech original](https://ondrejmirtes.github.io/ai-v-open-source/) too.

If you’re running AI agents in GitHub Actions, the third part is the one I’d read first.
