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
5. Review the action and its defaults on line 32-39. This action can also block specific open source license types.
24
24
6. In the upper right, click on **Commit changes...**
25
-
7. Since we have a ruleset, we have to create a branch and merge this to main via pull request. Create a branch and commit (**propose**) the changes.
25
+
7. Since we have a ruleset, we have to create a branch and merge this to main via pull request. Create a branch and commit (**Propose changes**) the changes.
## Exercise 2: Introduce a dependency vulnerability
60
60
@@ -68,21 +68,31 @@ Now, let's attempt to add a vulnerable dependency to the codebase and test out t
68
68
</details>
69
69
70
70
3. Navigate back to the **Code** tab in the repo.
71
-
4. Switch to the `lab4/dependency-vulnerability` branch.
71
+
4. Click the **package.json** file to open it
72
+
5. Click the pencil icon at the top right of the file to go into edit mode
73
+
6. Go to the end of line 181 and hit Enter to create a blank line for line 182
74
+
7. Add the following code to line 182:
75
+
76
+
```
77
+
"tar": "2.2.2",
78
+
```
79
+
80
+
8. Click the **Commit changes** button.
81
+
9. Change the branch name to **lab4/dependency-vulnerability** and click **Propose changes** to start a pull request
82
+
10. Switch to the `lab4/dependency-vulnerability` branch.
72
83
- You can change to this branch by selecting the **main** dropdown below the repository name when under the **Code** tab.
73
-
5. Open up the `package.json` file in the repository root.
74
-
6. Navigate to line 182 and review this line - this branch has a change to introduce the `"tar": "2.2.2"` package to the codebase - a package with a known vulnerability.
84
+
11. Open up the `package.json` file in the repository root.
85
+
12. Navigate to line 182 and review this line - this branch has a change to introduce the `"tar": "2.2.2"` package to the codebase - a package with a known vulnerability.
75
86
76
87
<details>
77
88
<imgsrc="images/lab-4-2-2.png"/>
78
89
</details>
79
90
80
91
7. Create a pull request by navigating the the **Pull requests** tab and clicking on the **New pull request** button.
81
-
8. Make sure to select the `lab4/dependency-vulnerability` branch to merge into the `main` branch. Also make sure to use Copilot to generate a PR summary for you
82
-
If you scroll down to the status check section of the PR, you should see a note: "This branch is out-of-date with the base branch".
83
-
10. Click on the **Update branch** button; this adds in the dependency review workflow you committed in the prior exercise. TODO: verify this works correctly
84
-
11. Wait for the dependency review job to finish.
85
-
12. It should make a comment to the pull request with a note that it found a vulnerable package dependency. In fact, adding this one vulnerable package would introduce 3 new vulnerabilities to our codebase.
92
+
8. Use Copilot to generate a PR summary for you
93
+
9. Click the **Create pull request** button
94
+
10. Wait for the dependency review job to finish.
95
+
11. It should make a comment to the pull request with a note that it found a vulnerable package dependency. In fact, adding this one vulnerable package would introduce 3 new vulnerabilities to our codebase.
0 commit comments