{"action":"created","issue":{"url":"https://api.github.com/repos/NorthBridge/playbook/issues/55","labels_url":"https://api.github.com/repos/NorthBridge/playbook/issues/55/labels{/name}","comments_url":"https://api.github.com/repos/NorthBridge/playbook/issues/55/comments","events_url":"https://api.github.com/repos/NorthBridge/playbook/issues/55/events","html_url":"https://github.com/NorthBridge/playbook/issues/55","id":103487730,"number":55,"title":"Secrets should be kept in environment variables, not in settings.py","user":{"login":"martsberger","id":2503197,"avatar_url":"https://avatars.githubusercontent.com/u/2503197?v=3","gravatar_id":"","url":"https://api.github.com/users/martsberger","html_url":"https://github.com/martsberger","followers_url":"https://api.github.com/users/martsberger/followers","following_url":"https://api.github.com/users/martsberger/following{/other_user}","gists_url":"https://api.github.com/users/martsberger/gists{/gist_id}","starred_url":"https://api.github.com/users/martsberger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martsberger/subscriptions","organizations_url":"https://api.github.com/users/martsberger/orgs","repos_url":"https://api.github.com/users/martsberger/repos","events_url":"https://api.github.com/users/martsberger/events{/privacy}","received_events_url":"https://api.github.com/users/martsberger/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-08-27T11:24:36Z","updated_at":"2015-08-27T15:11:58Z","closed_at":null,"body":"Things that are secret should not be kept in our repository, for example SECRET_KEY, DATABASES['USER'], DATABASES['PASSWORD'], DATABASES['HOST'], and DATABASES['PORT'] should be read from environment variables, e.g.,\r\n\r\n```python\r\nSECRET_KEY = os.environ.get('django_secret_key')\r\n\r\nDATABASES = {\r\n    default: {\r\n        'USER': os.environ.get('DB_USER')\r\n        'PASSWORD': os.environ.get('DB_PASSWORD')\r\n        # etc.\r\n    }\r\n}\r\n```\r\n\r\nThen the project can be deployed in different environments (production, staging/dev, local development) without changing the code.\r\n"},"comment":{"url":"https://api.github.com/repos/NorthBridge/playbook/issues/comments/135464572","html_url":"https://github.com/NorthBridge/playbook/issues/55#issuecomment-135464572","issue_url":"https://api.github.com/repos/NorthBridge/playbook/issues/55","id":135464572,"user":{"login":"foresmac","id":3628189,"avatar_url":"https://avatars.githubusercontent.com/u/3628189?v=3","gravatar_id":"","url":"https://api.github.com/users/foresmac","html_url":"https://github.com/foresmac","followers_url":"https://api.github.com/users/foresmac/followers","following_url":"https://api.github.com/users/foresmac/following{/other_user}","gists_url":"https://api.github.com/users/foresmac/gists{/gist_id}","starred_url":"https://api.github.com/users/foresmac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/foresmac/subscriptions","organizations_url":"https://api.github.com/users/foresmac/orgs","repos_url":"https://api.github.com/users/foresmac/repos","events_url":"https://api.github.com/users/foresmac/events{/privacy}","received_events_url":"https://api.github.com/users/foresmac/received_events","type":"User","site_admin":false},"created_at":"2015-08-27T15:11:58Z","updated_at":"2015-08-27T15:11:58Z","body":"Yes, this is absolutely critical from a security standpoint. Any current secrets or keys that are in the repository should immediately be revoked and new ones issued/created."}}