skip to content

Dependency Risk & SCA

You will learn to find, triage and fix vulnerable open-source dependencies: resolved graphs, advisory feeds, reachability, EPSS and KEV. Interviewers want a prioritization story, not a tool name.

on this pageshow

explore

questions

page 1 of 2

What do the OSV, NVD and GHSA advisory databases each assert about a vulnerable package?

level: juniorimportance: must knowfreq 62%

answer

  1. three layers, not three copies
  2. who names it, who enriches it, who aggregates
  3. ecosystem name plus version range
  4. aliases link one flaw's many names
  5. a range claim, not a risk claim

basics

~20 s

NVD enriches a CVE record with a severity score and product applicability. GHSA describes the flaw per package ecosystem with a package name and affected version range. OSV is a schema and aggregator normalising many feeds into ecosystem-native ranges.

solid answer

~50 s

They sit at different points in the same chain. A CVE Numbering Authority assigns the identifier and publishes a record that names the flaw; NVD is the enriched view of that corpus, adding a severity vector and an applicability statement written in vendor-product terms, which fits installed software better than a library published under a package-manager name. GHSA, the GitHub Advisory Database, is ecosystem-native: it names the package the way npm, Maven, PyPI or crates.io names it and gives an affected range and a fixed version in that ecosystem's version scheme, so it matches your lockfile directly. OSV is an open schema plus a service aggregating many feeds into it, expressing affected sets as `introduced`/`fixed` events per ecosystem and carrying an `aliases` list so the same flaw's several identifiers collapse to one. None of the three tells you whether your code calls the vulnerable function.

go deeper

for a junior

Be ready to say in one breath which source names a flaw, which enriches it with a score and applicability, and which aggregates feeds into ecosystem-native ranges. Know that one flaw can have several identifiers.

for a middle

Explain how an affected range is actually represented - introduced and fixed events over an ecosystem's version scheme - and why vendor-product applicability data fits installed software better than a published library.

for a senior

Show that you choose a source per ecosystem and know which feed each tool in your pipeline reads, because that choice, not tool quality, drives most of what your reports say.

for a principal

Own the position that advisory data is third-party input of variable quality: decide which source is authoritative for the estate, budget for the normalisation work, and be able to defend that choice to an auditor.

An advisory database is not one thing. Three distinct jobs are being done in this space, and OSV, NVD and GHSA sit at different points in the chain. Confusing them is why two teams can look at the same service and disagree about what is known. ## Identification CVE Numbering Authorities (CNAs) - vendors, open-source projects and coordinating bodies authorised by the CVE Program - assign an identifier to a reported flaw and publish a record with a description and references. The identifier's job is to give everyone the same name for the same bug. On its own it is not a machine-matchable statement about which versions are affected; the record's prose may say *before 2.14.1* and nothing in the data model forces that to be structured, correct or complete. ## Enrichment NVD is the enriched view of that corpus. It adds a severity vector, a weakness classification and an applicability statement expressed against a dictionary of vendor/product/version entries, which is what lets a tool ask *is this installed product inside the affected set*. Two consequences matter in practice. First, enrichment is a separate step from publication and it can lag: a flaw can be public, with an assigned identifier and a working exploit discussed in the open, while the structured applicability data that scanners key off is still absent. A team whose only source is the enriched national record sees nothing during that window. Second, the applicability vocabulary is written in vendor and product terms. That fits an installed operating system component well; it fits a library published under a package-manager name less well, and the translation between the two is a known source of both misses and over-matches. ## Ecosystem-native curation GHSA is the GitHub Advisory Database. Its entries are scoped to a package ecosystem - npm, Maven, PyPI, NuGet, RubyGems, Go, crates.io and others - and an entry names the package as that package manager names it, with an affected version range and a fixed version in that ecosystem's own version scheme. Entries divide into curated, reviewed advisories where exactly this package-and-range data has been checked, and unreviewed entries imported from the central feed without that curation. The reviewed ones are directly actionable: they can be matched against a lockfile mechanically, with no vendor-to-package translation step in the middle. Most language ecosystems have an equivalent native database of their own - Rust's advisory database, the Go vulnerability database, and per-distribution feeds for OS packages. ## Aggregation and normalisation OSV is two things: an open schema for advisories, and a service that aggregates many source feeds into that schema. The schema is deliberately ecosystem-native. Each entry carries an `affected` list; each affected element names an ecosystem and a package and expresses versions as ranges built from ordered events - an `introduced` version and a `fixed` or `last_affected` version - so a consumer decides membership by evaluating the range rather than by parsing English. Entries also carry an `aliases` list linking the same flaw's identifiers across databases, and a `withdrawn` timestamp for records that have been retracted. ## Aliases: one flaw, several names The same bug routinely has a central identifier, an ecosystem advisory identifier and sometimes a distribution advisory identifier. These are names for one flaw, not three flaws. Counting rows rather than normalised flaws is one of the most common ways a finding count gets inflated, and it is the first thing to check when two reports disagree on volume. ## What none of them assert An advisory asserts that a named package, in a named version range, contains a flaw, and usually which version fixed it. It does not assert that your service calls the vulnerable code, that the package ships in something you run, or that an attacker can reach it. It does not assert that the range is right - ranges are written by people and are sometimes too wide, occasionally too narrow, and can be corrected after publication. Treating an advisory hit as a statement about your risk, rather than as a statement about a version range, is the single most common junior mistake here. ## The practical rule For a language dependency, prefer the ecosystem-native record, because its ranges are expressed in the same versioning language as your lockfile. For an installed operating system package, prefer the distribution's own feed, because only the distribution knows what it patched. Whichever you pick, normalise by alias before you count anything, and know which feed each of your tools is reading - that single fact explains most disagreements.

  • If one flaw carries both a CVE identifier and a GHSA identifier, is that two vulnerabilities?
    No. They are aliases for the same flaw, and the aggregating schema records that relationship explicitly. Normalise by the alias set before counting, otherwise the same bug is reported once per database your tooling reads and the total is meaningless.
  • Why do teams prefer an ecosystem-native advisory over the enriched national record for a language dependency?
    Because the range is expressed in the package manager's own name and version scheme, so matching against a lockfile entry is mechanical rather than a translation from vendor-product terms. Curation of that field is also usually faster than central enrichment, so the actionable data exists earlier.
  • What does an advisory hit still not tell you?
    Whether the vulnerable code is actually called from your service, whether the package is in something you ship or only a build-time helper, and whether the stated range is accurate. It asserts that a version range contains a flaw - everything after that is your judgment.

One earthquake, three records: a catalogue number, a national report adding magnitude and a damage map, and an aggregator that restates every local bulletin in one format.

saying these in an interview costs you the question

  • Says a CVE identifier and a GHSA identifier are always different bugs
  • Thinks the national database assigns the identifiers
  • Treats a missing severity score as meaning no known flaw
  • Assumes every advisory database covers every ecosystem equally
  • Reads an advisory hit as proof the service is exploitable

context

open as a page

Why does changing one line inside a committed lockfile count as a code change?

level: juniorimportance: must knowfreq 60%

basics

~20 s

A lockfile line names the exact package version, the source it is fetched from and the bytes accepted as that release. Editing it swaps different executable code into the build, with no source-file diff to review.

open as a page

What does a dependency's scope (test, build, runtime) change about whether a vulnerability finding is exploitable?

level: juniorimportance: must knowfreq 74%

basics

~10 s

Scope says where a package is needed, so it decides whether the package is in the artifact you deploy. A test-only library is absent from production and a production attacker cannot reach it.

open as a page

What do you check about an open-source library before adopting it in a production service?

level: juniorimportance: must knowfreq 72%

basics

~20 s

Check how many people really maintain it, whether releases and patch fixes still ship, whether it publishes a way to report a flaw privately, what the license is, how large the transitive tree is, and how much of it you actually need.

open as a page

What does an EPSS score of 0.08 on a CVE actually tell you about that vulnerability?

level: juniorimportance: must knowfreq 62%

basics

~10 s

EPSS estimates the probability a vulnerability will be exploited in the wild within 30 days. A score of 0.08 means roughly an 8 percent chance. It forecasts likelihood, not how damaging the flaw is.

open as a page

What is the difference between time-boxing a dependency finding's suppression and ignoring it permanently?

level: juniorimportance: must knowfreq 62%

basics

~20 s

A time-boxed suppression hides a finding until an expiry date, after which it returns to the queue for a fresh decision. A permanent ignore removes it for good, so a stale or wrong judgment is never re-examined.

open as a page

What does an SCA scanner actually match on when it flags a vulnerable dependency?

level: juniorimportance: must knowfreq 78%

basics

~20 s

It matches each resolved package version in your dependency tree against an advisory's affected version range for that same package identity. That is version arithmetic. It never inspects whether your code calls the vulnerable function.

open as a page

A scanner flags a vulnerable transitive dependency and a fixed version exists — why can you not always just upgrade to it?

level: juniorimportance: must knowfreq 66%

basics

~20 s

You do not choose that version. An intermediate library in your graph declares which version of the flagged package to pull, so until that library raises or widens its constraint, your build keeps resolving the vulnerable one.

open as a page

What does mitigating a vulnerable dependency in place mean, and when do you do it instead of patching?

level: juniorimportance: must knowfreq 62%

basics

~20 s

Mitigating in place removes the attack path without changing the dependency version: disable the vulnerable feature by config, or block the network route that reaches it. Use it when the patch will take longer than the exposure is tolerable.

open as a page

A dependency has a known vulnerability and no fixed version exists. What are your options?

level: juniorimportance: must knowfreq 68%

basics

~20 s

Four options: delete the dependency, replace it with a maintained equivalent, patch it yourself and own that patch forever, or contain it behind a control that blocks the vulnerable path. Deletion is often cheapest and rarely even costed.

open as a page

Why does scanning container images not replace SCA on manifests and lockfiles?

level: juniorimportance: must knowfreq 70%

basics

~20 s

They build different inventories. An image scanner lists what it can find inside a built image, mostly OS packages installed by the distro. Manifest and lockfile SCA reads the dependency graph your build resolved. Each misses what the other finds.

open as a page

Why are 60 unread dependency-update pull requests a security problem, not just backlog?

level: juniorimportance: must knowfreq 68%

basics

~20 s

An unread update queue means known fixes sit unapplied, and the one bump carrying a security fix looks exactly like the 59 routine ones. It also grows upgrade distance, so the next urgent patch becomes a large, risky jump.

open as a page

Two dependency scanners report 61 and 9 findings for one JVM service - how do you adjudicate?

level: middleimportance: must knowfreq 68%

basics

~20 s

Confirm both read the same resolved dependency set, then diff the lists by alias-normalised identifier. Every difference resolves to a feed gap, a coarser range, an un-collapsed duplicate, or stale data. The bigger number is not the safer one.

open as a page

Why must a curated internal package feed fail closed on unknown internal names?

level: middleimportance: must knowfreq 66%

basics

~20 s

A miss on a name in your own namespace must be a visible build error, never a fetch from somewhere else. Failing closed stops the build; failing open quietly succeeds with an artifact nobody in your organisation published.

open as a page

If a lockfile entry's integrity hash and source URL are both edited, why does install-time verification still pass?

level: middleimportance: must knowfreq 52%

basics

~20 s

The hash is compared with the bytes fetched from the source named in that same entry. An attacker who edits both simply records a hash matching their own payload. Lockfile hashes detect tampering in transit, not a tampered lockfile.

open as a page

What is the difference between a reachable dependency finding and an exploitable one?

level: middleimportance: must knowfreq 65%

basics

~10 s

Reachability asks whether your application ever executes the vulnerable code. Exploitability asks whether an attacker in some position can drive that code with input they control. Code can be reachable and still not exploitable.

open as a page

A critical advisory hits 180 services you already know are affected. How do you order the fixes in the first hour?

level: middleimportance: must knowfreq 71%

basics

~20 s

Order by exposure, not by score. Services that are internet-reachable and feed attacker-controlled input into the vulnerable code path go first, then internally reachable ones, then batch and build-only workloads. The score is identical across all 180, so it cannot rank them.

open as a page

A CVE listed in CISA KEV sits in your internet-facing proxy, rated medium - what do you do?

level: seniorimportance: must knowfreq 56%

basics

~20 s

Treat KEV membership as a hard remediation trigger and work it now. Listing means exploitation has actually been observed in the wild - evidence, not a prediction - and it overrides a severity band, which rates the flaw, not attacker behaviour.

open as a page

What test evidence justifies letting a dependency bump merge without a human reviewing it?

level: seniorimportance: must knowfreq 60%

basics

~20 s

Only evidence that actually exercises the changed dependency. A green build proves the covered paths still work and nothing about the rest, so the unattended-merge rule must stay narrow enough that your tests cover the risk it takes.

open as a page

Why do teams hold back newly published package versions for a cooldown period?

level: juniorimportance: should knowfreq 52%

basics

~20 s

A cooldown makes a newly published version unresolvable for a fixed period, often around 72 hours, so a malicious or hijacked release has time to be reported or pulled before any of your builds consume it.

open as a page

Why does transitive depth dominate a dependency scanner's finding count?

level: middleimportance: should knowfreq 58%

basics

~10 s

Findings are counted against the resolved graph, not the manifest. Each direct dependency drags in its own closure, so a two-import project can resolve to hundreds of modules. Depth predicts volume, not severity.

open as a page

One vulnerable library appears in twelve services' scans — how do you dedupe and route it?

level: middleimportance: should knowfreq 56%

basics

~20 s

Deduplicate on the finding's identity — the advisory plus the package identity and affected version — not on the scan result. Track one item with one accountable owner, keeping the twelve service occurrences as child records.

open as a page

You excluded a vulnerable transitive package and declared the fixed version directly — what can silently undo that fix?

level: middleimportance: should knowfreq 41%

basics

~20 s

Upgrading the intermediate library. An exclusion is written against a specific coordinate on a specific path, so when that library changes how it pulls the package, the exclusion stops matching, the vulnerable version returns, and nothing in the build fails.

open as a page

When you backport a security fix onto an abandoned dependency, what are you committing to?

level: middleimportance: should knowfreq 44%

basics

~20 s

You become that package's maintainer. You own review of a patch nobody upstream will check, every future flaw in the same code with no advisory to warn you, and the gap between what your build actually ships and what your inventory claims it ships.

open as a page

Dependency scanning can run in the editor, a pull request, the registry or at runtime — what does each placement buy?

level: middleimportance: should knowfreq 55%

basics

~20 s

Each placement trades speed against truth. Editor and pull-request scans read what you declare and give feedback before a change lands. Registry and runtime scans read the built artifact and what is deployed, which is the inventory that matches production.

open as a page

Why does a dependency update policy need both a scheduled sweep and advisory-driven upgrades?

level: middleimportance: should knowfreq 54%

basics

~20 s

They have different triggers and catch different things. A scheduled sweep is time-driven and keeps you close to upstream, including fixes that never get an advisory. An advisory-driven upgrade is event-driven, jumps the queue, and runs on somebody else's clock.

open as a page

Why does an OS package scan call a Debian host vulnerable after the distro backported the fix?

level: seniorimportance: should knowfreq 45%

basics

~20 s

Distributions backport security patches into their own package revision and keep the upstream version number. Matching that version against an upstream advisory range reports it vulnerable; only the distribution's own advisory feed records that the fix is already present.

open as a page

CI installs your Python requirements with hashes required, but developer laptops do not. Why is that drift a security finding?

level: seniorimportance: should knowfreq 44%

basics

~20 s

Only the enforced path is protected. A laptop installing without hash checks accepts whatever a compromised mirror or proxy serves, and the next regeneration writes those bytes' digest into the repository - which CI then enforces faithfully forever.

open as a page

A build-only plugin has a critical finding but never ships in your artifact - why still rate it high?

level: seniorimportance: should knowfreq 44%

basics

~20 s

A build-scope dependency executes on the build machine, under the build's identity, with the source tree, network and deploy credentials in reach. It never sees production, but it can take those credentials or alter the artifact.

open as a page

Adopt or build: a single-maintainer crate would sign payment settlements through an HSM?

level: seniorimportance: should knowfreq 55%

basics

~20 s

Decide on blast radius and on what compromising that maintainer would later buy an attacker. This code sits on the path that authorises money movement, so either fund real review and vendor it, or write only the narrow part you need.

open as a page

showing 1–30 of 51