Skip to content

VB6: component catalogue and implicit runtime for the SBOM - #36

Open
jthDEV wants to merge 2 commits into
mainfrom
feature/vb6-scan
Open

VB6: component catalogue and implicit runtime for the SBOM#36
jthDEV wants to merge 2 commits into
mainfrom
feature/vb6-scan

Conversation

@jthDEV

@jthDEV jthDEV commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Builds on the VB6 project scanner from 1.10.0. Nothing here changes the scanner's parsing; it adds the metadata that other ecosystems get from their package registry and that VB6 has no registry for.

Why this PR is SCA only

The first version of this branch also carried a DevSkim rule pack and an insecure demo application. Following the same reasoning that moved OBOM out of ts-scan (not SCA, must not burden a pipeline that only wants an SBOM), those parts have been removed and will live in a separate tool, ts-sast. ts-scan stays the SBOM scanner. What remains is purely about the quality of the bill of materials:

What's in here

  • src/ts_scan/pm/vb6_catalog.py – catalogue of well-known VB6 libraries (Microsoft ActiveX controls, ADO/DAO/MSXML type libraries, Windows system DLLs), keyed by file name. Attaches vendor, title, category, life-cycle notes and known advisories (e.g. MSCOMCTL.OCX → CVE-2012-0158 / CVE-2012-1856, MSXML4 → support ended 2014) to lib:* dependencies via description and meta.catalog. Without it the SBOM lists bare file names with a type library version; with it a reader sees what the component is and whether it is still supported. Identities (key, purl) are unchanged.
  • Implicit VB6 runtime – every compiled VB6 output depends on MSVBVM60.DLL. It is added to Exe/OleExe/OleDll/Control projects (meta.dependency_type = runtime, implicit = true); --vb6:excludeRuntime switches it off.
  • CHANGELOG – adds the entry for 1.10.0 that the version bump did not include, plus an Unreleased block for the above. README and docs/sbom.md get a short VB6 section and the vb6 option prefix.

Verification

  • pytest tests – 44 passed (existing VB6 tests adjusted for the runtime entry, 4 new tests for runtime, option and catalogue behaviour)
  • pyright src/ts_scan/pm/vb6.py src/ts_scan/pm/vb6_catalog.py – clean

Open for discussion

  • Enrichment by component name could arguably live on the platform side and benefit every client. That does not exist today; the client-side catalogue is a few kilobytes and can be retired once the platform does it. If you would rather not have it in ts-scan at all, say so and we close this PR, the runtime entry could then go in on its own.

🤖 Generated with Claude Code

… app

Builds on the VB6 project scanner shipped in 1.10.0:

- vb6_catalog.py: vendor, title, category, life-cycle notes and known
  advisories for well-known Microsoft ActiveX controls, ADO/DAO/MSXML
  libraries and Windows system DLLs; attached to lib:* dependencies
- add MSVBVM60.DLL as implicit runtime dependency of Exe/OleDll/OleExe/
  Control projects, switchable off with --vb6:excludeRuntime
- contrib/devskim-vb6: DevSkim language definition for VB6 file types and
  22 security rules with self-tests, producing SARIF
- examples/vb6-legacy-insecure/OrderDesk: deliberately insecure VB6 sample
  that exercises the scanner catalogue and every DevSkim rule
- CHANGELOG entries for 1.10.0 (missing) and Unreleased, README and docs

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Comment thread tests/test_vb6.py
scan = VB6Scanner().scan(project)[0]

runtime = scan.dependencies[-1]
assert runtime.key == 'lib:dll:MSVBVM60'
Comment thread tests/test_vb6.py

runtime = scan.dependencies[-1]
assert runtime.key == 'lib:dll:MSVBVM60'
assert runtime.versions == ['6.0']
Comment thread tests/test_vb6.py
runtime = scan.dependencies[-1]
assert runtime.key == 'lib:dll:MSVBVM60'
assert runtime.versions == ['6.0']
assert runtime.description == 'Microsoft Visual Basic 6.0 Runtime'
Comment thread tests/test_vb6.py
assert runtime.key == 'lib:dll:MSVBVM60'
assert runtime.versions == ['6.0']
assert runtime.description == 'Microsoft Visual Basic 6.0 Runtime'
assert runtime.meta['dependency_type'] == 'runtime'
Comment thread tests/test_vb6.py
assert runtime.versions == ['6.0']
assert runtime.description == 'Microsoft Visual Basic 6.0 Runtime'
assert runtime.meta['dependency_type'] == 'runtime'
assert runtime.meta['implicit'] is True
Comment thread tests/test_vb6.py
assert 'CVE-2012-0158' in common_controls.meta['catalog']['advisories']

user32 = by_key['lib:dll:user32']
assert user32.meta['catalog']['category'] == 'windows-system'
Comment thread tests/test_vb6.py
assert user32.meta['catalog']['category'] == 'windows-system'

legacy_reports = by_key['lib:dll:LegacyReports']
assert legacy_reports.description == ''
Comment thread tests/test_vb6.py

legacy_reports = by_key['lib:dll:LegacyReports']
assert legacy_reports.description == ''
assert 'catalog' not in legacy_reports.meta
Comment thread tests/test_vb6.py


def test_vb6_options_expose_runtime_switch():
assert 'excludeRuntime' in VB6Scanner.options()
Comment thread tests/test_vb6.py

def test_vb6_options_expose_runtime_switch():
assert 'excludeRuntime' in VB6Scanner.options()
assert 'ignore' in VB6Scanner.options()
…sast

The DevSkim rule pack and the deliberately insecure demo application are
static analysis, not software composition, and will live in their own tool
(ts-sast) like the OBOM extraction lives in ts-obom. What stays here is
metadata for the SBOM: the component catalogue and the implicit runtime.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@jthDEV jthDEV changed the title VB6: component catalogue, implicit runtime, DevSkim rule pack and insecure demo app VB6: component catalogue and implicit runtime for the SBOM Sep 6, 2026
@jthDEV
jthDEV marked this pull request as ready for review September 6, 2026 13:08
@jthDEV
jthDEV requested a review from gr-markin September 6, 2026 13:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants