You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Bug: Terraform registry modules with a //subdir path or a private registry host never get a latest version #618
scanTerraform in src/core-open/scanners/terraform-scanner.ts only looks up a module's latest version when its source splits into exactly three parts (namespace/name/provider). Two very common registry forms fall through and always show drift unknown:
Confirmed against src/core-open/scanners/terraform-scanner.ts: the registry lookup only runs when source.split('/') gives exactly three parts (around line 263), so terraform-aws-modules/vpc/aws//modules/vpc-endpoints (five parts) and app.terraform.io/acme/network/aws (four) both fall through to unknown.
A small parseRegistrySource(source) helper is the cleanest fix: drop everything from // onward, then if the first segment contains a . (or : for a port) treat it as the host. Return { host, namespace, name, provider } and only call the public registry when host is empty or registry.terraform.io. Keep the original source string as the row name so output stays recognisable. Table-driven tests over the three forms in the acceptance list will cover it.
Activity
vibgrate-team commentedon Nov 10, 2026
Confirmed against
src/core-open/scanners/terraform-scanner.ts: the registry lookup only runs whensource.split('/')gives exactly three parts (around line 263), soterraform-aws-modules/vpc/aws//modules/vpc-endpoints(five parts) andapp.terraform.io/acme/network/aws(four) both fall through tounknown.A small
parseRegistrySource(source)helper is the cleanest fix: drop everything from//onward, then if the first segment contains a.(or:for a port) treat it as the host. Return{ host, namespace, name, provider }and only call the public registry whenhostis empty orregistry.terraform.io. Keep the originalsourcestring as the row name so output stays recognisable. Table-driven tests over the three forms in the acceptance list will cover it.fix(terraform): look up registry modules with a subdir or public host (…