Skip to content
This repository was archived by the owner on Sep 1, 2022. It is now read-only.

Commit c902d90

Browse files
authored
Merge pull request #123 from githubtraining/cynthia-edits
Edits based on Cynthia's feedback
2 parents 52affcb + 5bc6fc8 commit c902d90

File tree

8 files changed

+32
-26
lines changed

8 files changed

+32
-26
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ Collaboration is key to building great software. As you welcome more contributio
55
In this course, you’ll learn how to:
66
- Enable security features for repositories hosted in GitHub
77
- Detect vulnerable dependencies in repositories when notified by GitHub's security alerts
8-
- Utilize best practices for to keep sensitive data out of repositories
8+
- Utilize best practices to keep sensitive data out of repositories
99

1010
This course has a dedicated message board on the [GitHub Community Forum]({{ communityBoard }}). Create a post to start a conversation, discuss this course with GitHub Trainers and participants, or troubleshoot any issues you encounter.

responses/01a_class-introduction-issue.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ In this course you will learn how to:
1616

1717
For this course, you'll need to be comfortable with the GitHub Flow. If you need a refresher on the GitHub flow, check out the [the Introduction to GitHub course]({{ host}}/courses/introduction-to-github).
1818

19+
## Step 1: Your project on GitHub Pages
20+
21+
This project is centered around a memory game that will be deployed with GitHub Pages.
22+
1923
{% if private %}
2024

2125
### :keyboard: Activity: Enable vulnerability alerts & GitHub Pages

responses/02_find-vulnerabilities.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,25 @@ This repository has some existing dependencies which will need updating to stay
66

77
### How can we identify dependencies and if they are vulnerable?
88

9-
This repository is a Node.js project utilizing NPM. Because of that, the `package.json` defines this repository's dependencies. For our time together, we'll be focusing on these JavaScript dependencies. Keep in mind that different programming languages may have different dependency files. You might work with a `Gemfile`, `Gemfile.lock`, `*.gemspec`, `requirements.txt`, or `pipfile.lock` file.
9+
This repository is a Node.js project utilizing NPM. Because of that, the `package.json` defines this repository's dependencies. For our time together, we'll be focusing on these JavaScript dependencies. Keep in mind that different programming languages may have different dependency files. You might work with a `Gemfile`, `Gemfile.lock`, `*.gemspec`, `requirements.txt`, `pipfile.lock`, or other files.
1010

1111
How can we know these dependencies are secure? It's not always easy, but GitHub is watching out.
1212

1313
### GitHub's security alerts for vulnerable dependencies
14-
GitHub tracks public vulnerabilities in Ruby gems, NPM and Python packages.
14+
GitHub tracks public vulnerabilities in Ruby gems, NPM, Python, Java, and .Net packages.
1515

16-
GitHub receives a notifications of a newly-announced vulnerability. Then, we check for repositories that use the affected version of that dependency. Then, we send security alerts to a set of people within those affected repositories. The owners are the ones contacted by default. But, it's possible to configure specific teams or individuals to get these important notifications.
16+
GitHub receives a notification of a newly-announced vulnerability. Next, we check for repositories that use the affected version of that dependency. We send security alerts to a set of people within those affected repositories. The owners are contacted by default. But, it's possible to configure specific teams or individuals to get these important notifications.
1717

1818
**GitHub never publicly discloses identified vulnerabilities for any repository.**
1919

20-
### :keyboard: Activity: Identify the suggested version update
20+
## Step 2: Find this repository's vulnerable dependencies
21+
22+
Use GitHub's security alerts to identify a vulnerable NPM dependency.
2123

22-
Use GitHub's security alerts to identify a vulnerable NPM dependency. Here's how:
24+
### :keyboard: Activity: Identify the suggested version update
2325

2426
1. Click the **Insights** tab in your repository
25-
1. On the left hand navigation bar, click **Dependencies**
27+
1. On the left hand navigation bar, click **Dependency graph**
2628
1. Scroll down until you see a yellow bar highlighting the dependency named `debug`, and click on the right hand side of the yellow `debug` section
2729
1. Take note of the suggested version
2830
1. Comment in this issue with the suggested update version

responses/03_good-pr.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
## Step 3: Merge this pull request
2+
13
Great job, @{{ user.username }}, your pull request looks good. Thank you for fixing the vulnerable dependency!
24

35
_Note: You might notice that this repository has a `package.json` file, but no `package-lock.json` file. We are doing all parts of this activity on GitHub.com. If you work with other repositories, you might notice some differences. Regardless of what dependency files you use, the main concepts of this course still apply._

responses/03_update-dependency.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
## Update the dependency
22

3-
Now that you know the recommended version, it's time to edit the `package.json` file. You'll upgrade the package to a non-vulnerable version.
3+
Next, we'll go through the GitHub Flow to make some changes. If you aren't sure how to do this, try the [Introduction to GitHub course](https://lab.github.com/githubtraining/introduction-to-github) and then come back to give it another try.
44

55
> _Note: Before doing this with real world code, make sure that the upgraded package works with your code. Good unit tests and CI (continuous integration) will help you update with confidence._
66
7-
We'll go through the GitHub Flow to make these changes. If you aren't sure how to do this, try the [Introduction to GitHub course](https://lab.github.com/githubtraining/introduction-to-github) and then come back to give it another try.
7+
## Step 4: Updating dependency versions
8+
9+
Now that you know the recommended version, it's time to edit the `package.json` file. You'll upgrade the package to a non-vulnerable version.
810

911
### :keyboard: Activity: Update the `package.json` file
1012

responses/04b_add-gitignore.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,15 @@
22

33
From 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.
44

5-
In this pull request, I'm adding a `.gitignore` file.
6-
75
### Ignoring files
86

97
Git 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.
108

11-
Additionally, the `.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.
9+
The `.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.
10+
11+
## Step 5: Ignore files
12+
13+
In 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`.
1214

1315
### :keyboard: Activity: Updating the .gitignore file
1416

@@ -17,7 +19,7 @@ Additionally, the `.gitignore` file can, and should, be committed into your repo
1719
1. Edit the file by adding `.env` to line 1
1820
1. Scroll down, and commit your change
1921

20-
> _Note: Even after adding a file to the `.gitignore`, the previous commits that have edited that file still exist. After committing sensitive data, first change any tokens or passwords. Then, contact GitHub Support for help correcting your history._
22+
> _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._
2123
2224
For a printable version of the steps in this course, check out the [Quick Reference Guide]({{ host }}/public/{{ course.slug }}.pdf).
2325

responses/05_good-ignore.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
## Step 6: Merge this pull request
2+
13
This looks great @{{ user.username }}, thanks for adding a `.env` file to the `.gitignore`. Feel free to add any other file or potential sensitive data to the `.gitignore` file.
24

35
### :keyboard: Activity: Merge

responses/06b_final-issue.md

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,15 @@
22

33
![celebrate](https://octodex.github.com/images/benevocats.jpg)
44

5-
Congratulations @{{ user.username }}, you've completed this course! But, a good thing to do now is limit this app's permissions.
5+
Congratulations @{{ user.username }}, you've completed this course!
66

7-
When considering the security of your repository, consider the installed applications, like me. But from a security perspective, each of these apps has access to some of your data. Every so often, check the apps and integrations that have access to your repositories. Look for things like active use, or permissions giving more access than necessary.
7+
When considering the security of your repository, consider the installed applications, like me. Every app installed on your repository has access to some of your data. Even if it is harmless (like me), it is a good idea to periodically check and prune the list of installed apps and integrations on your repositories. Look for things like active use, or permissions giving more access than necessary.
88

9-
As much as it pains me to leave you, I want you to uninstall me on some of your repositories. I won't be able to congratulate you on achieving this task, but know I'm excited about your progress.
9+
### Manage app permissions
1010

11+
As much as it pains me to leave you, I want you to uninstall me from this repository. I won't be able to congratulate you on achieving this task, but know I'm excited about your progress.
1112

12-
### :keyboard: Activity: Restrict this app
13-
1. Click on the **Settings** tab in your repository
14-
1. On the left hand side, click **Integrations & services**
15-
1. Find **Learning Lab**, and click **Configure**
16-
1. Enter your password if prompted
17-
1. Choose the repository access that you'd like to keep
18-
- _Note: If you'd like to take more Learning Lab courses in the future, **do not** uninstall Learning Lab. If you uninstall Learning Lab, you'll need to reinstall the app when you try another course. You may also lose some progress._
19-
1. To make taking Learning Lab courses easier in the future, click **Only select repositories**
20-
1. Select a repository that you have completed with Learning Lab, like this one
21-
1. Click **Save**
13+
Follow the guidelines in [GitHub's documentation](https://help.github.com/articles/reviewing-your-authorized-integrations/#reviewing-your-authorized-github-apps) to review authorized OAuth and GitHub Apps. If you'd like to practice, you can uninstall Learning Lab from this repository.
2214

2315
### What went well
2416

0 commit comments

Comments
 (0)