← All posts
Engineering

Your CI Clone Has No Submodules. Your SBOM Should Still Know Their Versions.

Say your product vendors OpenSSL, an RTOS or a vendor SDK as a git submodule. Your CI starts with actions/checkout. By default, that action does not fetch submodules. The folder is there, and it is empty.

A scanner that looks at the files sees a folder name and nothing else. No version. A vulnerability database cannot answer a question about "openssl, version unknown". (A CVE, short for Common Vulnerabilities and Exposures, is a public ID for one flaw, and each one comes with a list of affected versions.) The SBOM (Software Bill of Materials) your pipeline produces is the one you would hand to an auditor or a customer. It should not have blanks where the risky parts are.

But git does know the version. The superproject records which commit each submodule is pinned to, as a "gitlink" entry in .git/index. It is the exact commit git submodule update would check out.

What bomwerk does with it

bomwerk scan now reads that entry. It parses .git/index as a file and never runs git. The submodule becomes pkg:github/openssl/openssl@<commit> at High confidence, the same as if you had checked it out.

We keep three golden fixtures of the same test tree, and CI compares every scan against them. This is what they say about OpenSSL:

Clone stateopenssl in the SBOMConfidenceExit code
No usable .git (an exported tree)pkg:github/openssl/opensslLow1
Default CI clone, submodule never checked outpkg:github/openssl/openssl@<commit>High0
Submodule checked outpkg:github/openssl/openssl@<commit>High0

The commit in these fixtures is synthetic. The middle row is the new one. In that fixture, the number of components a vulnerability lookup can match goes from 6 to 7:

{
  "name": "openssl",
  "purl": "pkg:github/openssl/openssl@fedcba9876543210fedcba9876543210fedcba98",
  "version": "fedcba9876543210fedcba9876543210fedcba98",
  "evidence": { "occurrences": [ { "location": "third_party/openssl" } ] }
}

The coverage file calls it matched, high confidence. That is an excerpt of the golden file, with the build identifiers left out.

Why it exits 0

A default CI clone is not a broken run. It is the normal shape of a CI run. So the note that a commit was read from the index, warning BW-GIT-006, is informational. It is still printed, written to the --warnings file and shown in the HTML report. It just never fails a build on its own. Most of our warning codes count toward exit code 1. This is the first that does not.

Safe on repositories you do not control

A scanner reads other people's files, so the reader is strict:

  • It reads index versions 2, 3 and 4, in SHA-1 and SHA-256 repositories.
  • It refuses a split index, a sparse index, an unknown version, a file over 128 MiB, or anything structurally inconsistent. It refuses the whole file with BW-GIT-007 instead of half-reading it.
  • It has its own fuzz targets for both hash formats. PR builds fuzz for ten minutes, and a two-hour run goes every night.

And if there is no usable index, nothing changes. The submodule stays unversioned and BW-GIT-004 says so, as before. A checked-out HEAD still wins over the index.

Try it on your repository

git clone --depth 1 https://github.com/your-org/your-product.git
bomwerk scan your-product --warnings warnings.json

Look for @<commit> on each submodule in the SBOM, and for BW-GIT-006 in warnings.json. The submodule's own files are absent in this kind of clone. That only matters if you meant to scan inside them, and for that you check them out and pass --include-submodule-contents.

This is on main and ships with the next release.

Free repo scan: bomwerk.com

Not sure what your current SBOM is missing? We'll assess one repository across its supported ecosystems, explain the evidence gaps, and go deeper on C/C++ where the build context allows.

Get a free scan of one repo