What is the script console and why is it the most dangerous page in Jenkins?
IntermediateConceptCredentials & security
Answer
/script runs arbitrary Groovy on the controller with full privileges. It can decrypt every credential (hudson.util.Secret.decrypt), change config, delete jobs and run OS commands. It is restricted to Overall/Administer. Keep the number of admins tiny, require SSO with MFA, and audit with the Audit Trail plugin. Agents also have a script console (/computer/<name>/script).
More on Credentials & security
What credential types does Jenkins support out of the box?BeginnerWhat is the difference between Global and System credential scope?IntermediateHow do folder-scoped credentials help multi-team controllers?IntermediateHow does Jenkins mask secrets in logs and what are its limits?AdvancedWhat authorization strategies are available?IntermediateWhat are the key permissions to understand in matrix auth?Intermediate