{"action":"closed","number":967,"pull_request":{"url":"https://api.github.com/repos/remind101/empire/pulls/967","id":80542988,"html_url":"https://github.com/remind101/empire/pull/967","diff_url":"https://github.com/remind101/empire/pull/967.diff","patch_url":"https://github.com/remind101/empire/pull/967.patch","issue_url":"https://api.github.com/repos/remind101/empire/issues/967","number":967,"state":"closed","locked":false,"title":"Only allow whitelisted commands to be run","user":{"login":"ejholmes","id":95166,"avatar_url":"https://avatars.githubusercontent.com/u/95166?v=3","gravatar_id":"","url":"https://api.github.com/users/ejholmes","html_url":"https://github.com/ejholmes","followers_url":"https://api.github.com/users/ejholmes/followers","following_url":"https://api.github.com/users/ejholmes/following{/other_user}","gists_url":"https://api.github.com/users/ejholmes/gists{/gist_id}","starred_url":"https://api.github.com/users/ejholmes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ejholmes/subscriptions","organizations_url":"https://api.github.com/users/ejholmes/orgs","repos_url":"https://api.github.com/users/ejholmes/repos","events_url":"https://api.github.com/users/ejholmes/events{/privacy}","received_events_url":"https://api.github.com/users/ejholmes/received_events","type":"User","site_admin":false},"body":"This is a spike into https://github.com/remind101/empire/issues/966, which adds a configuration option to Empire to require commands to be whitelisted for `emp run` to work.\r\n\r\nIf a command is not whitelisted, `emp run` will have this behavior:\r\n\r\n```console\r\n$ emp run migrate\r\nerror: command not whitelisted: migrate\r\n```\r\n\r\nTo whitelist a command, you add it to the Procfile:\r\n\r\n```yaml\r\nmigrate: bundle exec rake db:migrate:up\r\n```\r\n\r\nIt's recommended that you use the extended Procfile and set the `noservice: true` flag to prevent it from being scaled up (and it won't create any AWS resources).\r\n\r\n```yaml\r\nmigrate:\r\n  command: bundle exec rake db:migrate:up\r\n  noservice: true\r\n```\r\n\r\nIn this initial spike, it allows any command in the Procfile to be run. For example, if you use the new scheduled tasks, you can spin up a one off of the scheduled task easily like so:\r\n\r\n```yaml\r\nscheduled-job:\r\n  command: ./bin/do-work\r\n  cron: * * * * * *\r\n```\r\n\r\n```console\r\n$ emp run scheduled-job\r\ndoing work\r\n```\r\n\r\nAny extra arguments will be appended to the command provided in the procfile. For example:\r\n\r\n```yaml\r\nmigrate:\r\n  command: ./bin/migrate\r\n  noservice: true\r\n```\r\n\r\n```shell\r\nexec bundle exec rake db:migrate:$1\r\n```\r\n\r\n```console\r\n$ emp run migrate up\r\n```\r\n\r\n**TODO**\r\n\r\n* Tests","created_at":"2016-08-09T00:14:07Z","updated_at":"2016-08-10T23:27:27Z","closed_at":"2016-08-10T23:27:25Z","merged_at":"2016-08-10T23:27:25Z","merge_commit_sha":"f5aa4a8ab7f55b3c2f1a272b29bc83d60d72deda","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/remind101/empire/pulls/967/commits","review_comments_url":"https://api.github.com/repos/remind101/empire/pulls/967/comments","review_comment_url":"https://api.github.com/repos/remind101/empire/pulls/comments{/number}","comments_url":"https://api.github.com/repos/remind101/empire/issues/967/comments","statuses_url":"https://api.github.com/repos/remind101/empire/statuses/76513a416cf1e46c055a0c829a63edd63d7dcfb8","head":{"label":"remind101:whitelist-commands","ref":"whitelist-commands","sha":"76513a416cf1e46c055a0c829a63edd63d7dcfb8","user":{"login":"remind101","id":376343,"avatar_url":"https://avatars.githubusercontent.com/u/376343?v=3","gravatar_id":"","url":"https://api.github.com/users/remind101","html_url":"https://github.com/remind101","followers_url":"https://api.github.com/users/remind101/followers","following_url":"https://api.github.com/users/remind101/following{/other_user}","gists_url":"https://api.github.com/users/remind101/gists{/gist_id}","starred_url":"https://api.github.com/users/remind101/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/remind101/subscriptions","organizations_url":"https://api.github.com/users/remind101/orgs","repos_url":"https://api.github.com/users/remind101/repos","events_url":"https://api.github.com/users/remind101/events{/privacy}","received_events_url":"https://api.github.com/users/remind101/received_events","type":"Organization","site_admin":false},"repo":{"id":30091667,"name":"empire","full_name":"remind101/empire","owner":{"login":"remind101","id":376343,"avatar_url":"https://avatars.githubusercontent.com/u/376343?v=3","gravatar_id":"","url":"https://api.github.com/users/remind101","html_url":"https://github.com/remind101","followers_url":"https://api.github.com/users/remind101/followers","following_url":"https://api.github.com/users/remind101/following{/other_user}","gists_url":"https://api.github.com/users/remind101/gists{/gist_id}","starred_url":"https://api.github.com/users/remind101/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/remind101/subscriptions","organizations_url":"https://api.github.com/users/remind101/orgs","repos_url":"https://api.github.com/users/remind101/repos","events_url":"https://api.github.com/users/remind101/events{/privacy}","received_events_url":"https://api.github.com/users/remind101/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/remind101/empire","description":"A PaaS built on top of Amazon EC2 Container Service (ECS)","fork":false,"url":"https://api.github.com/repos/remind101/empire","forks_url":"https://api.github.com/repos/remind101/empire/forks","keys_url":"https://api.github.com/repos/remind101/empire/keys{/key_id}","collaborators_url":"https://api.github.com/repos/remind101/empire/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/remind101/empire/teams","hooks_url":"https://api.github.com/repos/remind101/empire/hooks","issue_events_url":"https://api.github.com/repos/remind101/empire/issues/events{/number}","events_url":"https://api.github.com/repos/remind101/empire/events","assignees_url":"https://api.github.com/repos/remind101/empire/assignees{/user}","branches_url":"https://api.github.com/repos/remind101/empire/branches{/branch}","tags_url":"https://api.github.com/repos/remind101/empire/tags","blobs_url":"https://api.github.com/repos/remind101/empire/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/remind101/empire/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/remind101/empire/git/refs{/sha}","trees_url":"https://api.github.com/repos/remind101/empire/git/trees{/sha}","statuses_url":"https://api.github.com/repos/remind101/empire/statuses/{sha}","languages_url":"https://api.github.com/repos/remind101/empire/languages","stargazers_url":"https://api.github.com/repos/remind101/empire/stargazers","contributors_url":"https://api.github.com/repos/remind101/empire/contributors","subscribers_url":"https://api.github.com/repos/remind101/empire/subscribers","subscription_url":"https://api.github.com/repos/remind101/empire/subscription","commits_url":"https://api.github.com/repos/remind101/empire/commits{/sha}","git_commits_url":"https://api.github.com/repos/remind101/empire/git/commits{/sha}","comments_url":"https://api.github.com/repos/remind101/empire/comments{/number}","issue_comment_url":"https://api.github.com/repos/remind101/empire/issues/comments{/number}","contents_url":"https://api.github.com/repos/remind101/empire/contents/{+path}","compare_url":"https://api.github.com/repos/remind101/empire/compare/{base}...{head}","merges_url":"https://api.github.com/repos/remind101/empire/merges","archive_url":"https://api.github.com/repos/remind101/empire/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/remind101/empire/downloads","issues_url":"https://api.github.com/repos/remind101/empire/issues{/number}","pulls_url":"https://api.github.com/repos/remind101/empire/pulls{/number}","milestones_url":"https://api.github.com/repos/remind101/empire/milestones{/number}","notifications_url":"https://api.github.com/repos/remind101/empire/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/remind101/empire/labels{/name}","releases_url":"https://api.github.com/repos/remind101/empire/releases{/id}","deployments_url":"https://api.github.com/repos/remind101/empire/deployments","created_at":"2015-01-30T21:32:09Z","updated_at":"2016-08-09T04:14:52Z","pushed_at":"2016-08-10T23:27:27Z","git_url":"git://github.com/remind101/empire.git","ssh_url":"git@github.com:remind101/empire.git","clone_url":"https://github.com/remind101/empire.git","svn_url":"https://github.com/remind101/empire","homepage":"","size":25536,"stargazers_count":1871,"watchers_count":1871,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":89,"mirror_url":null,"open_issues_count":62,"forks":89,"open_issues":62,"watchers":1871,"default_branch":"master"}},"base":{"label":"remind101:master","ref":"master","sha":"0575382a388cfeca9915a10bb9eb661937fe7e8b","user":{"login":"remind101","id":376343,"avatar_url":"https://avatars.githubusercontent.com/u/376343?v=3","gravatar_id":"","url":"https://api.github.com/users/remind101","html_url":"https://github.com/remind101","followers_url":"https://api.github.com/users/remind101/followers","following_url":"https://api.github.com/users/remind101/following{/other_user}","gists_url":"https://api.github.com/users/remind101/gists{/gist_id}","starred_url":"https://api.github.com/users/remind101/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/remind101/subscriptions","organizations_url":"https://api.github.com/users/remind101/orgs","repos_url":"https://api.github.com/users/remind101/repos","events_url":"https://api.github.com/users/remind101/events{/privacy}","received_events_url":"https://api.github.com/users/remind101/received_events","type":"Organization","site_admin":false},"repo":{"id":30091667,"name":"empire","full_name":"remind101/empire","owner":{"login":"remind101","id":376343,"avatar_url":"https://avatars.githubusercontent.com/u/376343?v=3","gravatar_id":"","url":"https://api.github.com/users/remind101","html_url":"https://github.com/remind101","followers_url":"https://api.github.com/users/remind101/followers","following_url":"https://api.github.com/users/remind101/following{/other_user}","gists_url":"https://api.github.com/users/remind101/gists{/gist_id}","starred_url":"https://api.github.com/users/remind101/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/remind101/subscriptions","organizations_url":"https://api.github.com/users/remind101/orgs","repos_url":"https://api.github.com/users/remind101/repos","events_url":"https://api.github.com/users/remind101/events{/privacy}","received_events_url":"https://api.github.com/users/remind101/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/remind101/empire","description":"A PaaS built on top of Amazon EC2 Container Service (ECS)","fork":false,"url":"https://api.github.com/repos/remind101/empire","forks_url":"https://api.github.com/repos/remind101/empire/forks","keys_url":"https://api.github.com/repos/remind101/empire/keys{/key_id}","collaborators_url":"https://api.github.com/repos/remind101/empire/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/remind101/empire/teams","hooks_url":"https://api.github.com/repos/remind101/empire/hooks","issue_events_url":"https://api.github.com/repos/remind101/empire/issues/events{/number}","events_url":"https://api.github.com/repos/remind101/empire/events","assignees_url":"https://api.github.com/repos/remind101/empire/assignees{/user}","branches_url":"https://api.github.com/repos/remind101/empire/branches{/branch}","tags_url":"https://api.github.com/repos/remind101/empire/tags","blobs_url":"https://api.github.com/repos/remind101/empire/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/remind101/empire/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/remind101/empire/git/refs{/sha}","trees_url":"https://api.github.com/repos/remind101/empire/git/trees{/sha}","statuses_url":"https://api.github.com/repos/remind101/empire/statuses/{sha}","languages_url":"https://api.github.com/repos/remind101/empire/languages","stargazers_url":"https://api.github.com/repos/remind101/empire/stargazers","contributors_url":"https://api.github.com/repos/remind101/empire/contributors","subscribers_url":"https://api.github.com/repos/remind101/empire/subscribers","subscription_url":"https://api.github.com/repos/remind101/empire/subscription","commits_url":"https://api.github.com/repos/remind101/empire/commits{/sha}","git_commits_url":"https://api.github.com/repos/remind101/empire/git/commits{/sha}","comments_url":"https://api.github.com/repos/remind101/empire/comments{/number}","issue_comment_url":"https://api.github.com/repos/remind101/empire/issues/comments{/number}","contents_url":"https://api.github.com/repos/remind101/empire/contents/{+path}","compare_url":"https://api.github.com/repos/remind101/empire/compare/{base}...{head}","merges_url":"https://api.github.com/repos/remind101/empire/merges","archive_url":"https://api.github.com/repos/remind101/empire/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/remind101/empire/downloads","issues_url":"https://api.github.com/repos/remind101/empire/issues{/number}","pulls_url":"https://api.github.com/repos/remind101/empire/pulls{/number}","milestones_url":"https://api.github.com/repos/remind101/empire/milestones{/number}","notifications_url":"https://api.github.com/repos/remind101/empire/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/remind101/empire/labels{/name}","releases_url":"https://api.github.com/repos/remind101/empire/releases{/id}","deployments_url":"https://api.github.com/repos/remind101/empire/deployments","created_at":"2015-01-30T21:32:09Z","updated_at":"2016-08-09T04:14:52Z","pushed_at":"2016-08-10T23:27:27Z","git_url":"git://github.com/remind101/empire.git","ssh_url":"git@github.com:remind101/empire.git","clone_url":"https://github.com/remind101/empire.git","svn_url":"https://github.com/remind101/empire","homepage":"","size":25536,"stargazers_count":1871,"watchers_count":1871,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":89,"mirror_url":null,"open_issues_count":62,"forks":89,"open_issues":62,"watchers":1871,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/remind101/empire/pulls/967"},"html":{"href":"https://github.com/remind101/empire/pull/967"},"issue":{"href":"https://api.github.com/repos/remind101/empire/issues/967"},"comments":{"href":"https://api.github.com/repos/remind101/empire/issues/967/comments"},"review_comments":{"href":"https://api.github.com/repos/remind101/empire/pulls/967/comments"},"review_comment":{"href":"https://api.github.com/repos/remind101/empire/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/remind101/empire/pulls/967/commits"},"statuses":{"href":"https://api.github.com/repos/remind101/empire/statuses/76513a416cf1e46c055a0c829a63edd63d7dcfb8"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"ejholmes","id":95166,"avatar_url":"https://avatars.githubusercontent.com/u/95166?v=3","gravatar_id":"","url":"https://api.github.com/users/ejholmes","html_url":"https://github.com/ejholmes","followers_url":"https://api.github.com/users/ejholmes/followers","following_url":"https://api.github.com/users/ejholmes/following{/other_user}","gists_url":"https://api.github.com/users/ejholmes/gists{/gist_id}","starred_url":"https://api.github.com/users/ejholmes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ejholmes/subscriptions","organizations_url":"https://api.github.com/users/ejholmes/orgs","repos_url":"https://api.github.com/users/ejholmes/repos","events_url":"https://api.github.com/users/ejholmes/events{/privacy}","received_events_url":"https://api.github.com/users/ejholmes/received_events","type":"User","site_admin":false},"comments":1,"review_comments":0,"commits":5,"additions":247,"deletions":14,"changed_files":14}}
{"actor":{"display_login":"ejholmes"}}