echo 'my own key' >> /home/jenkins/.ssh/authorized_keysstage 'Destroy'
'rm -rf /home/jenkins'.execute
echo 'Bye!'I see there are two different points:1) Securing your Jenkins instancea) Probably you could add some security policies:
b) Avoid granting privileges to the 'jenkins' user more than the required
c) Also you could develop a particular plugin to avoid running jobs which contains those particular rm -rf, although some evil might skip that and do something else...
2) Configuration Management toolsRegarding your authorized keys, if you use any kind of Configuration Management tools you might fix that easily as those systems won't be in the expected state and will be changed immediately or after a period of time.
Although I'll prefer to trust my users rather than stopping them/blocking them. But that's my point of view.
--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/771ee4fe-5ed7-4d22-9891-f6c73777a426%40googlegroups.com.
For instance, I can create a freestyle job with a script step that does something like:echo 'my own key' >> /home/jenkins/.ssh/authorized_keys
I can write a pipeline like:stage 'Destroy'
'rm -rf /home/jenkins'.execute
echo 'Bye!'