Module Security
Module packages can carry publisher and integrity metadata so that installation and registration verify artifact trust before enabling a module.
Trust model
- Manifest metadata:
module-package.yamlmay includepublisher(name, email, attributes) andintegrity(checksum, optional signature). - Checksum verification: Before registration or install, the system verifies the manifest (or artifact) checksum when
integrity.checksumis present. Supported algorithms:sha256,sha384,sha512inalgo:hexformat. - Signature verification: If
integrity.signatureis set and trusted key material is configured, signature verification validates provenance. Without key material, only checksum is enforced and a warning is logged. - Unsigned modules: Modules without
integritymetadata are allowed (backward compatible). SetSPECFACT_ALLOW_UNSIGNED=1to document explicit opt-in when using strict policies.
Checksum flow
- Discovery reads
module-package.yamland parsesintegrity.checksum. - At registration time, the installer hashes the manifest content and compares it to the expected checksum.
- On mismatch, the module is skipped and a security warning is logged.
- Other modules continue to register; one failing trust does not block the rest.
Signing automation
- Script:
scripts/sign-module.sh <path-to-module-package.yaml>outputs asha256:checksum suitable for the manifestintegrity.checksumfield. - CI:
.github/workflows/sign-modules.ymlcan run on demand or on push tomainwhen module manifests change, to produce or validate checksums.
Versioned dependencies
Manifest may declare versioned module and pip dependencies via module_dependencies_versioned and pip_dependencies_versioned (each entry: name, version_specifier). These are parsed and stored for installation-time resolution while keeping legacy module_dependencies / pip_dependencies lists backward compatible.