Added @RequirePOST in a couple of places where it was missing.
[FIXED JENKINS-24080] Improved security of CommandDuringBuild and its current implementations.