Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.
Shade in the A or B circle for each question.
Draw a line connecting each item on the left to its match on the right.
| Left column | Right column | |
|---|---|---|
| 1import requests | AIgnores indirect dependencies. If LibA relies on LibB, a flaw in LibB still affects your app. | |
| 2npm install express | BA library flaw affects every app that imports it, not only its author. | |
| 3A flaw in one popular library affects every app that uses it | CMyApp -> LibA -> LibB | |
| 4An indirect (transitive) dependency is a dependency of a dependency | Dapp1, app2, app3 -> import oldlib (flaw) | |
| 5My app is safe because I only import LibA, and the flaw is in LibB | EDownloads a package and adds it as a dependency, along with the packages that it depends on | |
| 6A flaw in a library only matters to the person who wrote it | FBrings in a third-party library written by someone else so your program can use and rely on it |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
dependency — A library or package written by someone else that your program imports and relies on. If it has a flaw, every app that uses it is affected, including via dependencies of dependencies.import requests
r = requests.get(url)pip install requests{
"dependencies": {"express": "4.18.2"}
}app imports libA
libA imports libB
app -> libA -> libBnpm audit