Welcome to "Securing your repositories supply chain"! 👋
What is Securing your repositories supply chain: GitHub helps you secure your supply chain, from understanding the dependencies in your environment, to knowing about vulnerabilities in those dependencies, and patching them.
- To read more about Secuirng your repositories supply chain: Secuirng your repositories supply chain
What is a Dependency Graph: The dependency graph is a summary of the manifest and lock files stored in a repository and any dependencies that are submitted for the repository using the Dependency submission API (beta). For each repository, it shows:
- Dependencies, the ecosystems and packages it depends on
- Dependents, the repositories and packages that depend on it
- To ready more about Dependency graph: Dependency graph
- Open a new browser tab, and work on the steps in your second tab while you read the instructions in this tab.
- Navigate to the
Settings
tab. - Click on
Code security and analysis
. - Verify/enable Dependency graph. If the repo is private you will enable it here. If the repo is public it will be enabled by default.
- Move on to the next activity.
- Navigate to the
Insights
tab. - Click on
Dependency
graph. - Review all the dependecies on the
Dependencies
hub. - Learn how to explore dependencies: Explore dependecies
- Move on to the next activity.
- Navigate to the
Code
tab. - Navigate to the
code/src/AttendeeSite
folder - Add the following content to the
package-lock.json
file after the third to last}
, "follow-redirects": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.1.tgz", "integrity": "sha512-HWqDgT7ZEkqRzBvc2s64vSZ/hfOceEol3ac/7tKwzuvEyWx3/4UegXh5oBOIotkGsObyk3xznnSRVADBgWSQVg==" }
- Navigate to the
Insights
tab. - Click on
Dependency
graph. - Review all new dependecies on the
Dependencies
hub. - Search for
follow-redirects
and review the dependancy. - Wait about 20 seconds then refresh this page for the next step.
Nice work! 🎉 You added and viewed a dependency with Dependency graph
!
Next, we need to enable and view dependabot alerts.
What are Dependabot alerts: Dependabot alerts tell you that your code depends on a package that is insecure. Dependabot alerts references The GitHub Advisory Database that contains a list of known security vulnerabilities and malware, grouped in two categories: GitHub-reviewed advisories and unreviewed advisories.
- About Dependabot alerts: Dependabot alerts
- About GitHub Advisory Database: GitHub Advisory Database
- Open a new browser tab.
- Navigate to the GitHub Advisory Database.
- Type or paste
follow-redirects
into the search box. - Click on any of the advisories that were found.
- Note the packages, impact, patches, workaround and referennces for the advisory.
- Move on to the next activity.
- Open a new browser tab, and work on the steps in your second tab while you read the instructions in this tab.
- Navigate to the
Settings
tab. - Click on
Code security and analysis
. - Click
Enable
Dependabot alerts. - Wait about 60 seconds then click on the
Security
tab at the top of the repository. - Verify there are 4
Dependabot
alerts under theVulnerability alerts
section. - Revew each alert.
- Move on to the next activity.
- Click on
Prototype Pollution in minimist
alert under theDependabot alerts
section. - View the alert.
- Click
Create Dependabot security update
button. The will create a pull request for the fix. - Wait until the pull request is created. This could take ~2 minutes.
- Click on
Review security update
button. The pull request will be displayed. - View the pull request. View the
Files changed
tab to review the update. - Navigate back to the
Conversation
tab. - Click on
Merge pull request
button. - Click
confirm merge
button. - Wait about 20 seconds then refresh this page for the next step.
Nice work enabling, viewing and creating Dependabot alerts ✨
What is Dependabot security updates: Dependabot can fix vulnerable dependencies for you by raising pull requests with security updates.
- To learn more about Dependabot security updates: Dependabot security updates
- Open a new browser tab, and work on the steps in your second tab while you read the instructions in this tab.
- Navigate to the
Settings
tab. - Click on
Code security and analysis
. - Click Enable on
Dependabot security updates
. - Wait until a pull request shows up under the
Pull requests
repository tab. Shoud be about 60 seconds then click on thePull requests
tab at the top of the repository. - Verify there is a new pull request titled
Bump axios from 0.21.1 to 0.21.2 in /code/src/AttendeeSite
. - View the pull request.
- Click on
Merge pull request
button. - Click
confirm merge
button. - Wait about 20 seconds then refresh this page for the next step.
Nicely done Enable and trigger Dependabot security updates! 🥳
What is enable and trigger Dependabot version updates: You can use Dependabot to keep the packages you use updated to the latest versions.
- To learn more about Dependabot version updates: Dependabot version updates
- Open a new browser tab, and work on the steps in your second tab while you read the instructions in this tab.
- Navigate to the
Settings
tab. - Click on
Code security and analysis
. - Click Enable on
Dependabot version updates
. - A new file editor opens with pre polulated contents. The file is called
dependabot.yml
. - Add
nuget
to thepackage-ecosystem
. - Change the
directory
to/code/
. - The
dependabot.yml
file should look like this: - Click
Commit changes
directly to the main branch. - Wait about 20 seconds then refresh this page for the next step.
Congratulations friend, you've completed this course!
Here's a recap of all the tasks you've accomplished in your repository:
- You've leearned how to view and use Dependency graph.
- You've learned how to enable and use Dependabot alerts.
- You've learned how to ennable and use Dependabot secuirty updates.
- You've learned how to ennable and use Dependabot version updates.
- Learn more about securing your supply chain by reading: Securing your supply chain.
- We'd love to hear what you thought of this course.
- [Take another TBD-organization Course](https://github.com/TBD-organization](https://github.com/skills).
- Read the GitHub Getting Started docs.
- To find projects to contribute to, check out GitHub Explore.
Get help: TBD-support • Review the GitHub status page
© 2022 TBD-copyright-holder • Code of Conduct • CC-BY-4.0 License