watchdep
Sign inSource
Docs / Concepts / 12

Dependencies and SBOM

Section
Concepts
Page
12 of 16
Reading time
4 min

watchdep already keeps an inventory of every part. The Dependencies views put those inventories side by side, so you can see what each application depends on, where versions differ between services, and which packages carry open findings. Nothing new is collected for them.

What is shown

Only each part’s production inventory: the last deployed commit, or the head of its production branch until deployments report. Other branches stay on the part’s own page.

A part that has not sent a production inventory shows Not looked yet in its column, never an empty cell that reads as “does not use it”. A - means the part was looked at and does not use the package. A part whose inventory was not read or checked in full is marked incomplete above its column, and named with a link to what was not read.

An application’s Dependencies tab

Each application has two tabs: Findings and Dependencies. The Dependencies tab shows:

  • Runtimes and databases, from version files such as .nvmrc and from watchdep.yml, one column per part. A runtime or database the NVD has not answered for yet says “not checked against NVD yet”, never “none”.
  • Packages, one row per ecosystem and name, with each part’s version side by side. When parts disagree, the row is marked with words, “2 versions”, not with a colour. The relation (direct, indirect or unknown), the scope (production or development) and the open findings follow. A severe finding shows a red count, a high one a deep orange count, the rest a plain count. Each finding is counted once per package, however many parts and paths it touches.

Filters work like the findings lists: they live in the address, so a filtered view can be shared. Each active filter shows as a chip you can remove. The filters are direct only, production only, has findings, versions differ, ecosystem, and a search by name. You can sort by name, by findings (severe first) or by most used. The list shows 50 packages a page and always says where it is: “51-100 of 1,240 packages”.

The workspace view

The Dependencies icon in the left rail shows the same table across every application, with one column per application. When an application’s parts use different versions, each version is listed with the part that uses it. The application filter narrows the rows to one application’s packages and keeps every application’s column, for comparison.

A package’s page

Every package name links to its own page. It shows every application and part using the package, with the version, relation and scope. It draws every dependency path the lockfile recorded, as a finding’s page does. It also lists the other versions in use and the package’s open findings. A finding’s package name, the part page’s files and the command palette (Ctrl K) link there too.

Exporting an SBOM

From a part’s page, or an application’s Dependencies tab, Export SBOM downloads a standard software bill of materials:

Format File
CycloneDX 1.6 JSON storefront-web.cdx.json
SPDX 2.3 JSON storefront-web.spdx.json

An SBOM says what watchdep read, nothing more:

  • Components: every package of the production inventory, with its package URL (purl), version and scope (development packages are CycloneDX’s “excluded”), and the runtimes and databases.
  • Dependencies: only those the lockfile recorded. The part depends on its direct packages, and each recorded path gives its steps in order. Nothing is guessed.
  • Metadata: the tool (watchdep and its version, and the version of the CLI that took the inventory), the part, its commit and branch, when the inventory was taken, whether it is complete, and every file not read and why. CycloneDX holds these as watchdep: properties, SPDX as annotations on the part.

An application’s SBOM holds each part as a component with its own packages. A part with no production inventory is listed as “Not looked yet”, never as an empty part. Exporting is reading, so every role can export, viewers included.

Ecosystem marks

Packages and ecosystems carry a small mark: npm, RubyGems, PyPI, Maven, Go, Cargo, Packagist, NuGet, Pub, Hex, Swift and CocoaPods, and the Debian, Ubuntu, Alpine and Red Hat package families. Any other ecosystem gets a plain package mark. Marks are drawn in the text colour, never the brand’s colour, so a mark can never be mistaken for a status. RubyGems red, for example, would read as severe. They are part of the page, fetched from nowhere else.

Not yet

Licences (inventories do not carry them yet), importing an SBOM, and comparing two commits of one part.