{"action":"created","issue":{"url":"https://api.github.com/repos/bharadwaj6/security-on-github/issues/3","repository_url":"https://api.github.com/repos/bharadwaj6/security-on-github","labels_url":"https://api.github.com/repos/bharadwaj6/security-on-github/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/bharadwaj6/security-on-github/issues/3/comments","events_url":"https://api.github.com/repos/bharadwaj6/security-on-github/issues/3/events","html_url":"https://github.com/bharadwaj6/security-on-github/pull/3","id":372919605,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI0OTc3Mzgz","number":3,"title":"Add a `.gitignore` file","user":{"login":"github-learning-lab[bot]","id":37936606,"node_id":"MDM6Qm90Mzc5MzY2MDY=","avatar_url":"https://avatars0.githubusercontent.com/in/10572?v=4","gravatar_id":"","url":"https://api.github.com/users/github-learning-lab%5Bbot%5D","html_url":"https://github.com/apps/github-learning-lab","followers_url":"https://api.github.com/users/github-learning-lab%5Bbot%5D/followers","following_url":"https://api.github.com/users/github-learning-lab%5Bbot%5D/following{/other_user}","gists_url":"https://api.github.com/users/github-learning-lab%5Bbot%5D/gists{/gist_id}","starred_url":"https://api.github.com/users/github-learning-lab%5Bbot%5D/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/github-learning-lab%5Bbot%5D/subscriptions","organizations_url":"https://api.github.com/users/github-learning-lab%5Bbot%5D/orgs","repos_url":"https://api.github.com/users/github-learning-lab%5Bbot%5D/repos","events_url":"https://api.github.com/users/github-learning-lab%5Bbot%5D/events{/privacy}","received_events_url":"https://api.github.com/users/github-learning-lab%5Bbot%5D/received_events","type":"Bot","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-10-23T10:11:16Z","updated_at":"2018-10-23T10:16:03Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/bharadwaj6/security-on-github/pulls/3","html_url":"https://github.com/bharadwaj6/security-on-github/pull/3","diff_url":"https://github.com/bharadwaj6/security-on-github/pull/3.diff","patch_url":"https://github.com/bharadwaj6/security-on-github/pull/3.patch"},"body":"## Taking advantage of the `.gitignore` file for security\n\nFrom time to time, there are files you don't want Git to check in to GitHub. You may want to ignore files that contain sensitive credentials or information which should not be pushed to your repository. There are a few ways to tell Git which files to ignore.\n\n### Ignoring files\n\nGit uses a file called `.gitignore` to decide which files and directories to ignore when committing.  Keep files containing sensitive data, like configuration or `env` files, out of your repositories. This is one way to promote security best practices.\n\nThe `.gitignore` file can, and should, be committed into your repository.  By sharing this file and making it part of your code, it will also help others. Other users that contribute to the repository will also avoid committing sensitive data. There are many examples of `.gitignore` files available for you to use in your own repositories. You can find them in the [gitignore](https://github.com/github/gitignore) repository.\n\n## Step 5: Ignore files\n\nIn this pull request, I'm adding a `.gitignore` file. Files ending with `.env` commonly include sensitive data. This helps you keep files with sensitive data secure and private. Let's add those files to the `.gitignore`.\n\n### :keyboard: Activity: Updating the .gitignore file\n\n1. Within this pull request, go to **Files changed**\n1. Click the pencil in the right upper corner to edit the `.gitignore` file\n1. Edit the file by adding `.env` to line 1\n1. Scroll down, and commit your change\n\n > _Note: Even after adding a file to the `.gitignore`, the previous commits that have edited that file still exist. If you accidentally committed sensitive data, first change any tokens or passwords. Then, contact GitHub Support for help correcting your history._\n\nFor a printable version of the steps in this course, check out the [Quick Reference Guide](https://lab.github.com/public/securing-your-workflows.pdf).\n\n<hr>\n<h3 align=\"center\">Return to this pull request for my next comment</h3>\n\n> _Sometimes I respond too fast for the page to update! If you perform an expected action and don't see a response from me, wait a few seconds. Then refresh the page for your next steps._\n"},"comment":{"url":"https://api.github.com/repos/bharadwaj6/security-on-github/issues/comments/432187265","html_url":"https://github.com/bharadwaj6/security-on-github/pull/3#issuecomment-432187265","issue_url":"https://api.github.com/repos/bharadwaj6/security-on-github/issues/3","id":432187265,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMjE4NzI2NQ==","user":{"login":"github-learning-lab[bot]","id":37936606,"node_id":"MDM6Qm90Mzc5MzY2MDY=","avatar_url":"https://avatars0.githubusercontent.com/in/10572?v=4","gravatar_id":"","url":"https://api.github.com/users/github-learning-lab%5Bbot%5D","html_url":"https://github.com/apps/github-learning-lab","followers_url":"https://api.github.com/users/github-learning-lab%5Bbot%5D/followers","following_url":"https://api.github.com/users/github-learning-lab%5Bbot%5D/following{/other_user}","gists_url":"https://api.github.com/users/github-learning-lab%5Bbot%5D/gists{/gist_id}","starred_url":"https://api.github.com/users/github-learning-lab%5Bbot%5D/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/github-learning-lab%5Bbot%5D/subscriptions","organizations_url":"https://api.github.com/users/github-learning-lab%5Bbot%5D/orgs","repos_url":"https://api.github.com/users/github-learning-lab%5Bbot%5D/repos","events_url":"https://api.github.com/users/github-learning-lab%5Bbot%5D/events{/privacy}","received_events_url":"https://api.github.com/users/github-learning-lab%5Bbot%5D/received_events","type":"Bot","site_admin":false},"created_at":"2018-10-23T10:16:03Z","updated_at":"2018-10-23T10:16:03Z","author_association":"CONTRIBUTOR","body":"## Step 6: Merge this pull request\n\nThis looks great @bharadwaj6, thanks for adding a `.env` file to the `.gitignore`. Feel free to add any other file or potential sensitive data to the `.gitignore` file.\n\n### :keyboard: Activity: Merge\n1. Merge this pull request\n"}}
{"actor":{"display_login":"github-learning-lab"}}