Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Black Duck Open Source Scan: What It Finds

· 6 min read · Home Tech

In this article
  1. Decide What You Are Scanning and Where the Component List Comes From
  2. Read the Report in the Order That Matters
  3. Fix Findings Without Breaking the Build
  4. Set Up Repeatable Scans Instead of One-Off Runs
  5. Black Duck Scan Questions for Mixed and Legacy Codebases

A Black Duck open source scan is a software composition analysis (SCA) run that inventories the open source components in your codebase and reports their known vulnerabilities, license obligations and version details. The scan works from a manifest or lockfile, or from a snippet of code, and matches what it finds against a vulnerability and license database. The part most people get wrong is treating a clean scan as proof the software is safe: the result only covers components the tool could identify, so an incomplete dependency list or an unlisted transitive package produces a false all-clear.

Decide What You Are Scanning and Where the Component List Comes From

Black Duck identifies components in two main ways, and which one you use changes what the scan can see. A package-manager scan reads a manifest or lockfile — for example a package-lock.json, pom.xml, requirements.txt, go.mod or Gemfile.lock — and resolves the dependency tree from there. A snippet or binary scan inspects files directly and matches code signatures, which helps when you have no build files, such as a vendor drop or a compiled artifact.

Before you start, answer three questions:

  • What is the unit of scan? A single repository, a container image, or a whole product made of several repositories. Scanning one repo when the product pulls in five gives you a partial picture.
  • Do you have a lockfile? A lockfile pins exact versions and their transitive dependencies; a bare manifest often lists only direct dependencies with version ranges, so the scan has to guess or resolve.
  • Is the build reproducible? If the build pulls different versions at different times, the scan reflects only the moment it ran.

Include lockfiles in the scan and commit them to version control. That single habit removes most of the ambiguity in a first scan report.

Read the Report in the Order That Matters

A Black Duck report is not a flat list to work top to bottom. Work through it in this order so you fix what actually ships.

Separate direct from transitive components

Direct dependencies are the ones your team chose; transitive ones arrived through them. A transitive component with a critical vulnerability is often the real problem, and it is the one nobody on the team remembers adding. Filter the report to show the dependency path for each finding so you can see which direct dependency pulls it in.

Sort by severity, then by reachability

Severity labels (critical, high, medium, low) come from the vulnerability database, not from your code. Two components with the same severity label can carry very different risk depending on whether the vulnerable function is actually called. Use the report's usage information where it exists, and treat an unreachable finding as a scheduling decision rather than an emergency. A critical finding in a component loaded at startup on a public-facing service deserves attention before a critical finding in a build-time-only tool.

Check the license findings as carefully as the vulnerabilities

License results are frequently skimmed and then bite later. Look for copyleft licenses that could obligate you to publish source, and for components with no declared license at all — an unlicensed component is a legal question, not a technical one. Record the license for every component you ship, and route anything unusual to whoever handles legal review before release, not after.

Fix Findings Without Breaking the Build

The usual fix is a version upgrade, and the usual failure is that the upgrade breaks something. Handle it in this sequence:

  1. Confirm the fixed version. The report names the versions where the issue is resolved. Upgrade to a version at or above that line, not to whatever is newest.
  2. Upgrade the direct dependency, not the transitive one. Bumping a transitive package directly creates a version conflict the next time the parent updates. Move the parent to a release that pulls in the fixed child.
  3. Run the tests before and after. A patch-level bump is usually safe; a major-version jump often is not. If the tests do not cover the changed behaviour, you are guessing.
  4. Re-scan after the change. A fix is only confirmed when the new scan no longer shows the finding and shows no new ones.

When no fixed version exists, your options are to remove the component, isolate the vulnerable path so it is not reachable, or accept the risk with a written record of who accepted it and why. An accepted risk with a name and a date attached is a decision; an ignored finding is a future incident.

Set Up Repeatable Scans Instead of One-Off Runs

A single scan is a snapshot. The value comes from running it on every change and on a schedule, because new vulnerabilities are published against components you already shipped. Wire the scan into the pipeline so it runs on each pull request or merge, and set a policy that fails the build only for findings above a threshold you have agreed on. Failing every build on every low-severity finding trains people to bypass the check.

Keep the component inventory current by re-scanning release branches and container images as well as the main branch, since an old image can sit in production long after the source has moved on. Re-scan on a regular cadence too — monthly is a common choice — so newly disclosed issues surface even in code nobody has touched.

What a clean scan does and does not mean

A clean result means no known vulnerabilities were matched against the components the tool identified. It does not mean the code is free of vulnerabilities, that every dependency was found, or that a license question has been settled. Check the scan's coverage line: if the tool reports unresolved components or files it could not attribute, treat those as open items. Add your own code review and dynamic testing alongside the scan rather than instead of it.

Common reasons a scan misses components

Components get missed when the lockfile is absent or stale, when dependencies are vendored into the repository without metadata, when a package is installed at build time from a private registry the scanner cannot reach, or when code is copied in as a snippet rather than declared as a dependency. If the component count looks lower than you expect, compare it against the output of your package manager's own dependency listing before trusting the report.

Black Duck Scan Questions for Mixed and Legacy Codebases

What if the project has no package manager at all? Use a snippet or binary scan to match code signatures, and expect lower confidence. Record which files were scanned so the gaps are visible.

How do you handle a component with two licenses? Read the terms for the option you intend to rely on and confirm it applies to your distribution model. Dual licensing is common and the choice is yours to make deliberately.

Should build tools and test libraries be in scope? Yes for inventory, but weight them lower for risk, since they typically do not ship to users. Keep them visible so a future change in how they are used does not surprise you.

How long should a scan report be kept? Keep the report for each release alongside the release record, so you can answer later questions about what shipped and when.