Giter Club home page Giter Club logo

skills-secure-repository-supply-chain's Introduction

Secure your repository's supply chain

Secure your supply chain, understand dependencies in your environment, know about vulnerabilities in those dependencies and patch them.

Step 2: Enable and view Dependabot alerts

Nice work! 🎉 You added and viewed a dependency with dependency graph!

Given how many dependencies our repository is using, maintaining them needs to become an automated task. Keeping our code secure is a top priority, so one thing we need to do is set up a way to be notified when a dependency we are using is vulnerable or malware. We can do this by enabling Dependabot alerts!

What are Dependabot alerts?: Dependabot alerts tell you that your code depends on a package that is insecure. These Dependabot alerts reference the GitHub Advisory Database, which contains a list of known security vulnerabilities and malware, grouped in two categories: GitHub reviewed advisories and unreviewed advisories.

If your code depends on a package that has a security vulnerability, this can cause a range of problems for your project or the people who use it. You should upgrade to a secure version of the package as soon as possible. If your code uses malware, you need to replace the package with a secure alternative.

Let's try this out with our newly added follow-redirects dependency!

⌨️ Activity: View security advisories in the GitHub Advisory Database

  1. Navigate to the GitHub Advisory Database.
  2. Type or paste follow-redirects into the search box.
  3. Click on any of the advisories that were found.
  4. Note the packages, impact, patches, workaround, and references for the advisory.

Notice the list of advisories for our dependency! This can look scary but it's actually a good thing. It means that our dependency is actively being maintained and patches are being pushed to remove the vulnerability. If we had Dependabot alerts enabled, we could receive alerts when we need to update a dependency and act promptly to secure them.

Let's enable Dependabot alerts on our repository!

⌨️ Activity: Enable Dependabot alerts

  1. Navigate to the Settings tab.
  2. Click Code security and analysis.
  3. Click Enable Dependabot alerts (Wait about 60 seconds and then click the Security tab at the top of the repository).
  4. Review each of the Dependabot alerts under the Vulnerability alerts section.

Dependabot has alerted us of vulnerabilities that need to be updated from the dependencies that we are using. Dependabot helps us address these vulnerabilities by creating pull requests for each one as we select and review the alert.

Let's see how this would work by using Dependabot to create a pull request for one of the alerts!

⌨️ Activity: Create a pull request based on a Dependabot alert

  1. Select the Prototype Pollution in minimist alert under the Dependabot alerts section and click on the alert.
  2. Click the Create Dependabot security update button (This will create a pull request for the fix and could take ~2 minutes).
  3. Click the Review security update button. The pull request will be displayed.
    • You can view the pull request and Files changed tab to review the update.
  4. Navigate back to the Conversation tab and click the Merge pull request button.
  5. Click Confirm merge.
  6. Wait about 20 seconds then refresh this page (the one you're following instructions from). GitHub Actions will automatically update to the next step.

Get help: Post in our discussion boardReview the GitHub status page

© 2023 GitHub • Code of ConductMIT License

skills-secure-repository-supply-chain's People

Contributors

autruonggiang avatar github-actions[bot] avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.