{"action":"created","issue":{"url":"https://api.github.com/repos/samrocketman/jervis/issues/67","labels_url":"https://api.github.com/repos/samrocketman/jervis/issues/67/labels{/name}","comments_url":"https://api.github.com/repos/samrocketman/jervis/issues/67/comments","events_url":"https://api.github.com/repos/samrocketman/jervis/issues/67/events","html_url":"https://github.com/samrocketman/jervis/issues/67","id":82223456,"number":67,"title":"GitHub plugins security realm research","user":{"login":"samrocketman","id":875669,"avatar_url":"https://avatars.githubusercontent.com/u/875669?v=3","gravatar_id":"","url":"https://api.github.com/users/samrocketman","html_url":"https://github.com/samrocketman","followers_url":"https://api.github.com/users/samrocketman/followers","following_url":"https://api.github.com/users/samrocketman/following{/other_user}","gists_url":"https://api.github.com/users/samrocketman/gists{/gist_id}","starred_url":"https://api.github.com/users/samrocketman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samrocketman/subscriptions","organizations_url":"https://api.github.com/users/samrocketman/orgs","repos_url":"https://api.github.com/users/samrocketman/repos","events_url":"https://api.github.com/users/samrocketman/events{/privacy}","received_events_url":"https://api.github.com/users/samrocketman/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/samrocketman/jervis/labels/developer%20notes","name":"developer notes","color":"5319e7"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-05-29T02:39:31Z","updated_at":"2015-05-29T04:13:29Z","closed_at":null,"body":"All of these scripts were run in the [Jenkins script console](https://wiki.jenkins-ci.org/display/JENKINS/Jenkins+Script+Console).\r\n\r\nI partially looked at the source for the [github-oauth-plugin](https://github.com/jenkinsci/github-oauth-plugin).  I also found how to list methods on a class from the [groovy almanac](http://groovy-almanac.org/list-the-methods-of-a-groovy-class/).\r\n\r\nGet the GitHub API URL from the configured Security Realm (github-oauth-plugin).\r\n\r\n```groovy\r\nprintln(Jenkins.instance.getSecurityRealm().metaClass.methods*.name.sort().unique())\r\nprintln(Jenkins.instance.getSecurityRealm().getGithubApiUri())\r\n```"},"comment":{"url":"https://api.github.com/repos/samrocketman/jervis/issues/comments/106678892","html_url":"https://github.com/samrocketman/jervis/issues/67#issuecomment-106678892","issue_url":"https://api.github.com/repos/samrocketman/jervis/issues/67","id":106678892,"user":{"login":"samrocketman","id":875669,"avatar_url":"https://avatars.githubusercontent.com/u/875669?v=3","gravatar_id":"","url":"https://api.github.com/users/samrocketman","html_url":"https://github.com/samrocketman","followers_url":"https://api.github.com/users/samrocketman/followers","following_url":"https://api.github.com/users/samrocketman/following{/other_user}","gists_url":"https://api.github.com/users/samrocketman/gists{/gist_id}","starred_url":"https://api.github.com/users/samrocketman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samrocketman/subscriptions","organizations_url":"https://api.github.com/users/samrocketman/orgs","repos_url":"https://api.github.com/users/samrocketman/repos","events_url":"https://api.github.com/users/samrocketman/events{/privacy}","received_events_url":"https://api.github.com/users/samrocketman/received_events","type":"User","site_admin":false},"created_at":"2015-05-29T04:13:29Z","updated_at":"2015-05-29T04:13:29Z","body":"Scripts like this can also be executed in jobs by using the [Groovy plugin](https://wiki.jenkins-ci.org/display/JENKINS/Groovy+plugin).  However, only scripts running in the system context can execute these scripts.\r\n\r\nConfiguring system-wide groovy scripts in a job can only be done by admins.  Which, admins can see this information anyways because they're admins."}}