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: the same Terraform module used at two versions is reported once, at the first version #620
scanTerraform in src/core-open/scanners/terraform-scanner.ts deduplicates modules by source only and keeps the first version it sees. A repository with envs/staging/main.tf on terraform-aws-modules/vpc/aws4.0.2 and envs/prod/main.tf on 5.8.1 reports a single row at whichever file was read first, so the older pin can be hidden (or the newer one) and drift is misleading.
What to do
Deduplicate modules on sourceandversion.
Keep row order deterministic (sort by source, then version).
Add unit tests.
Acceptance
Two versions of one module produce two module: rows, each with its own drift.
The same source and version used twice still produces one row.
Confirmed: the module pass in scanTerraform keys uniqueModules on m.source alone (around line 245 of src/core-open/scanners/terraform-scanner.ts), so the first file read wins and the other pin disappears.
Keying on `${m.source}@${m.version ?? ''}` fixes the dedupe, and sorting the final module list by source then version makes the order independent of file-walk order. A fixture with envs/staging/main.tf and envs/prod/main.tf pinning two versions of the same module, plus a duplicate pin, covers all three acceptance points.
Activity
vibgrate-team commentedon Nov 10, 2026
Confirmed: the module pass in
scanTerraformkeysuniqueModulesonm.sourcealone (around line 245 ofsrc/core-open/scanners/terraform-scanner.ts), so the first file read wins and the other pin disappears.Keying on
`${m.source}@${m.version ?? ''}`fixes the dedupe, and sorting the final module list by source then version makes the order independent of file-walk order. A fixture withenvs/staging/main.tfandenvs/prod/main.tfpinning two versions of the same module, plus a duplicate pin, covers all three acceptance points.fix(terraform): report each pinned module version (vibgrate#637)