You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 1, 2022. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,6 +5,6 @@ Collaboration is key to building great software. As you welcome more contributio
5
5
In this course, you’ll learn how to:
6
6
- Enable security features for repositories hosted in GitHub
7
7
- 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
9
9
10
10
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.
Copy file name to clipboardExpand all lines: responses/01a_class-introduction-issue.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,6 +16,10 @@ In this course you will learn how to:
16
16
17
17
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).
18
18
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.
Copy file name to clipboardExpand all lines: responses/02_find-vulnerabilities.md
+8-6Lines changed: 8 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,23 +6,25 @@ This repository has some existing dependencies which will need updating to stay
6
6
7
7
### How can we identify dependencies and if they are vulnerable?
8
8
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.
10
10
11
11
How can we know these dependencies are secure? It's not always easy, but GitHub is watching out.
12
12
13
13
### GitHub's security alerts for vulnerable dependencies
14
-
GitHub tracks public vulnerabilities in Ruby gems, NPMand Python packages.
14
+
GitHub tracks public vulnerabilities in Ruby gems, NPM, Python, Java, and .Net packages.
15
15
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.
17
17
18
18
**GitHub never publicly discloses identified vulnerabilities for any repository.**
19
19
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.
21
23
22
-
Use GitHub's security alerts to identify a vulnerable NPM dependency. Here's how:
24
+
### :keyboard: Activity: Identify the suggested version update
23
25
24
26
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**
26
28
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
27
29
1. Take note of the suggested version
28
30
1. Comment in this issue with the suggested update version
Copy file name to clipboardExpand all lines: responses/03_good-pr.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,5 @@
1
+
## Step 3: Merge this pull request
2
+
1
3
Great job, @{{ user.username }}, your pull request looks good. Thank you for fixing the vulnerable dependency!
2
4
3
5
_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._
Copy file name to clipboardExpand all lines: responses/03_update-dependency.md
+4-2Lines changed: 4 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,12 @@
1
1
## Update the dependency
2
2
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.
4
4
5
5
> _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._
6
6
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.
8
10
9
11
### :keyboard: Activity: Update the `package.json` file
Copy file name to clipboardExpand all lines: responses/04b_add-gitignore.md
+6-4Lines changed: 6 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,13 +2,15 @@
2
2
3
3
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.
4
4
5
-
In this pull request, I'm adding a `.gitignore` file.
6
-
7
5
### Ignoring files
8
6
9
7
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.
10
8
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`.
12
14
13
15
### :keyboard: Activity: Updating the .gitignore file
14
16
@@ -17,7 +19,7 @@ Additionally, the `.gitignore` file can, and should, be committed into your repo
17
19
1. Edit the file by adding `.env` to line 1
18
20
1. Scroll down, and commit your change
19
21
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._
21
23
22
24
For a printable version of the steps in this course, check out the [Quick Reference Guide]({{ host }}/public/{{ course.slug }}.pdf).
Copy file name to clipboardExpand all lines: responses/05_good-ignore.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,5 @@
1
+
## Step 6: Merge this pull request
2
+
1
3
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.
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!
6
6
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.
8
8
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
10
10
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.
11
12
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.
0 commit comments