runtime/

directory
v0.5.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 26, 2026 License: Apache-2.0, BSD-3-Clause, MIT

README

Runtime Extractors

Runtime extractors live under extractor/filesystem/runtime/ rather than extractor/filesystem/language/ because runtimes and standalone CLI tools (such as nodejs, python, golang, terraform, and runc) are installed executables rather than libraries from a language package registry:

  • They publish advisories outside language package ecosystems (for example, nodejs is not hosted on npm, and CPython is not hosted on PyPI).
  • Multi-runtime managers (asdf, mise) configure language runtimes alongside infrastructure and container tools in the same file.

Directory Layout

Pattern Plugin Name Scope Examples
runtime/<manager> runtime/<manager> Managers that install multiple runtime types runtime/asdf, runtime/mise
runtime/<runtime>/<manager> runtime/<manager> Managers specific to a single runtime runtime/nodejs/nvm, runtime/nodejs/nodeversion

Inventory and PURL Convention

Runtime extractors return extractor.Package entries with PURLType: purl.TypeGeneric:

pkg:generic/<runtime_name>@<runtime_version>

Examples:

pkg:generic/nodejs@20.12.2
pkg:generic/terraform@1.6.0
pkg:generic/runc@1.1.12

Using pkg:generic instead of manager-specific types (pkg:asdf, pkg:mise) or language/plugin types (pkg:npm, pkg:terraform) keeps runtime inventory consistent:

  • Multiple extractors (runtime/asdf, runtime/mise, runtime/nvm, and runtime/nodeversion) emit identical PURLs for the same runtime version.
  • Ecosystem PURL types (such as pkg:npm or proposed pkg:terraform) represent packages, modules, or plugins rather than the core runtime binary.

Normalization Rules

  • Unwrap runtime backend prefixes (core:, asdf:, vfox:), skip non-runtime package backends (for example, npm:, cargo:), and normalize short tool aliases in multi-runtime configs to canonical runtime names (for example, node -> nodejs, go -> golang, py -> python; see asdf.go and mise.go), preserving raw ToolName and ToolVersion strings in manager metadata.
  • Strip leading v prefixes on numeric versions (for example, v20.12.2 -> 20.12.2).
  • Skip symbolic, range, or local/VCS specifiers that do not pin a concrete version (for example, system, latest, lts, nightly, path:..., or ref:...).

Directories

Path Synopsis
Package asdf extracts the installed runtime names and versions from asdf .tool-versions files.
Package asdf extracts the installed runtime names and versions from asdf .tool-versions files.
metadata
Package metadata defines a metadata struct for Asdf Tools.
Package metadata defines a metadata struct for Asdf Tools.
Package mise extracts the installed runtime names and versions from mise.toml files.
Package mise extracts the installed runtime names and versions from mise.toml files.
metadata
Package metadata defines a metadata struct for Mise Tools.
Package metadata defines a metadata struct for Mise Tools.
nodejs
nodeversion
Package nodeversion extracts the Node.js version from .node-version files.
Package nodeversion extracts the Node.js version from .node-version files.
nodeversion/metadata
Package metadata defines a metadata struct for Node.js versions.
Package metadata defines a metadata struct for Node.js versions.
nvm
Package nvm extracts the Node.js version from nvm .nvmrc files.
Package nvm extracts the Node.js version from nvm .nvmrc files.
nvm/metadata
Package metadata defines a metadata struct for NVM Node.js versions.
Package metadata defines a metadata struct for NVM Node.js versions.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL