Why should you not run builds on the Jenkins controller?

BeginnerConceptJenkins
Answer

The controller holds credentials, job configuration and the scheduler. A build running there executes arbitrary code with access to JENKINS_HOME, so a malicious or buggy Jenkinsfile can read secrets or crash the whole server. Heavy builds also starve the UI and scheduler. Set "Number of executors" to 0 on the built-in node and run everything on agents.

All CI/CD questions

More on Jenkins