BM: Baca dalam Bahasa Melayu
World 8: Shields: Security
Dependabot alerts
You will learn: how GitHub warns you about unsafe packages, and how to fix them.
The problem
Your diary uses packages other people wrote. One day, one of them gets a security hole. Would you even know?
Watch
Dependabot: GitHub's helper that warns about unsafe packages and can open pull requests to update them. is GitHub’s helper robot. It checks your dependency: Code written by others that your project uses, like a package. against a big list of known holes. Finds a match? You get an alert.
Try it
Here is an alert. Tap the line that tells you the fix.
Tap the line that tells you the fix.
0 of 1 found
Watch
Dependabot can even do the fix. A security update is a pull request it opens for you. It moves the package to the fixed version. You check it, then merge.
Try it
An alert arrives. Put your steps in order, first at the top.
First step at the top. Put these in order. Use the arrows, or drag.
- Check that your tests still pass
- Read the alert: which package, how bad
- Open the update pull request
- Merge it to close the hole
Predict
The alert says the fix is in 1.0.3. Which version should you move to?
Pick one answer.
You did it!
You can now act on a Dependabot alert.
Go deeper (optional)
Alerts come from the GitHub Advisory Database. It is a big public list of known vulnerability: A security hole that an attacker could use.. Dependabot watches your default branch. Version updates are different: they keep packages fresh, holes or not. World 7 shows those.
Bahasa Melayu
Diari anda guna pakej tulisan orang lain. Satu hari, salah satunya ada lubang keselamatan. Adakah anda akan tahu?
Dependabot ialah robot pembantu GitHub. Ia semak dependency (pakej yang anda guna). Ia cari padanan dalam senarai besar lubang yang diketahui. Ada padanan? Anda dapat amaran.
Ini satu amaran. Ketik baris yang beritahu cara baikinya.
Dependabot boleh baiki untuk anda juga. Ia buka pull request bernama security update (kemas kini keselamatan). Ia tukar pakej ke versi yang dah dibaiki. Anda semak, kemudian merge.
Satu amaran sampai. Susun langkah anda, yang pertama di atas.
Amaran kata pembaikan ada dalam 1.0.3. Anda patut tukar ke versi mana?
Kini anda boleh bertindak atas amaran Dependabot.
You finished this before. Practice is always welcome!
Official docs: About Dependabot alerts · Viewing and updating Dependabot alerts
You've learned for 25 minutes. A short break helps your brain.
Sprint done! Great focus. Stretch for a minute?