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
Copy file name to clipboardExpand all lines: docs/04_make_things_secure/0402.md
+23-8Lines changed: 23 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ Now that the Munson's Pickles and Preserves team has GitHub Advanced Security in
14
14
In this task, you will improve the security of your repository using some of GitHub's built-in tools.
15
15
16
16
1. You should have one security issue from code scanning. Review the security issue and read up on how to correct the issue. Create a new GitHub Issue from the code scanning alert.
17
-
2. You should have one security issue from secret scanning. Create a separate GitHub Issue from the security alert. In reviewing this alert, one of the developers informs you that this secret is part of a local configuration file and that file should not be checked into source control at all.
17
+
2. You should have one security issue from secret scanning. Create a separate GitHub Issue from the security alert. In reviewing this alert, one of the developers informs you that this secret is part of a local configuration file and that file should not be checked into source control at all. It appears that a junior developer has accidentally checked in the file, and they need your help recovering from this. The developer will revoke this particular secret but wants you to make sure nobody can check in the configuration file ever again.
18
18
3. You should have one Dependabot alert due to a vulnerable version of a library. Try to use Dependabot to fix this package version and create a new pull request with the change. If it does not work, create a GitHub Issue for this Dependabot alert.
19
19
4. Create a new feature branch. Then, use GitHub Copilot to assist you in resolving all of the outstanding security issues.
20
20
5. Create a pull request, closing out the issues that you've resolved. Use GitHub Copilot Enterprise to generate a meaningful pull request message and have another learner review your code changes. Merge your code into the main branch of your repository.
@@ -40,9 +40,9 @@ In this task, you will improve the security of your repository using some of Git
40
40
<summary>Expand this section to view the solution</summary>
41
41
42
42
1. Select **Security** in your repo, then **Code scanning**. Select the 'Arbitrary file access during archive extraction ("Zip Slip")' code issue. Select **Create issue** to create a GitHub issue around this code scanning alert.
43
-
2. After creating an issue for the code scanning alert, navigate back to **Security** and then select **Secret scanning**. TODO: continue this!
44
-
3. After creating an issue for the secret scanning alert, navigate back to the **Security** page and then select **Dependabot**. Select the 'Improper Handling of Exceptional Conditions in Newtonsoft.Json' alert. Then, select **Create Dependabot security update** to have Dependabot try to fix this issue. In the event that it does not automatically generate a pull request for you, create a new GitHub Issue for this alert. You will not be able to create an issue directly from the alert page like you can secret scanning or code scanning issues.
45
-
4. Create a new feature branch and give it a name like 'security-fixes'. Fetch changes from your machine and then check out and pull the new branch using the Git command line, Visual Studio Code, or your tool of choice.
43
+
2. After creating an issue for the code scanning alert, navigate back to **Security** and then select **Secret scanning**. Select the 'Azure Registry Key Identifiable' secret issue. Create a GitHub issue around this issue. You will not be able to create an issue directly from the alert page like you can for code scanning issues.
44
+
3. After creating an issue for the secret scanning alert, navigate back to the **Security** page and then select **Dependabot**. Select the 'Improper Handling of Exceptional Conditions in Newtonsoft.Json' alert. Then, select **Create Dependabot security update** to have Dependabot try to fix this issue. In the event that it does not automatically generate a pull request for you, create a new GitHub Issue for this alert. You will not be able to create an issue directly from the alert page like you can for code scanning issues.
45
+
4. Create a new feature branch and give it a name like `security-fixes`. Fetch changes from your machine and then check out and pull the new branch using the Git command line, Visual Studio Code, or your tool of choice.
46
46
5. In GitHub, navigate back to the **Security** page and then select **Code scanning**. Select the code issue once again. Choose "Show more" to view details on the security issue. It turns out that an attacker could traverse to an arbitrary directory based on the way the MP&P staff wrote this function. In order to correct the function and prevent a directory traversal attack, update the `WriteToDirectory()` function. You can highlight the function, strike `Ctrl+i` or `Command+i`, and use a prompt like "Please update this function to prevent a directory traversal attack."
47
47
48
48
For comparison, the following code will not be vulnerable to a directory traversal attack:
@@ -59,10 +59,25 @@ In this task, you will improve the security of your repository using some of Git
6. Toresolvethesecretscanningalert, wewanttoadd `config.json` tothe `.gitignore` file. We'll use the specific file location just in case there are other configuration files we don'twanttoexclude.
0 commit comments